diff --git a/README.md b/README.md index e41484e..fde4f57 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,13 @@ Content This project has a sample for the three types of Carol Apps: Online, Batch and Web. +All Carol Apps on this project have been created through the cookie-cutter project: https://docs.carol.ai/docs/carol-app-dev + Online Carol App --- -Language supported: python. +Language supported: python, nodeJS, and anything that can be embedded in a Docker Image. Goal: Execute an application online. This kind of application will provide a custom back-end. @@ -15,25 +17,19 @@ Goal: Execute an application online. This kind of application will provide a cus Batch Carol App --- -Language supported: python. +Language supported: python, nodeJS, and anything that can be embedded in a Docker Image. Goal: Execute an application that will process the data in batch. The process can be scheduled to run automatically. -Batch Carol App with Docker ---- - -Language supported: python. - -Goal: Execute a Python application that will process the data in batch, and has the example to submit the build through Operator. The process can be scheduled to run automatically. - Web Carol App --- -Language supported: any HTML framework (T-Faces). +Language supported: any HTML framework. On this example, we are sharing a sample using Portinari (https://portinari.io/). Goal: Allow the Carol App to provide a customizable experience to the final user through Web technologies and frameworks. + Dynamic Report --- @@ -48,92 +44,16 @@ Languages supported: Python and Html/Javascript. Goal: Create an interactive data visualization web [page](dynamic-report-d3/dynamicReportD3Preview.png), built on top of [D3](https://d3js.org/) (v5), [DC](https://dc-js.github.io/dc.js/) and [Crossfilter](https://square.github.io/crossfilter/). This Dynamic Report runs like an online Carol app with Flask backend. The template is ready to execute Flask and serve endpoints (available in app/webapp.py). + How to package the app? --- -Carol App divide the resources into the three types: - -### Web Carol app - folder structure - -The Web resource, related to the Front-end, should be zipped, and the app content should be inside a folder named `site`, as follow: - -``` -site/ -├── NunitoSans-Bold.51066f4d1d33630cd761.ttf -├── NunitoSans-ExtraLight.bc36a8726e20804a94da.ttf -├── NunitoSans-Regular.fb98ed1700e8dfaf0764.ttf -├── TotvsIcon.1642008454153acd9ef7.svg -├── TotvsIcon.4e1607e6f3f53fbb5e01.woff -├── TotvsIcon.683aa55aa3feb2d437b7.ttf -├── TotvsIcon.ab04e6bef307c5a4847d.eot -├── assets -│   ├── arrows -│   │   ├── arrow-down.png -│   │   ├── arrow-up.png -│   │   └── arrow-zero.png -│   ├── campaigns.png -│   ├── face.png -│   ├── flags -│   │   ├── EN.png -│   │   ├── PT.png -│   │   ├── china.png -│   │   ├── en-uk.png -│   │   └── spain.png -│   ├── general.png -│   ├── icon.png -│   ├── images -│   │   ├── order-ascending.svg -│   │   ├── order-descending.svg -│   │   ├── order-unselected.svg -│   │   ├── totvs-avatar-default.svg -│   │   ├── totvs-loading-icon.svg -│   │   ├── totvs-logo-grey.svg -│   │   ├── totvs-logo-menu.svg -│   │   └── totvs-logo-page-login.svg -│   ├── logo.png -│   └── zoom.png -├── favicon.ico -├── index.html -├── inline.bundle.js -├── inline.bundle.js.map -├── main.bundle.js -├── main.bundle.js.map -├── polyfills.bundle.js -├── polyfills.bundle.js.map -├── scripts.bundle.js -├── scripts.bundle.js.map -├── styles.bundle.js -├── styles.bundle.js.map -├── vendor.bundle.js -└── vendor.bundle.js.map -``` - - -### Online Carol App - folder structure - -The content of an Online Carol App should be zipped, and the app content should be inside a folder named `ai-script`, as follow: - -``` -ai-script -├── manifest.json -├── requirements.yml -└── run_me.py -``` - -### Batch Carol App - folder structure - -``` -ai-script/ -├── logging.cfg -├── luigi.cfg -├── manifest.json -├── requirements.yml -└── test_script.py -``` +To package and deploy the Carol App, please, follow the documentation https://docs.carol.ai/docs/carol-app-dev Additional information --- -Both Carol App (Online/Batch) need pyCarol (https://github.com/totvslabs/pyCarol). -Python 3.6 is required for both Carol App (Online/Batch). +- Carol Documentation: docs.carol.ai +- Both Carol App (Online/Batch) need pyCarol (https://github.com/totvslabs/pyCarol). +- Python 3.6 is required for both Carol App (Online/Batch). diff --git a/batch-carolapp-docker/Dockerfile b/batch-carolapp-docker/Dockerfile deleted file mode 100644 index bdc5b5c..0000000 --- a/batch-carolapp-docker/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM totvslabs/pycarol - -RUN mkdir /app -WORKDIR /app -ADD requirements.txt /app/ - -RUN pip install -r requirements.txt -ADD app/* /app/ - -ENTRYPOINT ["/app/model_run.sh"] diff --git a/batch-carolapp-docker/README.md b/batch-carolapp-docker/README.md deleted file mode 100644 index cfd5f12..0000000 --- a/batch-carolapp-docker/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# batch-carolapp-docker - -This sample project contains one app: process.py. - - -# Project Structure -
-.  
-├ai-script  
-│   └──manifest.json  
-├app  
-│   ├──process.py  
-├operator  
-│   ├──Makefile  
-│   └──spec.json  
-├Dockerfile  
-└requirements.txt
-
- -## ai-script -### manifest.json - -This manifest contains the requirements to run the process app. - -## app -On this folder we can find the scripts used on the Carol App. - -### process.py -The processing script sends a "Hello World" log to the task using pyCarol. - -## operator -The files on this folder are an interface for the GPC Operator API - -### Makefile -The make file have three different methods to be called: -- build: Will build the Docker image and deploy it on GCP. E.g:
make build -e TOKEN= -e GHTOKEN=
- -### spec.json -The definition on the spec.json will identify wich resources are nedded to run the build machine. diff --git a/batch-carolapp-docker/ai-script/manifest.json b/batch-carolapp-docker/ai-script/manifest.json deleted file mode 100644 index ea3acf9..0000000 --- a/batch-carolapp-docker/ai-script/manifest.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "batch": { - "processes": [ - { - "algorithmDescription": { - "en-US": "Processing.", - "pt-BR": "Processamento.", - "pt-br": "Processamento.", - }, - "algorithmName": "process", - "algorithmTitle": { - "en-US": "Processing", - "pt-BR": "Processamento" - }, - "instanceProperties": { - "keepInstance": "false", - "luigi": { - "workers": "1" - }, - "profile": "", - "properties": { - "dockerImage": "carolapp_sample_docker", - "instanceMemory": "250M", - "instanceSize": "10G", - "instanceVCPUs": "0.5" - } - }, - "name": "process" - } - ] - } -} diff --git a/batch-carolapp-docker/app/model_run.sh b/batch-carolapp-docker/app/model_run.sh deleted file mode 100755 index 088edf8..0000000 --- a/batch-carolapp-docker/app/model_run.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -#set -e -export PYTHONUNBUFFERED=1 - -echo "Running ${FILENAME}.py" -python "${FILENAME}.py" - -if [ $? != 0 ] -then - python /app/task_failed.py - exit 1 -fi diff --git a/batch-carolapp-docker/app/task_failed.py b/batch-carolapp-docker/app/task_failed.py deleted file mode 100644 index 4a630a4..0000000 --- a/batch-carolapp-docker/app/task_failed.py +++ /dev/null @@ -1,59 +0,0 @@ -import os -import sys -sys.path.append('./pyCarol') - -from pycarol.auth.ApiKeyAuth import ApiKeyAuth -from pycarol.carol import Carol -from pycarol.apps import Apps -from pycarol.tasks import Tasks - -class docker_environ_vars(): - - def __init__(self): - self.caroltenant = '' - self.carolappoauth = '' - self.carolconnectorir = '' - self.longtaskid = '' - - def docker_enviroment_variables_validation(self): - fault_vars = [] - - if 'CAROLTENANT' not in os.environ: - fault_vars.append('CAROLTENANT') - if 'CAROLAPPOAUTH' not in os.environ: - fault_vars.append('CAROLAPPOAUTH') - if 'CAROLCONNECTORID' not in os.environ: - fault_vars.append('CAROLCONNECTORID') - if 'LONGTASKID' not in os.environ: - fault_vars.append('LONGTASKID') - if 'ENV_DOMAIN' not in os.environ: - fault_vars.append('ENV_DOMAIN') - - if len(fault_vars) > 0: - raise Exception('Some environment variable were not defined: ',fault_vars) - - def load_vars(self): - self.docker_enviroment_variables_validation() - self.caroltenant = os.environ['CAROLTENANT'] - self.carolappoauth = os.environ['CAROLAPPOAUTH'] - self.carolconnectorir = os.environ['CAROLCONNECTORID'] - self.longtaskid = os.environ['LONGTASKID'] - self.environment = os.environ['ENV_DOMAIN'] - -print("-------------------------------") -print("STARTING ERROR REPORT") -print("-------------------------------") -env_vars = docker_environ_vars() -env_vars.load_vars() - -carol = Carol(domain=env_vars.caroltenant, - app_name='', - auth=ApiKeyAuth(env_vars.carolappoauth), - connector_id=env_vars.carolconnectorir, - environment=env_vars.environment) - -tasks = Tasks(carol) -task = tasks.get_task(env_vars.longtaskid) -if task.mdm_task_status != 'FAILED' or task.mdm_task_processing: - task.add_log(log_message="Something went wrong.", log_level="ERROR") - task.set_progress(100) diff --git a/batch-carolapp-docker/operator/.gitignore b/batch-carolapp-docker/operator/.gitignore deleted file mode 100644 index 50993e6..0000000 --- a/batch-carolapp-docker/operator/.gitignore +++ /dev/null @@ -1 +0,0 @@ -spec.json_tmp diff --git a/batch-carolapp-docker/operator/Makefile b/batch-carolapp-docker/operator/Makefile deleted file mode 100644 index 41182d7..0000000 --- a/batch-carolapp-docker/operator/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -IMAGE = carolapp_sample_docker -APP = sample -OPERATOR ?= api.operator.carol.ai -ENVIRONMENT ?= labs-ai-apps-production - -TOKEN ?= -USER ?= -ID ?= -GHTOKEN ?= - -.PHONY: spec -spec: - @APP=$(USER) IMAGE=$(IMAGE) ENVIRONMENT=$(ENVIRONMENT) envsubst < spec.json > spec.json_tmp - -.PHONY: build -build: spec - @curl -sXPOST -H "x-auth-token:$(TOKEN)" \ - "https://$(OPERATOR)/api/builds" -d@./spec.json_tmp - -.PHONY: get -get: - @curl -sXGET -H "x-auth-token:$(TOKEN)" \ - "https://$(OPERATOR)/api/builds/build/$(APP)/$(ID)" - -.PHONY: delete -delete: - @curl -sXDELETE -H "x-auth-token:$(TOKEN)" \ - "https://$(OPERATOR)/api/builds/build/$(APP)/$(ID)" diff --git a/batch-carolapp-docker/operator/spec.json b/batch-carolapp-docker/operator/spec.json deleted file mode 100644 index 1dfe1ce..0000000 --- a/batch-carolapp-docker/operator/spec.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "user": "${APP}", - "app": "build", - "cpu": 2, - "memory": 4000, - "source": { - "type": "git", - "path": "https://${GHTOKEN}@github.com/totvslabs/carolapp-samples", - "branch": "master" - }, - "dockerfile": "Dockerfile", - "cwd": "./batch-carolapp-docker", - "cache": true, - "target": { - "image": "gcr.io/${ENVIRONMENT}/${IMAGE}" - } -} diff --git a/batch-carolapp-docker/requirements.txt b/batch-carolapp-docker/requirements.txt deleted file mode 100644 index a777e60..0000000 --- a/batch-carolapp-docker/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -pycarol>=2.20 diff --git a/batch-carolapp-nop/ai-script/manifest.json b/batch-carolapp-nop/ai-script/manifest.json deleted file mode 100644 index c5a167f..0000000 --- a/batch-carolapp-nop/ai-script/manifest.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "batch": { - "processes": [ - { - "algorithmDescription": { - "en-US": "Hello World", - "pt-BR": "Hello World", - "pt-br": "Hello World" - }, - "algorithmName": "test_script", - "algorithmTitle": { - "en-US": "Hello World" - }, - "instanceProperties": { - "environments": { - "EXAMPLE_ENV_2": "value_2" - }, - "keepInstance": "false", - "luigi": { - "workers": "4" - }, - "profile": "", - "properties": { - "dockerImage": "carol/base-batch", - "instanceMemory": "2", - "instanceVCPUs": "4" - } - }, - "name": "helloworld" - } - ] - } -} \ No newline at end of file diff --git a/batch-carolapp-nop/ai-script/test_script.py b/batch-carolapp-nop/ai-script/test_script.py deleted file mode 100644 index a6cad0f..0000000 --- a/batch-carolapp-nop/ai-script/test_script.py +++ /dev/null @@ -1,39 +0,0 @@ -import os -import pycarol -import datetime -import random - -from pycarol import * -from pycarol.carol import * -from pycarol.tasks import * -from pycarol.query import * -from pycarol.auth.ApiKeyAuth import * -from pycarol.staging import * -from pycarol.connectors import Connectors - - -def run(): - print(">>>>> RUNNING THE METHOD RUN INSIDE EXECUTION") - - apiAuth = ApiKeyAuth(api_key = os.environ['CAROLAPPOAUTH']) - connectorId = os.environ['CAROLCONNECTORID'] - appName = os.environ['CAROLAPPNAME'] - - print("Connecting to Carol...") - carol_instance = Carol(os.environ['CAROLDOMAIN'], appName, apiAuth, connector_id=connectorId) - - print("Connected...") - tasks = Tasks(carol_instance) - if(os.environ['LONGTASKID'] != "TBD"): - task = tasks.get_task(os.environ['LONGTASKID']) - task.set_progress(50) - - print(f">>>>> HELLO WORLD! My Task ID is {os.environ['LONGTASKID']}") - - if(os.environ['LONGTASKID'] != "TBD"): - task.add_log(log_message="Everything went well.", log_level="INFO") - task.set_progress(100) - -if __name__ == '__main__': - print(">>>>> MAIN!") - run() diff --git a/batch-carolapp/README.md b/batch-carolapp/README.md deleted file mode 100644 index 92c51f6..0000000 --- a/batch-carolapp/README.md +++ /dev/null @@ -1,82 +0,0 @@ -Preparing the environment to run the application locally ---- - -Create the environment variables (`sintax for Mac`): - -``` -export CAROLTENANT=wssp -export CAROLAPPNAME=appdemo -export LONGTASKID=TBD -``` - -The `LONGTASKID` will not be considered since its value is `TBD` (take a look at the source code to see how it is being handled). - -Go to Carol, get the `connector ID` the application will send data to. In the provided application, it's being considered the connector `carolml`. Inside Carol, for the connector the application will send data, generate the `Connector Token`. With the connector token in hands, create this new environment variable: - -``` -export CAROLCONNECTORID=e89641b0e91011e8aec042010a801002 -export CAROLAPPOAUTH=d5f358e0b30a11e8a0caca8943f25e25 -``` - -Ps.: -- `e89641b0e91011e8aec042010a801002` is the `Connector ID` I got from Connector's page. -- `d5f358e0b30a11e8a0caca8943f25e25` is the `Connector Token` I generated on my side. - - -Running the application locally ---- - -Create a virtualenv based on the `requirements.yml` file: - -``` -conda env create -f requirements.yml -``` - -Some useful commands related to conda and virtualenv: - -Activate a specific virtualenv: -``` -conda activate pycarol -``` - -Deactivate a virtualenv: -``` -conda deactivate -``` - -List all virtualenv avaliable: -``` -conda env list -``` - -After creating and activating the virtualenv, run the following command: - -``` -python3 -m luigi --module test_script main.runMe --local-scheduler -``` - - -Running the application in Carol ---- - -To make the application compatible to Carol, you should replace the `connector ID` defined to run it locally to the default connector id: `0a0829172fc2433c9aa26460c31b78f0` - -On the provided sampe, it's this line: - -``` -carol_instance = Carol(os.environ['CAROLTENANT'], 'myapp', apiAuth, connector_id='0a0829172fc2433c9aa26460c31b78f0') -``` - - -Additional information ---- - -In case you want to keep the `AWS` instance, without destroying it after finishing the algorithm, change the manifest file setting the property `keepInstance` to true. - -Both Carol App (Online/Batch) need pyCarol (https://github.com/totvslabs/pyCarol). - - -Questions? ---- - -Send a message on `#carol-feedback` on Slack. diff --git a/batch-carolapp/ai-script/manifest.json b/batch-carolapp/ai-script/manifest.json deleted file mode 100644 index 39129d8..0000000 --- a/batch-carolapp/ai-script/manifest.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "batch": { - "processes": [ - { - "algorithmDescription": { - "en-US": "Predict the customer status", - "pt-BR": "Predict the customer status", - "pt-br": "Predict the customer status" - }, - "algorithmName": "test_script", - "algorithmTitle": { - "en-US": "Predict the customer status" - }, - "instanceProperties": { - "environments": { - "CONNECTORNAME": "carolml", - "EXAMPLE_ENV_2": "value_2" - }, - "keepInstance": "false", - "luigi": { - "workers": "4" - }, - "profile": "", - "properties": { - "dockerImage": "carol/base-batch", - "instanceMemory": "2", - "instanceVCPUs": "4" - } - }, - "name": "testbatch" - }, - { - "algorithmDescription": { - "en-US": "Generate custom report", - "pt-BR": "Generate custom report", - "pt-br": "Generate custom report" - }, - "algorithmName": "test_report", - "algorithmTitle": { - "en-US": "Generate a custom report" - }, - "instanceProperties": { - "environments": { - "CONNECTORNAME": "carolml" - }, - "keepInstance": "false", - "luigi": { - "workers": "4" - }, - "profile": "", - "properties": { - "dockerImage": "carol/base-batch", - "instanceMemory": "2", - "instanceVCPUs": "4" - } - }, - "name": "testreport" - } - ] - } -} \ No newline at end of file diff --git a/batch-carolapp/ai-script/report-template.html b/batch-carolapp/ai-script/report-template.html deleted file mode 100644 index b01da0b..0000000 --- a/batch-carolapp/ai-script/report-template.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - TOTVS - Carol App Report - {{name}} - - - - - - -
-
-

Metricas-Retencao_de_Alunos

- -
- -
- - -
-
- -
- {{content|safe}} - -
- - - - \ No newline at end of file diff --git a/batch-carolapp/ai-script/requirements.txt b/batch-carolapp/ai-script/requirements.txt deleted file mode 100644 index eec1cf1..0000000 --- a/batch-carolapp/ai-script/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -Django \ No newline at end of file diff --git a/batch-carolapp/ai-script/test-jupyter-notebook.ipynb b/batch-carolapp/ai-script/test-jupyter-notebook.ipynb deleted file mode 100644 index 0d1ca6e..0000000 --- a/batch-carolapp/ai-script/test-jupyter-notebook.ipynb +++ /dev/null @@ -1,92 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "hello\n" - ] - } - ], - "source": [ - "print(\"hello\")" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "message coming from jupyter notebook\n" - ] - } - ], - "source": [ - "print(\"message coming from jupyter notebook\")" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "now it's 2019-04-29 20:46:35.935169\n" - ] - } - ], - "source": [ - "print(\"now it's \" + str(datetime.datetime.now()))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.5" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/batch-carolapp/ai-script/test_report.py b/batch-carolapp/ai-script/test_report.py deleted file mode 100644 index f01a606..0000000 --- a/batch-carolapp/ai-script/test_report.py +++ /dev/null @@ -1,121 +0,0 @@ -import luigi -import os -import pycarol -import datetime -import random - -import django -from django import template -from django.template.loader import get_template -from django.conf import settings - -from pycarol import * -from pycarol.carol import * -from pycarol.tasks import * -from pycarol.query import * -from pycarol.auth.ApiKeyAuth import * -from pycarol.staging import * -from pycarol.connectors import Connectors -from pycarol.storage import Storage - - -namespace = 'main' -luigi.namespace(namespace) - -class runMe(luigi.WrapperTask): - def requires(self): - print(">>>>> RUNNING THE METHOD REQUIRES") - return execution() - -class execution(luigi.Task): - print(">>>>> RUNNING THE METHOD EXECUTION") - finished = False - def run(self): - print(">>>>> RUNNING THE METHOD RUN INSIDE EXECUTION") - osvarslist = ['FILENAME','FUNCTIONNAME','WORKERS','CAROLUSERNAME','CAROLPASSWORD','CAROLDOMAIN','CAROLCONNECTORID','CAROLAPPNAME','CAROLAPPVERSION','CAROLAPPOAUTH','REQUIREMENTS','URL','FILEPATH','BRANCHNAME','PYCAROL','LOGIN','DEBUG','RESULTSPATH','RAWPATH','SENTPATH'] - - apiAuth = ApiKeyAuth(api_key = os.environ['CAROLAPPOAUTH']) - connectorId = os.environ['CAROLCONNECTORID'] - appName = os.environ['CAROLAPPNAME'] - connectorName = os.environ['CONNECTORNAME'] - - print("ConnectorID: ", connectorId) - print("API Token: ", apiAuth) - print("App Name: ", appName) - print("Connector Name: ", connectorName) - carol_instance = Carol(os.environ['CAROLTENANT'], appName, apiAuth, connector_id=connectorId) - - #TODO: - #download de settings. - - tasks = Tasks(carol_instance) - if(os.environ['LONGTASKID'] != "TBD"): - task = tasks.get_task(os.environ['LONGTASKID']) - task.set_progress(50) - - connectors = Connectors(carol_instance) - connector = connectors.get_by_name(connectorName) - - print(">>>>> RESPONSE HERE: ") - print(connector['mdmId']) - - # Starting the report here: - - report_template = "report-template.html" - notebook = 'test-jupyter-notebook.ipynb' - notebook_result = "test.html" - file_name = "report-sample.html" - - try: - os.remove(file_name); - except Exception as e: - print("File not found") - - try: - os.remove(notebook_result); - except Exception as e: - print("File not found") - - os.system( - 'jupyter nbconvert --execute ' + notebook + - ' --to html --output ./' + notebook_result + - ' --ExecutePreprocessor.timeout=180 --ExecutePreprocessor.kernel_name=python3' - ) - - f = open(notebook_result, "r") - jupyter_notebook_content = f.read() - - settings.configure(TEMPLATES=[ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': ['.'], #if you want the templates from a file - 'APP_DIRS': False, - }, - ]) - - django.setup() - - template = get_template(report_template) - content_report = template.render({'name': "Robson Poffo", "content": jupyter_notebook_content}) - - f = open(file_name, "a") - f.write(content_report) - f.close() - - directory = "reports/" - Storage(carol_instance).save(directory+file_name, obj=file_name, format='file') - - self.finished = True - - def complete(self): - print(">>>>> RUNNING THE METHOD COMPLETE INSIDE EXECUTION") - return self.finished - -if __name__ == '__main__': - ok = luigi.build([runMe()], local_scheduler=True, workers=1) - if(os.environ['LONGTASKID'] != "TBD"): - if ok: - task.add_log(log_message="Everything went well.", log_level="INFO") - else: - task.add_log(log_message="Execution Failed.", log_level="ERROR") - task.set_progress(100) diff --git a/batch-carolapp/ai-script/test_script.py b/batch-carolapp/ai-script/test_script.py deleted file mode 100644 index c5eb6ac..0000000 --- a/batch-carolapp/ai-script/test_script.py +++ /dev/null @@ -1,72 +0,0 @@ -import os -import pycarol -import datetime -import random - -from pycarol import * -from pycarol.carol import * -from pycarol.tasks import * -from pycarol.query import * -from pycarol.auth.ApiKeyAuth import * -from pycarol.staging import * -from pycarol.connectors import Connectors - - -def run(): - print(">>>>> RUNNING THE METHOD RUN INSIDE EXECUTION") - osvarslist = ['FILENAME','FUNCTIONNAME','WORKERS','CAROLUSERNAME','CAROLPASSWORD','CAROLDOMAIN','CAROLCONNECTORID','CAROLAPPNAME','CAROLAPPVERSION','CAROLAPPOAUTH','REQUIREMENTS','URL','FILEPATH','BRANCHNAME','PYCAROL','LOGIN','DEBUG','RESULTSPATH','RAWPATH','SENTPATH'] - - apiAuth = ApiKeyAuth(api_key = os.environ['CAROLAPPOAUTH']) - connectorId = os.environ['CAROLCONNECTORID'] - appName = os.environ['CAROLAPPNAME'] - connectorName = os.environ['CONNECTORNAME'] - - print("Connecting to Carol...") - carol_instance = Carol(os.environ['CAROLDOMAIN'], appName, apiAuth, connector_id=connectorId) - - print("Connected...") - tasks = Tasks(carol_instance) - if(os.environ['LONGTASKID'] != "TBD"): - task = tasks.get_task(os.environ['LONGTASKID']) - task.set_progress(50) - - for var in osvarslist: - if var in os.environ: - print(var, os.environ[var]) - - connectors = Connectors(carol_instance) - connector = connectors.get_by_name(connectorName) - - print(">>>>> RESPONSE HERE: ") - print(connector['mdmId']) - - query = Query(carol=carol_instance) - data = query.all(dm_name="customer").go().results - - predictedData = list() - - print(">>>>> data read from carol: ") - for row in data: - print(row) - predictedData.append({ - 'date': datetime.now().replace(microsecond=0).isoformat(), - 'taxid': row['mdmtaxid'], - 'customercode': row['customercode'], - 'customername': row['customershortname'], - 'risk': (random.randint(1,9))/9 - }) - - print(">>>>> data generated: ") - for row in predictedData: - print(row) - - sender = Staging(carol_instance) - sender.send_data('prediction', data=predictedData, print_stats=True, auto_create_schema=False, crosswalk_auto_create=['date', 'taxid'], connector_id=connector['mdmId']) - - if(os.environ['LONGTASKID'] != "TBD"): - task.add_log(log_message="Everything went well.", log_level="INFO") - task.set_progress(100) - -if __name__ == '__main__': - print(">>>>> MAIN!") - run() diff --git a/batch-carolapp-docker/ai-script/.gitignore b/batch_carolapp/.gitignore similarity index 55% rename from batch-carolapp-docker/ai-script/.gitignore rename to batch_carolapp/.gitignore index 2b76159..386fad8 100644 --- a/batch-carolapp-docker/ai-script/.gitignore +++ b/batch_carolapp/.gitignore @@ -3,11 +3,36 @@ __pycache__/ *.py[cod] *$py.class +# OSX useful to ignore +*.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + # C extensions *.so # Distribution / packaging .Python +env/ build/ develop-eggs/ dist/ @@ -19,12 +44,9 @@ lib64/ parts/ sdist/ var/ -wheels/ -share/python-wheels/ *.egg-info/ .installed.cfg *.egg -MANIFEST # PyInstaller # Usually these files are written by a python script from a template @@ -39,13 +61,12 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ -.nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml -*.cover +*,cover .hypothesis/ .pytest_cache/ @@ -55,64 +76,27 @@ coverage.xml # Django stuff: *.log -local_settings.py -db.sqlite3 - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy # Sphinx documentation docs/_build/ -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints +# IntelliJ Idea family of suites +.idea +*.iml +## File-based project format: +*.ipr +*.iws +## mpeltonen/sbt-idea plugin +.idea_modules/ -# IPython -profile_default/ -ipython_config.py +#Visual Studio Code +.vscode/* -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule +# PyBuilder +target/ -# SageMath parsed files -*.sage.py +# Virtual Env +venv/** -# Environments +# Env Files .env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -.DS_Store -.vscode/ \ No newline at end of file diff --git a/batch_carolapp/Dockerfile b/batch_carolapp/Dockerfile new file mode 100644 index 0000000..c666042 --- /dev/null +++ b/batch_carolapp/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.6 + +WORKDIR /app +ADD requirements.txt /app/ +ADD batch_carolapp/ /app/batch_carolapp/ + +RUN pip install -r requirements.txt + +VOLUME [ "/app" ] + +CMD ["python3", "-m", "batch_carolapp.batch_carolapp_algorithm"] diff --git a/batch_carolapp/Makefile b/batch_carolapp/Makefile new file mode 100644 index 0000000..d2927ab --- /dev/null +++ b/batch_carolapp/Makefile @@ -0,0 +1,90 @@ +PYLINT = flake8 +PYLINTFLAGS = -rn +PYTHONFILES := $(wildcard *.py) + +IMAGE = batch_carolapp-batch_carolapp_algorithm:0.1.0 +APP = poffo +OPERATOR ?= api.operator.carol.ai +ENVIRONMENT ?= labs-ai-apps-production + +USER ?= +ID ?= +GHTOKEN ?= + + +ifeq ($(OS),Windows_NT) + OPEN := start +else + UNAME := $(shell uname -s) + ifeq ($(UNAME),Linux) + OPEN := xdg-open + endif + ifeq ($(UNAME),Darwin) + OPEN := open + endif +endif + +.PHONY: help + +.check-env: + @test $${USER?Please set environment variable USER} + @test $${ID?Please set environment variable ID} + @test $${GHTOKEN?Please set environment variable GHTOKEN} + +help: ## Show this help message + @echo "batch_carolapp Makefile help.\n" + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +init: ## Install all package dependencies + pip install -r requirements.txt + +test: ## Runs all project test suite, recording all test converage data + pytest --cov=batch_carolapp tests/ + +coverage: ## Create XML and HTML Test coverare report. + coverage xml -o coverage-reports/coverage.xml + coverage3 html + +htmlcov: coverage ## Opens the current test coverage report on the default browser + $(OPEN) htmlcov/index.html + +clean: ## Cleans all temporary and preprocessed files + rm -rf dist + find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete + rm -rf htmlcov/* + +dev: ## Install all development packages dependencies + pip install -r requirements-dev.txt + +docs: ## Compile all package documentation in HTML format + $(MAKE) -C docs html +code_scan: ## Execute a Code Qualiry scan and send the data to SonarQube server + @echo "~~~ Code Quality Scan" + sonar-scanner -Dsonar.projectKey=batch_carolapp -Dsonar.sources=. -Dsonar.host.url=${SONAR_URL} -Dsonar.login=${SONAR_TOKEN} -Dsonar.branch.name=${BUILDKITE_BRANCH} -Dsonar.python.coverage.reportPaths="coverage-reports/coverage.xml" + +lint: ## Lint all code for best practicies + flake8 ./batch_carolapp ./tests + +run_luigi: ## Runs the Batch process locally using a Luigi local scheduler + python3 -m luigi --module batch_carolapp.batch_carolapp_algorithm main.runMe --local-scheduler + +run: ## Runs the Batch process locally + python3 -m batch_carolapp.batch_carolapp_algorithm + +build_ci: ## Build CI Docker Image + docker build -f docker/ci_image/Dockerfile -t ci_image . + +venv: ## Create the virtualenv for this Carol App + python3 -m venv .venv + source .venv/bin/activate && pip install --upgrade pip + +all_tests: tests coverage code_scan ## Runs all test related tasks + +docker_image: ## Build the Carol App docker image + docker build -t ${IMAGE} . + +dist: clean ## Create the dist file to deploy on Carol + @mkdir dist + @mkdir dist/ai-script + @cp batch_carolapp/manifest.json dist/ai-script + @cd dist && zip -r batch_carolapp.zip ai-script/* diff --git a/batch-carolapp-nop/README.md b/batch_carolapp/README.md similarity index 100% rename from batch-carolapp-nop/README.md rename to batch_carolapp/README.md diff --git a/batch-carolapp-docker/app/process.py b/batch_carolapp/batch_carolapp/batch_carolapp_algorithm.py similarity index 92% rename from batch-carolapp-docker/app/process.py rename to batch_carolapp/batch_carolapp/batch_carolapp_algorithm.py index 115d5f6..c4164a2 100644 --- a/batch-carolapp-docker/app/process.py +++ b/batch_carolapp/batch_carolapp/batch_carolapp_algorithm.py @@ -30,7 +30,7 @@ task = tasks.get_task(os.environ['LONGTASKID']) def run(): - logger.info('Running the method inside execution...') + logger.info('Running the method run...') task.set_progress(50) @@ -42,5 +42,4 @@ def run(): task.set_progress(100) -if __name__ == '__main__': - run() +run() diff --git a/batch-carolapp/ai-script/logging.cfg b/batch_carolapp/batch_carolapp/logging.cfg similarity index 100% rename from batch-carolapp/ai-script/logging.cfg rename to batch_carolapp/batch_carolapp/logging.cfg diff --git a/batch-carolapp/ai-script/luigi.cfg b/batch_carolapp/batch_carolapp/luigi.cfg similarity index 100% rename from batch-carolapp/ai-script/luigi.cfg rename to batch_carolapp/batch_carolapp/luigi.cfg diff --git a/batch_carolapp/batch_carolapp/manifest.json b/batch_carolapp/batch_carolapp/manifest.json new file mode 100644 index 0000000..755de5b --- /dev/null +++ b/batch_carolapp/batch_carolapp/manifest.json @@ -0,0 +1,40 @@ +{ + "batch": { + "processes": [ + { + "algorithmDescription": { + "en-US": "Batch task Description", + "pt-BR": "Descrição do Tarefa Batch" + }, + "algorithmName": "batch_carolapp_algorithm", + "algorithmTitle": { + "en-US": "Batch task Description", + "pt-BR": "Descrição do Tarefa Batch" + }, + "dataModels": [ + ], + "instanceProperties": { + "luigi": { + "workers": "4" + }, + "properties": { + "dockerName": "batch_carolapp-batch_carolapp_algorithm", + "instanceType": "c1.nano" + } + }, + "name": "batch_carolapp" + } + ] + }, + "docker": [ + { + "dockerName": "batch_carolapp-batch_carolapp_algorithm", + "dockerTag": "0.1.0", + "gitBranch": "app_review", + "gitPath": "/batch_carolapp", + "instanceType": "c1.small", + "gitDockerfileName": "Dockerfile", + "gitRepoUrl": "https://github.com/totvslabs/carolapp-samples" + } + ] +} \ No newline at end of file diff --git a/batch_carolapp/docker/ci_image/Dockerfile b/batch_carolapp/docker/ci_image/Dockerfile new file mode 100644 index 0000000..1fa5ef9 --- /dev/null +++ b/batch_carolapp/docker/ci_image/Dockerfile @@ -0,0 +1,20 @@ +# https://github.com/buildkite/agent/blob/master/packaging/docker/ubuntu-linux/Dockerfile +FROM totvslabs/pycarol:2.30.0 + +ENV LANG "en_US.UTF-8" +ENV LANGUAGE "en_US.UTF-8" +ENV LC_ALL "en_US.UTF-8" +ENV PATH="/tmp/sonar-scanner-4.0.0.1744-linux/bin:${PATH}" + +COPY requirements* /src/ +WORKDIR /src + +RUN set -x &&\ + curl --insecure -o /tmp/sonarscanner.zip -L https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.0.0.1744-linux.zip &&\ + unzip /tmp/sonarscanner.zip -d /tmp &&\ + rm /tmp/sonarscanner.zip && \ + pip install -r requirements-dev.txt + +VOLUME [ "/src" ] + + diff --git a/batch_carolapp/docs/Makefile b/batch_carolapp/docs/Makefile new file mode 100644 index 0000000..f828634 --- /dev/null +++ b/batch_carolapp/docs/Makefile @@ -0,0 +1,153 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/sample.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/sample.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/sample" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/sample" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/batch_carolapp/docs/conf.py b/batch_carolapp/docs/conf.py new file mode 100644 index 0000000..ac03bd0 --- /dev/null +++ b/batch_carolapp/docs/conf.py @@ -0,0 +1,242 @@ +# -*- coding: utf-8 -*- +# +# sample documentation build configuration file, created by +# sphinx-quickstart on Mon Apr 16 21:22:43 2012. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'sample' +copyright = u'2012, Kenneth Reitz' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = 'v0.0.1' +# The full version, including alpha/beta/rc tags. +release = 'v0.0.1' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'sampledoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'sample.tex', u'sample Documentation', + u'Kenneth Reitz', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'sample', u'sample Documentation', + [u'Kenneth Reitz'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'sample', u'sample Documentation', + u'Kenneth Reitz', 'sample', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' diff --git a/batch_carolapp/docs/index.rst b/batch_carolapp/docs/index.rst new file mode 100644 index 0000000..46f3fe8 --- /dev/null +++ b/batch_carolapp/docs/index.rst @@ -0,0 +1,22 @@ +.. sample documentation master file, created by + sphinx-quickstart on Mon Apr 16 21:22:43 2012. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to sample's documentation! +================================== + +Contents: + +.. toctree:: + :maxdepth: 2 + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/batch_carolapp/docs/make.bat b/batch_carolapp/docs/make.bat new file mode 100644 index 0000000..deed45a --- /dev/null +++ b/batch_carolapp/docs/make.bat @@ -0,0 +1,190 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set BUILDDIR=_build +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . +set I18NSPHINXOPTS=%SPHINXOPTS% . +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% + set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^` where ^ is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. singlehtml to make a single large HTML file + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. devhelp to make HTML files and a Devhelp project + echo. epub to make an epub + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. text to make text files + echo. man to make manual pages + echo. texinfo to make Texinfo files + echo. gettext to make PO message catalogs + echo. changes to make an overview over all changed/added/deprecated items + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end +) + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end +) + +if "%1" == "singlehtml" ( + %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in %BUILDDIR%/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in %BUILDDIR%/qthelp, like this: + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\sample.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\sample.ghc + goto end +) + +if "%1" == "devhelp" ( + %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. + goto end +) + +if "%1" == "epub" ( + %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The epub file is in %BUILDDIR%/epub. + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "text" ( + %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The text files are in %BUILDDIR%/text. + goto end +) + +if "%1" == "man" ( + %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The manual pages are in %BUILDDIR%/man. + goto end +) + +if "%1" == "texinfo" ( + %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. + goto end +) + +if "%1" == "gettext" ( + %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The message catalogs are in %BUILDDIR%/locale. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + if errorlevel 1 exit /b 1 + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + if errorlevel 1 exit /b 1 + echo. + echo.Link check complete; look for any errors in the above output ^ +or in %BUILDDIR%/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + if errorlevel 1 exit /b 1 + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in %BUILDDIR%/doctest/output.txt. + goto end +) + +:end diff --git a/batch_carolapp/pytest.ini b/batch_carolapp/pytest.ini new file mode 100644 index 0000000..be6378e --- /dev/null +++ b/batch_carolapp/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +testpaths = tests/ +python_files = test_*.py +addopts = -p no:warnings diff --git a/batch_carolapp/requirements-dev.txt b/batch_carolapp/requirements-dev.txt new file mode 100644 index 0000000..8d9923b --- /dev/null +++ b/batch_carolapp/requirements-dev.txt @@ -0,0 +1,10 @@ +--requirement requirements.txt +pytest +pytest-cov +nose +sphinx +pyreleaser +flake8 +autopep8 +isort +coverage diff --git a/batch_carolapp/requirements.txt b/batch_carolapp/requirements.txt new file mode 100644 index 0000000..60ef5a8 --- /dev/null +++ b/batch_carolapp/requirements.txt @@ -0,0 +1,2 @@ + +pycarol==2.30.0 diff --git a/batch_carolapp/tests/test_batch_carolapp_algorithm.py b/batch_carolapp/tests/test_batch_carolapp_algorithm.py new file mode 100644 index 0000000..e1a9512 --- /dev/null +++ b/batch_carolapp/tests/test_batch_carolapp_algorithm.py @@ -0,0 +1,26 @@ +""" +Test Suite for NLP_API +""" +import unittest +from unittest.mock import MagicMock, patch + +from cookiecutter.main import cookiecutter +import batch_carolapp +from batch_carolapp import batch_carolapp_algorithm + + +class TestBatchCarolappAlgorithm(unittest.TestCase): + def setUp(self): + """Setup all variables mocks and things for all test steps + """ + return super().setUp() + + def test_hello_world(self): + """Test the /api/hello_world endpoint + """ + self.assertEqual(2+2, 4) + + def tearDown(self): + """Undo all things setted up for those tests + """ + return super().tearDown() diff --git a/online-carolapp/README.md b/online-carolapp/README.md deleted file mode 100644 index 5608a9b..0000000 --- a/online-carolapp/README.md +++ /dev/null @@ -1,90 +0,0 @@ -Preparing the environment to run the application locally ---- - -No special preparation is needed. - - -Running the application locally ---- - -On the Python file with the endpoints (the one on the manifest file), uncomment the next line: - -``` -flask = OnlineApi('run_me').get_api() -``` - -The previous line is pointing the Python file that has the services. - -After, run the following command to start the server: - -``` -gunicorn -w 1 -b :5000 run_me:flask -``` - -These endpoints will be available for all Online Carol App: - -``` -http://localhost:5000/statusz -http://localhost:5000/logs -http://localhost:5000/healthz -``` - -Based on provided sample, these URLs will be available: - -``` -http://localhost:5000/api/hello_world -http://localhost:5000/api/predict -http://localhost:5000/api/sum?a=1&b=2 -``` - -Example how to call the endpoint `sum` (curl): - -``` -curl -X POST \ - http://localhost:5000/api/sum \ - -H 'cache-control: no-cache' \ - -H 'content-type: application/json' \ - -H 'postman-token: bd477bbd-d31d-5e85-1c67-7a2370a22f8e' \ - -d '{"a":"1","b":"2"}' -``` - -Running the application in Carol ---- - -You should create a Carol App and send the resource to Carol. - -After deployed the Carol App and started the service, the final URL will follow this structure: - -``` -http://wssp-sixthonlinecarolapp-1-0-0-sample/api/ -``` - -Understanding the Carol App's URL in Carol ---- - -- `wssp`: Tenant name. -- `sixthonlinecarolapp`: Carol app name. -- `1-0-0`: Carol app version. At the domain itt replaces `.` by `-`. On the path it keeps the `-`. -- `sample`: Algorithm name. -- `api`: Fixed string, used to group the services provided by this carol app. - -Ps.: in the near future, all requests will go through Carol (working as a proxy from external requests and the Carol App). - - -Additional information ---- - -All Online Carol App is being deployed on Google Cloud Platform. - -If you want to migrate to a different pyCarol version, change the docker image: - -- `ai/nlp_spacy:2.6.0`: it has the pyCarol version 2.6. -- `ai/nlp_spacy:2.4-online-request`: it has the pyCarol version 2.4 (`we are still making this docker image stable - use the previous one for now`). - -Both Carol App (Online/Batch) need pyCarol (https://github.com/totvslabs/pyCarol). -Python 3 is required for both Carol App (Online/Batch). - -Questions? ---- - -Send a message on `#carol-feedback` on Slack. diff --git a/online-carolapp/ai-script/gunicorn.conf.py b/online-carolapp/ai-script/gunicorn.conf.py deleted file mode 100644 index 005ecae..0000000 --- a/online-carolapp/ai-script/gunicorn.conf.py +++ /dev/null @@ -1,6 +0,0 @@ -print("Custom gunicorn config init!") - -workers = 8 -timeout = 120 - -print("Custom gunicorn config end!") diff --git a/online-carolapp/ai-script/manifest.json b/online-carolapp/ai-script/manifest.json deleted file mode 100644 index 79b694c..0000000 --- a/online-carolapp/ai-script/manifest.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "online": { - "processes": [ - { - "name": "sample001", - "algorithmName": "run_me", - "namespace": "", - "algorithmTitle": { - "pt-br": "Demo service", - "en-US": "Demo service" - }, - "algorithmDescription": { - "pt-br": "Basic algorithm", - "en-US": "Basic algorithm" - }, - "instanceProperties": { - "profile": "", - "properties": { - "dockerImage": "carol/base-online", - "flavor": "c1.medium" - }, - "environments": { - "EXAMPLE_ENV_1": "value_1", - "EXAMPLE_ENV_2": "value_2" - } - } - } - ] - } -} \ No newline at end of file diff --git a/online_carolapp/.buildkite/pipeline.yml b/online_carolapp/.buildkite/pipeline.yml new file mode 100644 index 0000000..e331756 --- /dev/null +++ b/online_carolapp/.buildkite/pipeline.yml @@ -0,0 +1,34 @@ +steps: + - label: ":docker: Build" + commands: + - echo "~~~ Build CI docker image" + - make build_ci + timeout_in_minutes: 20 + retry: + automatic: + - exit_status: -1 + limit: 1 + - exit_status: 255 + limit: 1 + - wait: ~ + - label: ":hammer: Tests" + commands: + - echo "~~~ Unit Tests" + - docker run -it --rm -e SONAR_TOKEN=${SONAR_TOKEN} -e BUILDKITE_BRANCH=${BUILDKITE_BRANCH} -e SONAR_URL=${SONAR_URL} -v ${PWD}:/src ci_image make test coverage code_scan + timeout_in_minutes: 20 + retry: + automatic: + - exit_status: -1 + limit: 1 + - exit_status: 255 + limit: 1 + - wait: ~ + - label: ":hammer: Lint" + commands: + - echo "~~~ Linting" + - docker run -it --rm -e SONAR_TOKEN=${SONAR_TOKEN} -e BUILDKITE_BRANCH=${BUILDKITE_BRANCH} -v ${PWD}:/src ci_image make lint + - wait: ~ + + - label: ":recycle: Clean up" + commands: + - docker rmi ci_image diff --git a/online_carolapp/.editorconfig b/online_carolapp/.editorconfig new file mode 100644 index 0000000..4ee6cd0 --- /dev/null +++ b/online_carolapp/.editorconfig @@ -0,0 +1,44 @@ +# https://editorconfig.org/ + +root = true + +[*] +indent_style = space +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true +end_of_line = lf +charset = utf-8 + +# Docstrings and comments use max_line_length = 79 +[*.py] +max_line_length = 119 + +# Use 2 spaces for the HTML files +[*.html] +indent_size = 2 + +# The JSON files contain newlines inconsistently +[*.json] +indent_size = 2 +insert_final_newline = ignore + +[**/admin/js/vendor/**] +indent_style = ignore +indent_size = ignore + +# Minified JavaScript files shouldn't be changed +[**.min.js] +indent_style = ignore +insert_final_newline = ignore + +# Makefiles always use tabs for indentation +[Makefile] +indent_style = tab + +# Batch files use tabs for indentation +[*.bat] +indent_style = tab + +[docs/**.txt] +max_line_length = 79 diff --git a/online_carolapp/Dockerfile b/online_carolapp/Dockerfile new file mode 100644 index 0000000..bccc80e --- /dev/null +++ b/online_carolapp/Dockerfile @@ -0,0 +1,17 @@ + +FROM totvslabs/pycarol:2.30.0 + +env SRCFOLDER=online_carolapp + +WORKDIR /app +ADD requirements.txt /app/ +ADD online_carolapp/ /app/online_carolapp/ + +RUN pip install -r requirements.txt && \ + pip install gunicorn + +EXPOSE 5000 + +VOLUME [ "/app" ] + +CMD ["gunicorn", "-c", "/app/online_carolapp/gunicorn.conf.py", "online_carolapp.alg_online_carolapp:application"] diff --git a/online_carolapp/Makefile b/online_carolapp/Makefile new file mode 100644 index 0000000..13fcd03 --- /dev/null +++ b/online_carolapp/Makefile @@ -0,0 +1,82 @@ +PYLINT = flake8 +PYLINTFLAGS = -rn +PYTHONFILES := $(wildcard *.py) +SRCFOLDER = online_carolapp +DOCKER_TAG = online_carolapp-alg_online_carolapp:0.1.0 + +ifeq ($(OS),Windows_NT) + OPEN := start +else + UNAME := $(shell uname -s) + ifeq ($(UNAME),Linux) + OPEN := xdg-open + endif + ifeq ($(UNAME),Darwin) + OPEN := open + endif +endif + +.PHONY: help + +help: ## Show this help message + @echo "online_carolapp Makefile help.\n" + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +init: ## Install all package dependencies + pip install -r requirements.txt + +test: ## Runs all project test suite, recording all test converage data + PYTHONPATH=${PWD}/${SRCFOLDER}:${PYTHONPATH} pytest --cov=${SRCFOLDER}/ tests/ + +coverage: ## Create XML and HTML Test coverare report. + coverage xml -o coverage-reports/coverage.xml + coverage3 html + +htmlcov: coverage ## Opens the current test coverage report on the default browser + $(OPEN) htmlcov/index.html + +clean: ## Cleans all temporary and preprocessed files + rm -rf dist + find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete + rm -rf htmlcov/* + +dev: ## Install all development packages dependencies + pip install -r requirements-dev.txt + +docs: ## Compile all package documentation in HTML format + $(MAKE) -C docs html +code_scan: ## Execute a Code Qualiry scan and send the data to SonarQube server + @echo "~~~ Code Quality Scan" + sonar-scanner -Dsonar.projectKey=online_carolapp-alg_online_carolapp -Dsonar.sources=${SRCFOLDER} -Dsonar.host.url=${SONAR_URL} -Dsonar.login=${SONAR_TOKEN} -Dsonar.branch.name=${BUILDKITE_BRANCH} -Dsonar.python.coverage.reportPaths="coverage-reports/coverage.xml" + +lint: ## Lint all code for best practicies + flake8 ./${SRCFOLDER} ./tests + +run: ## Runs the online app locally on http://localhost:5000 + # PYTHONPATH=${PWD}/${SRCFOLDER}:${PYTHONPATH} PYTHONUNBUFFERED=1 FLASK_DEBUG=1 gunicorn -w 1 -b :5000 ${SRCFOLDER}.alg_online_carolapp:application + PYTHONPATH=${PWD}/${SRCFOLDER}:${PYTHONPATH} PYTHONUNBUFFERED=1 FLASK_DEBUG=1 FLASK_ENV=development python ${SRCFOLDER}/alg_online_carolapp.py + +build_ci: ## Build CI Docker Image + docker build -f docker/ci_image/Dockerfile -t ci_image . + +venv: ## Create the virtualenv for this Carol App + python3 -m venv .venv + source .venv/bin/activate && pip install --upgrade pip + +all_tests: tests coverage code_scan ## Runs all test related tasks + +dist: clean ## Create the dist file to deploy on Carol + @mkdir dist + @mkdir dist/ai-script + @cp ${SRCFOLDER}/manifest.json dist/ai-script + @cd dist && zip -r online_carolapp.zip ai-script/* + +docker_image: ## Build online_carolapp-alg_online_carolapp:0.1.0 Carol app docker image + @docker build -t online_carolapp-alg_online_carolapp:0.1.0 . + +docker_run: ## Runs online_carolapp-alg_online_carolapp:0.1.0 Carol app docker image + @docker run --rm -it -p 5000:5000 online_carolapp-alg_online_carolapp:0.1.0 + +docker_run_dev: ## Runs online_carolapp-alg_online_carolapp:0.1.0 Carol app docker image in Development mode using local code + @docker run --rm -it --env PYTHONPATH=. --env PYTHONUNBUFFERED=1 --env FLASK_DEBUG=1 --env FLASK_ENV=development -p 127.0.0.1:5000:5000 -v ${PWD}:/app online_carolapp-alg_online_carolapp:0.1.0 python online_carolapp/alg_online_carolapp.py + diff --git a/online_carolapp/README.md b/online_carolapp/README.md new file mode 100644 index 0000000..afe3ca5 --- /dev/null +++ b/online_carolapp/README.md @@ -0,0 +1,111 @@ +# online-carolapp + +Carol App Boilerplate contains all the boilerplate you need to create a Carol App. + +## Preparing the environment to run the application locally + +* Check if your are running Python 3.6+ ``python --version`` +* Install a virtualenv by running ``make venv`` +* Activate your new Python Virtual Env: ``source .venv/bin/activate`` +* Install all development required libs using: ``make dev`` + +## Running the application locally + +You can run the online-carolapp Carol App in two ways + +```shell +make run +``` + +Or your can use online-carolapp Carol App docker image to run your code locally + +```shell +make docker_image +make docker_run_dev +``` + +These endpoints will be available for all Online Carol App: + + + + + +Based on provided sample, these URLs will be available: + + + + +Example how to call the endpoint `sum` (curl): + +```shell +curl -X POST \ + http://localhost:5000/api/sum \ + -H 'cache-control: no-cache' \ + -H 'content-type: application/json' \ + -H 'postman-token: bd477bbd-d31d-5e85-1c67-7a2370a22f8e' \ + -d '{"a":"1","b":"2"}' +``` + +## Testing + +This Carol App contains all libraries necessary to create and run tests. + +All tests have to be hosted on test/ folder. + +To run your test suite: + +```shell +make test +``` + +To check the Carol App Test coverage: + +```shell +make htmlcov +``` + +## CI/CD + +This Carol App is ready to run in any [Buildkite](https://buildkite.com) pipeline. Check the [.buildkite/pipeline.yml](.buildkite/pipeline.yml) + +## Running the application in Carol + +You should create a Carol App and send the resource to Carol. + +After deployed the Carol App and started the service, the final URL will follow this structure: + + + +### Understanding the Carol App's URL in Carol + +* `wssp`: Tenant name. +* `online_carolapp`: Carol app name. +* `0-1-0`: Carol app version. At the domain itt replaces `.` by `-`. On the path it keeps the `-`. +* `alg_online_carolapp`: Algorithm name. +* `api`: Fixed string, used to group the services provided by this carol app. + +Ps.: in the near future, all requests will go through Carol (working as a proxy from external requests and the Carol App). + +## Additional information + +All Online Carol App is being deployed on Google Cloud Platform. + +Both Carol App (Online/Batch) need [pyCarol](https://github.com/totvslabs/pyCarol). +Python 3 is required for both Carol App (Online/Batch). + +To change the pyCarol version to use, change the requirements.txt file and the Dockerfile. + +## Questions + +Send a message on `#carol-feedback` on Slack. + + +## Contributing + +Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. + +Important, make sure to update tests as appropriate. + +## License + +[Proprietary](LICENSE) diff --git a/online_carolapp/docker/ci_image/Dockerfile b/online_carolapp/docker/ci_image/Dockerfile new file mode 100644 index 0000000..18d7fa3 --- /dev/null +++ b/online_carolapp/docker/ci_image/Dockerfile @@ -0,0 +1,20 @@ +# https://github.com/buildkite/agent/blob/master/packaging/docker/ubuntu-linux/Dockerfile +FROM totvslabs/pycarol + +ENV LANG "en_US.UTF-8" +ENV LANGUAGE "en_US.UTF-8" +ENV LC_ALL "en_US.UTF-8" +ENV PATH="/tmp/sonar-scanner-4.0.0.1744-linux/bin:${PATH}" + +COPY requirements* /src/ +WORKDIR /src + +RUN set -x &&\ + curl --insecure -o /tmp/sonarscanner.zip -L https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.0.0.1744-linux.zip &&\ + unzip /tmp/sonarscanner.zip -d /tmp &&\ + rm /tmp/sonarscanner.zip && \ + pip install -r requirements-dev.txt + +VOLUME [ "/src" ] + + diff --git a/online_carolapp/docs/Makefile b/online_carolapp/docs/Makefile new file mode 100644 index 0000000..f828634 --- /dev/null +++ b/online_carolapp/docs/Makefile @@ -0,0 +1,153 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/sample.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/sample.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/sample" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/sample" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/online_carolapp/docs/conf.py b/online_carolapp/docs/conf.py new file mode 100644 index 0000000..ac03bd0 --- /dev/null +++ b/online_carolapp/docs/conf.py @@ -0,0 +1,242 @@ +# -*- coding: utf-8 -*- +# +# sample documentation build configuration file, created by +# sphinx-quickstart on Mon Apr 16 21:22:43 2012. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'sample' +copyright = u'2012, Kenneth Reitz' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = 'v0.0.1' +# The full version, including alpha/beta/rc tags. +release = 'v0.0.1' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'sampledoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'sample.tex', u'sample Documentation', + u'Kenneth Reitz', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'sample', u'sample Documentation', + [u'Kenneth Reitz'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'sample', u'sample Documentation', + u'Kenneth Reitz', 'sample', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' diff --git a/online_carolapp/docs/index.rst b/online_carolapp/docs/index.rst new file mode 100644 index 0000000..46f3fe8 --- /dev/null +++ b/online_carolapp/docs/index.rst @@ -0,0 +1,22 @@ +.. sample documentation master file, created by + sphinx-quickstart on Mon Apr 16 21:22:43 2012. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to sample's documentation! +================================== + +Contents: + +.. toctree:: + :maxdepth: 2 + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/online_carolapp/docs/make.bat b/online_carolapp/docs/make.bat new file mode 100644 index 0000000..deed45a --- /dev/null +++ b/online_carolapp/docs/make.bat @@ -0,0 +1,190 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set BUILDDIR=_build +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . +set I18NSPHINXOPTS=%SPHINXOPTS% . +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% + set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^` where ^ is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. singlehtml to make a single large HTML file + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. devhelp to make HTML files and a Devhelp project + echo. epub to make an epub + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. text to make text files + echo. man to make manual pages + echo. texinfo to make Texinfo files + echo. gettext to make PO message catalogs + echo. changes to make an overview over all changed/added/deprecated items + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end +) + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end +) + +if "%1" == "singlehtml" ( + %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in %BUILDDIR%/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in %BUILDDIR%/qthelp, like this: + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\sample.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\sample.ghc + goto end +) + +if "%1" == "devhelp" ( + %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. + goto end +) + +if "%1" == "epub" ( + %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The epub file is in %BUILDDIR%/epub. + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "text" ( + %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The text files are in %BUILDDIR%/text. + goto end +) + +if "%1" == "man" ( + %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The manual pages are in %BUILDDIR%/man. + goto end +) + +if "%1" == "texinfo" ( + %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. + goto end +) + +if "%1" == "gettext" ( + %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The message catalogs are in %BUILDDIR%/locale. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + if errorlevel 1 exit /b 1 + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + if errorlevel 1 exit /b 1 + echo. + echo.Link check complete; look for any errors in the above output ^ +or in %BUILDDIR%/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + if errorlevel 1 exit /b 1 + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in %BUILDDIR%/doctest/output.txt. + goto end +) + +:end diff --git a/online_carolapp/online_carolapp/__init__.py b/online_carolapp/online_carolapp/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/online-carolapp/ai-script/run_me.py b/online_carolapp/online_carolapp/alg_online_carolapp.py similarity index 52% rename from online-carolapp/ai-script/run_me.py rename to online_carolapp/online_carolapp/alg_online_carolapp.py index 34d18a3..c1ced76 100755 --- a/online-carolapp/ai-script/run_me.py +++ b/online_carolapp/online_carolapp/alg_online_carolapp.py @@ -1,12 +1,10 @@ import sys import json -import numpy as np -import luigi import random from pycarol.app.online import Online -from pycarol.app.online_api import OnlineApi -from pycarol.app.online_api import request +from pycarol.app.online_api import OnlineApi, request + online = Online() @@ -17,25 +15,18 @@ def hello_world(): } return message -@online.route("predict") -def predict(): - result = { - 'score': random.randint(1,9) - } - return result - @online.route("sum") def sum(): total = 0; print(request) - param = request.values + param = request.json - if (param != None): + if(param != None): for key in param: try: total += float(param[key]) - except RuntimeError: + except Exception: pass result = { @@ -43,5 +34,15 @@ def sum(): } return result -#To run the application locally, uncomment the next line -application = OnlineApi('run_me').get_api() + +application = OnlineApi('alg_online_carolapp', 'online_carolapp.').get_api() + + +def main(): + """Runs from command prompt + """ + if __name__ == "__main__": + application.run(debug=True, host='0.0.0.0') + + +main() diff --git a/online_carolapp/online_carolapp/gunicorn.conf.py b/online_carolapp/online_carolapp/gunicorn.conf.py new file mode 100644 index 0000000..01efb2d --- /dev/null +++ b/online_carolapp/online_carolapp/gunicorn.conf.py @@ -0,0 +1,3 @@ +workers = 4 +timeout = 120 +bind = "0.0.0.0:5000" diff --git a/online_carolapp/online_carolapp/manifest.json b/online_carolapp/online_carolapp/manifest.json new file mode 100644 index 0000000..1e33522 --- /dev/null +++ b/online_carolapp/online_carolapp/manifest.json @@ -0,0 +1,24 @@ +{ + "online": { + "processes": [ + { + "name": "online_carolapp", + "algorithmName": "alg_online_carolapp", + "namespace": "", + "algorithmTitle": { + "en-US": "Algorithm Description", + "pt-BR": "Descrição do Algoritmo" + }, + "algorithmDescription": { + "en-US": "Carol App Boilerplate contains all the boilerplate you need to create a Carol App." + }, + "instanceProperties": { + "properties": { + "dockerImage": "carol/online_carolapp:0.1.0:latest", + "flavor": "c1.nano" + } + } + } + ] + } +} diff --git a/online_carolapp/pytest.ini b/online_carolapp/pytest.ini new file mode 100644 index 0000000..be6378e --- /dev/null +++ b/online_carolapp/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +testpaths = tests/ +python_files = test_*.py +addopts = -p no:warnings diff --git a/online_carolapp/requirements-dev.txt b/online_carolapp/requirements-dev.txt new file mode 100644 index 0000000..8d9923b --- /dev/null +++ b/online_carolapp/requirements-dev.txt @@ -0,0 +1,10 @@ +--requirement requirements.txt +pytest +pytest-cov +nose +sphinx +pyreleaser +flake8 +autopep8 +isort +coverage diff --git a/online_carolapp/requirements.txt b/online_carolapp/requirements.txt new file mode 100644 index 0000000..60ef5a8 --- /dev/null +++ b/online_carolapp/requirements.txt @@ -0,0 +1,2 @@ + +pycarol==2.30.0 diff --git a/online_carolapp/tests/__init__.py b/online_carolapp/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/online_carolapp/tests/test_alg_online_carolapp.py b/online_carolapp/tests/test_alg_online_carolapp.py new file mode 100644 index 0000000..ed46e22 --- /dev/null +++ b/online_carolapp/tests/test_alg_online_carolapp.py @@ -0,0 +1,49 @@ +""" +Test Suite for alg_online_carolapp +""" +import unittest +from pycarol.app.online_request import OnlineRequest +from unittest.mock import MagicMock, patch + +import src +from src import alg_online_carolapp + + +class TestAlgOnlineCarolapp(unittest.TestCase): + def setUp(self): + """Setup all variables mocks and things for all test steps + """ + return super().setUp() + + def test_hello_world(self): + """Test the /api/hello_world endpoint + """ + return_value = alg_online_carolapp.hello_world() + self.assertDictEqual(return_value, {'message': 'Hello World'}) + + def test_sum(self): + """Test the /api/sum endpoint + """ + alg_online_carolapp.request = OnlineRequest(json={'a': 1,'b': 2}) + return_value = alg_online_carolapp.sum() + self.assertEqual(return_value, {'sum': 3}) + + def test_sum_error(self): + """Test the /api/sum endpoint with error + """ + alg_online_carolapp.request = OnlineRequest(json={'a': 'b'}) + return_value = alg_online_carolapp.sum() + self.assertEqual(return_value, {'sum': 0}) + + def test_main(self): + """Test if OnLineAPI is executed correctly + """ + with patch.object(alg_online_carolapp, "__name__", "__main__"): + alg_online_carolapp.application.run = MagicMock() + alg_online_carolapp.main() + alg_online_carolapp.application.run.assert_called_with(debug=True, host='0.0.0.0') + + def tearDown(self): + """Undo all things setted up for those tests + """ + return super().tearDown() diff --git a/web-carolapp/README.md b/web-carolapp/README.md deleted file mode 100644 index b60946c..0000000 --- a/web-carolapp/README.md +++ /dev/null @@ -1,35 +0,0 @@ -Running the application locally ---- - -It has no special steps to run it locally. In case you don't have the right tools to start a simple web server, you can try the one Python provides: - -Python 3: - -``` -python3 -m http.server -``` - -Python 2: - -``` -python -m SimpleHTTPServer -``` - - - -Running the application in Carol ---- - -It is recommended to upload the minified application to Carol. If you are using Angular, we strongly recommend sending only the production version (`ng build`). - - -Additional information ---- - -We provide an Angular sample application using T-Faces: https://github.com/totvslabs/carolapp-std-tface. - - -Questions? ---- - -Send a message on `#carol-feedback` on Slack. diff --git a/web-carolapp/site/NunitoSans-Bold.51066f4d1d33630cd761.ttf b/web-carolapp/site/NunitoSans-Bold.51066f4d1d33630cd761.ttf deleted file mode 100644 index a3ca4b6..0000000 Binary files a/web-carolapp/site/NunitoSans-Bold.51066f4d1d33630cd761.ttf and /dev/null differ diff --git a/web-carolapp/site/NunitoSans-ExtraLight.bc36a8726e20804a94da.ttf b/web-carolapp/site/NunitoSans-ExtraLight.bc36a8726e20804a94da.ttf deleted file mode 100644 index 2ad4ac0..0000000 Binary files a/web-carolapp/site/NunitoSans-ExtraLight.bc36a8726e20804a94da.ttf and /dev/null differ diff --git a/web-carolapp/site/NunitoSans-Regular.fb98ed1700e8dfaf0764.ttf b/web-carolapp/site/NunitoSans-Regular.fb98ed1700e8dfaf0764.ttf deleted file mode 100644 index 9abe932..0000000 Binary files a/web-carolapp/site/NunitoSans-Regular.fb98ed1700e8dfaf0764.ttf and /dev/null differ diff --git a/web-carolapp/site/TotvsIcon.1642008454153acd9ef7.svg b/web-carolapp/site/TotvsIcon.1642008454153acd9ef7.svg deleted file mode 100644 index 809b6e4..0000000 --- a/web-carolapp/site/TotvsIcon.1642008454153acd9ef7.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/web-carolapp/site/TotvsIcon.4e1607e6f3f53fbb5e01.woff b/web-carolapp/site/TotvsIcon.4e1607e6f3f53fbb5e01.woff deleted file mode 100644 index 4d64ed9..0000000 Binary files a/web-carolapp/site/TotvsIcon.4e1607e6f3f53fbb5e01.woff and /dev/null differ diff --git a/web-carolapp/site/TotvsIcon.683aa55aa3feb2d437b7.ttf b/web-carolapp/site/TotvsIcon.683aa55aa3feb2d437b7.ttf deleted file mode 100644 index 2860fca..0000000 Binary files a/web-carolapp/site/TotvsIcon.683aa55aa3feb2d437b7.ttf and /dev/null differ diff --git a/web-carolapp/site/TotvsIcon.ab04e6bef307c5a4847d.eot b/web-carolapp/site/TotvsIcon.ab04e6bef307c5a4847d.eot deleted file mode 100644 index 4accf80..0000000 Binary files a/web-carolapp/site/TotvsIcon.ab04e6bef307c5a4847d.eot and /dev/null differ diff --git a/web-carolapp/site/assets/arrows/arrow-down.png b/web-carolapp/site/assets/arrows/arrow-down.png deleted file mode 100644 index 2997c7d..0000000 Binary files a/web-carolapp/site/assets/arrows/arrow-down.png and /dev/null differ diff --git a/web-carolapp/site/assets/arrows/arrow-up.png b/web-carolapp/site/assets/arrows/arrow-up.png deleted file mode 100644 index dae11f1..0000000 Binary files a/web-carolapp/site/assets/arrows/arrow-up.png and /dev/null differ diff --git a/web-carolapp/site/assets/arrows/arrow-zero.png b/web-carolapp/site/assets/arrows/arrow-zero.png deleted file mode 100644 index 61d0ea5..0000000 Binary files a/web-carolapp/site/assets/arrows/arrow-zero.png and /dev/null differ diff --git a/web-carolapp/site/assets/campaigns.png b/web-carolapp/site/assets/campaigns.png deleted file mode 100644 index 6e06087..0000000 Binary files a/web-carolapp/site/assets/campaigns.png and /dev/null differ diff --git a/web-carolapp/site/assets/face.png b/web-carolapp/site/assets/face.png deleted file mode 100644 index 1438446..0000000 Binary files a/web-carolapp/site/assets/face.png and /dev/null differ diff --git a/web-carolapp/site/assets/flags/EN.png b/web-carolapp/site/assets/flags/EN.png deleted file mode 100644 index 9966ad2..0000000 Binary files a/web-carolapp/site/assets/flags/EN.png and /dev/null differ diff --git a/web-carolapp/site/assets/flags/PT.png b/web-carolapp/site/assets/flags/PT.png deleted file mode 100644 index 0480786..0000000 Binary files a/web-carolapp/site/assets/flags/PT.png and /dev/null differ diff --git a/web-carolapp/site/assets/flags/china.png b/web-carolapp/site/assets/flags/china.png deleted file mode 100644 index b8a8a42..0000000 Binary files a/web-carolapp/site/assets/flags/china.png and /dev/null differ diff --git a/web-carolapp/site/assets/flags/en-uk.png b/web-carolapp/site/assets/flags/en-uk.png deleted file mode 100644 index dcdea70..0000000 Binary files a/web-carolapp/site/assets/flags/en-uk.png and /dev/null differ diff --git a/web-carolapp/site/assets/flags/spain.png b/web-carolapp/site/assets/flags/spain.png deleted file mode 100644 index a4b3da3..0000000 Binary files a/web-carolapp/site/assets/flags/spain.png and /dev/null differ diff --git a/web-carolapp/site/assets/general.png b/web-carolapp/site/assets/general.png deleted file mode 100644 index 2335bef..0000000 Binary files a/web-carolapp/site/assets/general.png and /dev/null differ diff --git a/web-carolapp/site/assets/icon.png b/web-carolapp/site/assets/icon.png deleted file mode 100644 index 7595842..0000000 Binary files a/web-carolapp/site/assets/icon.png and /dev/null differ diff --git a/web-carolapp/site/assets/images/order-ascending.svg b/web-carolapp/site/assets/images/order-ascending.svg deleted file mode 100644 index d9dc227..0000000 --- a/web-carolapp/site/assets/images/order-ascending.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/web-carolapp/site/assets/images/order-descending.svg b/web-carolapp/site/assets/images/order-descending.svg deleted file mode 100644 index 8708866..0000000 --- a/web-carolapp/site/assets/images/order-descending.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/web-carolapp/site/assets/images/order-unselected.svg b/web-carolapp/site/assets/images/order-unselected.svg deleted file mode 100644 index e355cf7..0000000 --- a/web-carolapp/site/assets/images/order-unselected.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/web-carolapp/site/assets/images/totvs-loading-icon.svg b/web-carolapp/site/assets/images/totvs-loading-icon.svg deleted file mode 100644 index c83e2ee..0000000 --- a/web-carolapp/site/assets/images/totvs-loading-icon.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/web-carolapp/site/assets/images/totvs-logo-grey.svg b/web-carolapp/site/assets/images/totvs-logo-grey.svg deleted file mode 100644 index 7ca429e..0000000 --- a/web-carolapp/site/assets/images/totvs-logo-grey.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - icon/logo/totvs/grey - Created with Sketch. - - - - - - - \ No newline at end of file diff --git a/web-carolapp/site/assets/images/totvs-logo-menu.svg b/web-carolapp/site/assets/images/totvs-logo-menu.svg deleted file mode 100644 index 71c8d18..0000000 --- a/web-carolapp/site/assets/images/totvs-logo-menu.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/web-carolapp/site/assets/logo.png b/web-carolapp/site/assets/logo.png deleted file mode 100644 index 2ab5a3b..0000000 Binary files a/web-carolapp/site/assets/logo.png and /dev/null differ diff --git a/web-carolapp/site/assets/zoom.png b/web-carolapp/site/assets/zoom.png deleted file mode 100644 index 17ee6d4..0000000 Binary files a/web-carolapp/site/assets/zoom.png and /dev/null differ diff --git a/web-carolapp/site/favicon.ico b/web-carolapp/site/favicon.ico deleted file mode 100644 index 767a400..0000000 Binary files a/web-carolapp/site/favicon.ico and /dev/null differ diff --git a/web-carolapp/site/index.html b/web-carolapp/site/index.html deleted file mode 100644 index 5d5bf9f..0000000 --- a/web-carolapp/site/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - Demo Carol App - - - - - - - - - diff --git a/web-carolapp/site/inline.bundle.js b/web-carolapp/site/inline.bundle.js deleted file mode 100644 index c162cca..0000000 --- a/web-carolapp/site/inline.bundle.js +++ /dev/null @@ -1,151 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // install a JSONP callback for chunk loading -/******/ var parentJsonpFunction = window["webpackJsonp"]; -/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) { -/******/ // add "moreModules" to the modules object, -/******/ // then flag all "chunkIds" as loaded and fire callback -/******/ var moduleId, chunkId, i = 0, resolves = [], result; -/******/ for(;i < chunkIds.length; i++) { -/******/ chunkId = chunkIds[i]; -/******/ if(installedChunks[chunkId]) { -/******/ resolves.push(installedChunks[chunkId][0]); -/******/ } -/******/ installedChunks[chunkId] = 0; -/******/ } -/******/ for(moduleId in moreModules) { -/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { -/******/ modules[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules); -/******/ while(resolves.length) { -/******/ resolves.shift()(); -/******/ } -/******/ if(executeModules) { -/******/ for(i=0; i < executeModules.length; i++) { -/******/ result = __webpack_require__(__webpack_require__.s = executeModules[i]); -/******/ } -/******/ } -/******/ return result; -/******/ }; -/******/ -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // objects to store loaded and loading chunks -/******/ var installedChunks = { -/******/ "inline": 0 -/******/ }; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ // This file contains only the entry chunk. -/******/ // The chunk loading function for additional chunks -/******/ __webpack_require__.e = function requireEnsure(chunkId) { -/******/ var installedChunkData = installedChunks[chunkId]; -/******/ if(installedChunkData === 0) { -/******/ return new Promise(function(resolve) { resolve(); }); -/******/ } -/******/ -/******/ // a Promise means "currently loading". -/******/ if(installedChunkData) { -/******/ return installedChunkData[2]; -/******/ } -/******/ -/******/ // setup Promise in chunk cache -/******/ var promise = new Promise(function(resolve, reject) { -/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; -/******/ }); -/******/ installedChunkData[2] = promise; -/******/ -/******/ // start chunk loading -/******/ var head = document.getElementsByTagName('head')[0]; -/******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; -/******/ script.charset = 'utf-8'; -/******/ script.async = true; -/******/ script.timeout = 120000; -/******/ -/******/ if (__webpack_require__.nc) { -/******/ script.setAttribute("nonce", __webpack_require__.nc); -/******/ } -/******/ script.src = __webpack_require__.p + "" + chunkId + ".chunk.js"; -/******/ var timeout = setTimeout(onScriptComplete, 120000); -/******/ script.onerror = script.onload = onScriptComplete; -/******/ function onScriptComplete() { -/******/ // avoid mem leaks in IE. -/******/ script.onerror = script.onload = null; -/******/ clearTimeout(timeout); -/******/ var chunk = installedChunks[chunkId]; -/******/ if(chunk !== 0) { -/******/ if(chunk) { -/******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.')); -/******/ } -/******/ installedChunks[chunkId] = undefined; -/******/ } -/******/ }; -/******/ head.appendChild(script); -/******/ -/******/ return promise; -/******/ }; -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // on error function for async loading -/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; -/******/ }) -/************************************************************************/ -/******/ ([]); -//# sourceMappingURL=inline.bundle.js.map \ No newline at end of file diff --git a/web-carolapp/site/inline.bundle.js.map b/web-carolapp/site/inline.bundle.js.map deleted file mode 100644 index 5130986..0000000 --- a/web-carolapp/site/inline.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack/bootstrap eb19adca2df6a9c1376e"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAA0C,WAAW,EAAE;AACvD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA,kDAA0C,oBAAoB,WAAW","file":"inline.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t\"inline\": 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData === 0) {\n \t\t\treturn new Promise(function(resolve) { resolve(); });\n \t\t}\n\n \t\t// a Promise means \"currently loading\".\n \t\tif(installedChunkData) {\n \t\t\treturn installedChunkData[2];\n \t\t}\n\n \t\t// setup Promise in chunk cache\n \t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t});\n \t\tinstalledChunkData[2] = promise;\n\n \t\t// start chunk loading\n \t\tvar head = document.getElementsByTagName('head')[0];\n \t\tvar script = document.createElement('script');\n \t\tscript.type = 'text/javascript';\n \t\tscript.charset = 'utf-8';\n \t\tscript.async = true;\n \t\tscript.timeout = 120000;\n\n \t\tif (__webpack_require__.nc) {\n \t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t}\n \t\tscript.src = __webpack_require__.p + \"\" + chunkId + \".chunk.js\";\n \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n \t\tscript.onerror = script.onload = onScriptComplete;\n \t\tfunction onScriptComplete() {\n \t\t\t// avoid mem leaks in IE.\n \t\t\tscript.onerror = script.onload = null;\n \t\t\tclearTimeout(timeout);\n \t\t\tvar chunk = installedChunks[chunkId];\n \t\t\tif(chunk !== 0) {\n \t\t\t\tif(chunk) {\n \t\t\t\t\tchunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n \t\t\t\t}\n \t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t}\n \t\t};\n \t\thead.appendChild(script);\n\n \t\treturn promise;\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap eb19adca2df6a9c1376e"],"sourceRoot":"webpack:///"} \ No newline at end of file diff --git a/web-carolapp/site/main.bundle.js b/web-carolapp/site/main.bundle.js deleted file mode 100644 index 57e8a08..0000000 --- a/web-carolapp/site/main.bundle.js +++ /dev/null @@ -1,2555 +0,0 @@ -webpackJsonp(["main"],{ - -/***/ "../../../../../src/$$_lazy_route_resource lazy recursive": -/***/ (function(module, exports) { - -function webpackEmptyAsyncContext(req) { - // Here Promise.resolve().then() is used instead of new Promise() to prevent - // uncatched exception popping up in devtools - return Promise.resolve().then(function() { - throw new Error("Cannot find module '" + req + "'."); - }); -} -webpackEmptyAsyncContext.keys = function() { return []; }; -webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext; -module.exports = webpackEmptyAsyncContext; -webpackEmptyAsyncContext.id = "../../../../../src/$$_lazy_route_resource lazy recursive"; - -/***/ }), - -/***/ "../../../../../src/app/app.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, "", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/app.component.html": -/***/ (function(module, exports) { - -module.exports = "\n" - -/***/ }), - -/***/ "../../../../../src/app/app.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var AppComponent = /** @class */ (function () { - function AppComponent() { - } - AppComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - selector: 'app-root', - template: __webpack_require__("../../../../../src/app/app.component.html"), - styles: [__webpack_require__("../../../../../src/app/app.component.css")] - }), - __metadata("design:paramtypes", []) - ], AppComponent); - return AppComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/app.module.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__("../../../platform-browser/esm5/platform-browser.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser_animations__ = __webpack_require__("../../../platform-browser/esm5/animations.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__app_routing__ = __webpack_require__("../../../../../src/app/app.routing.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__app_component__ = __webpack_require__("../../../../../src/app/app.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__progress_kendo_angular_charts__ = __webpack_require__("../../../../@progress/kendo-angular-charts/dist/es/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__totvs_thf_ui__ = __webpack_require__("../../../../@totvs/thf-ui/index.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__components_result_box_result_box_component__ = __webpack_require__("../../../../../src/app/components/result-box/result-box.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__components_card_card_component__ = __webpack_require__("../../../../../src/app/components/card/card.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__components_toolbar_toolbar_component__ = __webpack_require__("../../../../../src/app/components/toolbar/toolbar.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__components_container_container_component__ = __webpack_require__("../../../../../src/app/components/container/container.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__components_percentage_result_percentage_result_component__ = __webpack_require__("../../../../../src/app/components/percentage-result/percentage-result.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__pages_login_login_component__ = __webpack_require__("../../../../../src/app/pages/login/login.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__services_i18n_service__ = __webpack_require__("../../../../../src/app/services/i18n.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__services_http_requests_service__ = __webpack_require__("../../../../../src/app/services/http-requests.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__services_auth_service__ = __webpack_require__("../../../../../src/app/services/auth.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__pages_main_main_page_component__ = __webpack_require__("../../../../../src/app/pages/main/main-page.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__services_carol_querys_main_page_service__ = __webpack_require__("../../../../../src/app/services/carol-querys/main-page.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__components_result_box_group_result_box_group_component__ = __webpack_require__("../../../../../src/app/components/result-box-group/result-box-group.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__pages_campaigns_campaigns_page_component__ = __webpack_require__("../../../../../src/app/pages/campaigns/campaigns-page.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__components_bullet_charts_bullet_charts_component__ = __webpack_require__("../../../../../src/app/components/bullet-charts/bullet-charts.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__services_auth_guard_service__ = __webpack_require__("../../../../../src/app/services/auth-guard.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__services_auth_interceptor_service__ = __webpack_require__("../../../../../src/app/services/auth-interceptor.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__pages_campaign_detail_campaign_detail_page_component__ = __webpack_require__("../../../../../src/app/pages/campaign-detail/campaign-detail-page.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__pages_product_detail_product_detail_page_component__ = __webpack_require__("../../../../../src/app/pages/product-detail/product-detail-page.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__components_loading_loading_component__ = __webpack_require__("../../../../../src/app/components/loading/loading.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__services_auth_guard_login_service__ = __webpack_require__("../../../../../src/app/services/auth-guard-login.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__services_carol_querys_toolbar_search_service__ = __webpack_require__("../../../../../src/app/services/carol-querys/toolbar-search.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__components_chart_chart_component__ = __webpack_require__("../../../../../src/app/components/chart/chart.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__components_chart_pie_chart_pie_component__ = __webpack_require__("../../../../../src/app/components/chart-pie/chart-pie.component.ts"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -var AppModule = /** @class */ (function () { - function AppModule() { - } - AppModule = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_2__angular_core__["J" /* NgModule */])({ - declarations: [ - __WEBPACK_IMPORTED_MODULE_7__app_component__["a" /* AppComponent */], - __WEBPACK_IMPORTED_MODULE_19__pages_main_main_page_component__["a" /* MainPageComponent */], - __WEBPACK_IMPORTED_MODULE_11__components_card_card_component__["a" /* CardComponent */], - __WEBPACK_IMPORTED_MODULE_13__components_container_container_component__["a" /* ContainerComponent */], - __WEBPACK_IMPORTED_MODULE_14__components_percentage_result_percentage_result_component__["a" /* PercentageResultComponent */], - __WEBPACK_IMPORTED_MODULE_10__components_result_box_result_box_component__["a" /* ResultBoxComponent */], - __WEBPACK_IMPORTED_MODULE_12__components_toolbar_toolbar_component__["a" /* ToolbarComponent */], - __WEBPACK_IMPORTED_MODULE_15__pages_login_login_component__["a" /* LoginComponent */], - __WEBPACK_IMPORTED_MODULE_21__components_result_box_group_result_box_group_component__["a" /* ResultBoxGroupComponent */], - __WEBPACK_IMPORTED_MODULE_22__pages_campaigns_campaigns_page_component__["a" /* CampaignsPageComponent */], - __WEBPACK_IMPORTED_MODULE_23__components_bullet_charts_bullet_charts_component__["a" /* BulletChartsComponent */], - __WEBPACK_IMPORTED_MODULE_26__pages_campaign_detail_campaign_detail_page_component__["a" /* CampaignDetailPageComponent */], - __WEBPACK_IMPORTED_MODULE_27__pages_product_detail_product_detail_page_component__["a" /* ProductDetailPageComponent */], - __WEBPACK_IMPORTED_MODULE_28__components_loading_loading_component__["a" /* LoadingComponent */], - __WEBPACK_IMPORTED_MODULE_31__components_chart_chart_component__["a" /* ChartComponent */], - __WEBPACK_IMPORTED_MODULE_32__components_chart_pie_chart_pie_component__["a" /* ChartPieComponent */] - ], - imports: [ - __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__["a" /* BrowserModule */], - __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser_animations__["a" /* BrowserAnimationsModule */], - __WEBPACK_IMPORTED_MODULE_3__angular_common__["b" /* CommonModule */], - __WEBPACK_IMPORTED_MODULE_4__angular_forms__["d" /* FormsModule */], - __WEBPACK_IMPORTED_MODULE_9__totvs_thf_ui__["a" /* ThfModule */], - __WEBPACK_IMPORTED_MODULE_8__progress_kendo_angular_charts__["b" /* ChartsModule */], - __WEBPACK_IMPORTED_MODULE_5__angular_common_http__["c" /* HttpClientModule */], - __WEBPACK_IMPORTED_MODULE_6__app_routing__["a" /* routing */] - ], - providers: [ - __WEBPACK_IMPORTED_MODULE_18__services_auth_service__["a" /* AuthService */], - __WEBPACK_IMPORTED_MODULE_24__services_auth_guard_service__["a" /* AuthGuard */], - __WEBPACK_IMPORTED_MODULE_29__services_auth_guard_login_service__["a" /* AuthGuardLogin */], - __WEBPACK_IMPORTED_MODULE_17__services_http_requests_service__["a" /* HttpRequestsService */], - __WEBPACK_IMPORTED_MODULE_20__services_carol_querys_main_page_service__["a" /* MainPageService */], - __WEBPACK_IMPORTED_MODULE_30__services_carol_querys_toolbar_search_service__["a" /* ToolbarSearchService */], - __WEBPACK_IMPORTED_MODULE_16__services_i18n_service__["a" /* I18nService */], - { - provide: __WEBPACK_IMPORTED_MODULE_5__angular_common_http__["a" /* HTTP_INTERCEPTORS */], - useClass: __WEBPACK_IMPORTED_MODULE_25__services_auth_interceptor_service__["a" /* AuthInterceptor */], - multi: true, - }, - ], - bootstrap: [__WEBPACK_IMPORTED_MODULE_7__app_component__["a" /* AppComponent */]] - }) - ], AppModule); - return AppModule; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/app.routing.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return routing; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__pages_main_main_page_component__ = __webpack_require__("../../../../../src/app/pages/main/main-page.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__pages_login_login_component__ = __webpack_require__("../../../../../src/app/pages/login/login.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__pages_campaigns_campaigns_page_component__ = __webpack_require__("../../../../../src/app/pages/campaigns/campaigns-page.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pages_campaign_detail_campaign_detail_page_component__ = __webpack_require__("../../../../../src/app/pages/campaign-detail/campaign-detail-page.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pages_product_detail_product_detail_page_component__ = __webpack_require__("../../../../../src/app/pages/product-detail/product-detail-page.component.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__services_auth_guard_service__ = __webpack_require__("../../../../../src/app/services/auth-guard.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__services_auth_guard_login_service__ = __webpack_require__("../../../../../src/app/services/auth-guard-login.service.ts"); - - - - - - - - -var appRoutes = [ - { path: '', component: __WEBPACK_IMPORTED_MODULE_1__pages_main_main_page_component__["a" /* MainPageComponent */], canActivate: [__WEBPACK_IMPORTED_MODULE_6__services_auth_guard_service__["a" /* AuthGuard */]] }, - { path: 'login', component: __WEBPACK_IMPORTED_MODULE_2__pages_login_login_component__["a" /* LoginComponent */], canActivate: [__WEBPACK_IMPORTED_MODULE_7__services_auth_guard_login_service__["a" /* AuthGuardLogin */]] }, - { path: 'campaigns', component: __WEBPACK_IMPORTED_MODULE_3__pages_campaigns_campaigns_page_component__["a" /* CampaignsPageComponent */], canActivate: [__WEBPACK_IMPORTED_MODULE_6__services_auth_guard_service__["a" /* AuthGuard */]] }, - { path: 'campaign/:id', component: __WEBPACK_IMPORTED_MODULE_4__pages_campaign_detail_campaign_detail_page_component__["a" /* CampaignDetailPageComponent */], canActivate: [__WEBPACK_IMPORTED_MODULE_6__services_auth_guard_service__["a" /* AuthGuard */]] }, - { path: 'product/:id', component: __WEBPACK_IMPORTED_MODULE_5__pages_product_detail_product_detail_page_component__["a" /* ProductDetailPageComponent */], canActivate: [__WEBPACK_IMPORTED_MODULE_6__services_auth_guard_service__["a" /* AuthGuard */]] }, - { path: '**', redirectTo: '' }, -]; -var routing = __WEBPACK_IMPORTED_MODULE_0__angular_router__["c" /* RouterModule */].forRoot(appRoutes); - - -/***/ }), - -/***/ "../../../../../src/app/components/bullet-charts/bullet-charts.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, ".bullet-charts {\n margin-top: 12px;\n margin-left: 5px;\n}\n\n.bullet-charts-label {\n font-size: 12px;\n width: 25%;\n min-height: 40px;\n line-height: 20px;\n display: inline-block;\n}\n\n.bullet-charts-content {\n width: 40%;\n display: inline-block;\n padding-left: 8px;\n vertical-align: top;\n}\n\n.bullet-charts-values {\n font-size: 12px;\n width: 30%;\n display: inline-block;\n text-align: center;\n padding-left: 8px;\n vertical-align: top;\n}", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/components/bullet-charts/bullet-charts.component.html": -/***/ (function(module, exports) { - -module.exports = "\n
\n
\n {{ bullet.label }}\n
\n \n
\n \n \n
\n \n
\n {{ bullet.value }} / {{ bullet.max }}\n
\n
\n
" - -/***/ }), - -/***/ "../../../../../src/app/components/bullet-charts/bullet-charts.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BulletChartsComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var BulletChartsComponent = /** @class */ (function () { - function BulletChartsComponent() { - this._bulletCharts = []; - this.title = ''; - this.primaryColor = '#98CBE5'; - this.secundaryColor = '#CCE5F1'; - } - Object.defineProperty(BulletChartsComponent.prototype, "bulletCharts", { - set: function (bulletCharts) { - var _this = this; - this._bulletCharts = bulletCharts; - this._bulletCharts.forEach(function (value) { - value['bulletValueAxis'] = { - min: 0, - max: value.max, - plotBands: [ - { - from: 0, to: value.value, color: value.primaryColor ? value.primaryColor : _this.primaryColor - }, { - from: value.value, to: value.max, color: value.secundaryColor ? value.secundaryColor : _this.secundaryColor - } - ] - }; - }); - }, - enumerable: true, - configurable: true - }); - BulletChartsComponent.prototype.ngOnInit = function () { - }; - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], BulletChartsComponent.prototype, "title", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], BulletChartsComponent.prototype, "primaryColor", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], BulletChartsComponent.prototype, "secundaryColor", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])('values'), - __metadata("design:type", Array), - __metadata("design:paramtypes", [Array]) - ], BulletChartsComponent.prototype, "bulletCharts", null); - BulletChartsComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'bullet-charts', - template: __webpack_require__("../../../../../src/app/components/bullet-charts/bullet-charts.component.html"), - styles: [__webpack_require__("../../../../../src/app/components/bullet-charts/bullet-charts.component.css")] - }), - __metadata("design:paramtypes", []) - ], BulletChartsComponent); - return BulletChartsComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/components/card/card.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, "\n.card-title {\n\tcolor: #495C5F;\n\tfont-size: 17px;\n\tfont-weight: bold;\n\tmargin: 4px 0px 8px 13px;\n}", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/components/card/card.component.html": -/***/ (function(module, exports) { - -module.exports = "
\n \n
\n {{ title }}\n
\n \n
\n
\n " - -/***/ }), - -/***/ "../../../../../src/app/components/card/card.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CardComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var CardComponent = /** @class */ (function () { - function CardComponent() { - this.title = ''; - } - CardComponent.prototype.ngOnInit = function () { - }; - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], CardComponent.prototype, "title", void 0); - CardComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'card', - template: __webpack_require__("../../../../../src/app/components/card/card.component.html"), - styles: [__webpack_require__("../../../../../src/app/components/card/card.component.css")] - }), - __metadata("design:paramtypes", []) - ], CardComponent); - return CardComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/components/chart-pie/chart-pie.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, "", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/components/chart-pie/chart-pie.component.html": -/***/ (function(module, exports) { - -module.exports = "
\n \n
\n\n0\"\n [seriesColors]=\"colors\"\n [style.height]=\"height\">\n\n \n \n \n \n \n\n" - -/***/ }), - -/***/ "../../../../../src/app/components/chart-pie/chart-pie.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ChartPieComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var ChartPieComponent = /** @class */ (function () { - function ChartPieComponent() { - /** - * Example: - * ['orange', 'blue', '#F00'] - */ - this.colors = null; - this.legend = true; - this.height = ''; - } - ChartPieComponent.prototype.ngOnInit = function () { - }; - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Array) - ], ChartPieComponent.prototype, "data", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Array) - ], ChartPieComponent.prototype, "colors", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], ChartPieComponent.prototype, "legend", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], ChartPieComponent.prototype, "height", void 0); - ChartPieComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'chart-pie', - template: __webpack_require__("../../../../../src/app/components/chart-pie/chart-pie.component.html"), - styles: [__webpack_require__("../../../../../src/app/components/chart-pie/chart-pie.component.css")] - }), - __metadata("design:paramtypes", []) - ], ChartPieComponent); - return ChartPieComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/components/chart/chart.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, "", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/components/chart/chart.component.html": -/***/ (function(module, exports) { - -module.exports = "
\n \n
\n\n
0\">\n \n 0\"\n [seriesColors]=\"colors\"\n [categoryAxis]=\"{ categories: categories }\"\n [style.height]=\"height\">\n\n \n \n \n \n \n \n \n
\n" - -/***/ }), - -/***/ "../../../../../src/app/components/chart/chart.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ChartComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var ChartComponent = /** @class */ (function () { - function ChartComponent() { - this.title = ''; - /** - * Valid types - * - line - * - column - * - bar - */ - this.type = 'line'; - /** - * Example: - * ['January', 'February', 'March'] - */ - this.categories = []; - /** - * Example: - * [ - * {data: [3, 4, 4.1, 3.5], label: 'Item 1'}, - * {data: [4, 3, 2.1, 3.8], label: 'Item 2'} - * ] - */ - this.series = []; - /** - * Example: - * ['orange', 'blue', '#F00'] - */ - this.colors = []; - this.height = ''; - this.legend = true; - this.tooltip = false; - } - ChartComponent.prototype.ngOnInit = function () { - }; - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], ChartComponent.prototype, "title", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], ChartComponent.prototype, "type", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], ChartComponent.prototype, "categories", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], ChartComponent.prototype, "series", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], ChartComponent.prototype, "colors", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], ChartComponent.prototype, "height", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], ChartComponent.prototype, "legend", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], ChartComponent.prototype, "tooltip", void 0); - ChartComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'chart', - template: __webpack_require__("../../../../../src/app/components/chart/chart.component.html"), - styles: [__webpack_require__("../../../../../src/app/components/chart/chart.component.css")] - }), - __metadata("design:paramtypes", []) - ], ChartComponent); - return ChartComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/components/container/container.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, ".page {\n\theight: 100%;\n\t/* max-width: 1200px; */\n\twidth: 100%;\n\tmargin: auto;\n}\n\n.page-info {\n\tcolor: white;\n\tfont-size: 25px;\n\tfont-weight: bold;\n\ttext-align: center;\n\tpadding: 25px 15px;\n\twidth: 190px;\n\tposition: absolute;\n\ttop: 0px;\n\tright: 0px;\n}\n\n.page-filter {\n\tbackground-color: #425357;\n\twidth: 250px;\n\theight: 100vh;\n\tposition: fixed;\n}\n\n.page-filter-field {\n\twidth: 90%;\n\tmargin: auto;\n\tbackground-color: white;\n\tmargin-top: 30px;\n\tborder-radius: 5px;\n\tpadding: 15px 15px 5px 15px;\n}\n\n.page-content {\n\tbackground-color: #FAFBFB;\n\twidth: calc(100% - 250px);\n\theight: 100vh;\n\tposition: relative;\n\tleft: 250px;\n}\n\n.page-menu-general {\n background-color: #00C0E2;\n height: 60px;\n\twidth: 60px;\n\tdisplay: block;\n}\n\n.page-menu-campaigns {\n background-color: #FFB72F;\n height: 60px;\n\twidth: 60px;\n\tdisplay: block;\n}\n\n.page-menu-img-general {\n\tpadding-top: 17px;\n\tpadding-left: 16px;\n}\n\n.page-menu-img-campaigns {\n\tpadding-top: 19px;\n\tpadding-left: 12px;\n}", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/components/container/container.component.html": -/***/ (function(module, exports) { - -module.exports = "\n\n
\n
\n \n \n \n\n\n\n
\n Demo Carol App\n
\n
\n \n
\n
\n\n
\n \n
\n
\n" - -/***/ }), - -/***/ "../../../../../src/app/components/container/container.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ContainerComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var ContainerComponent = /** @class */ (function () { - function ContainerComponent() { - } - ContainerComponent.prototype.ngOnInit = function () { - }; - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", __WEBPACK_IMPORTED_MODULE_0__angular_core__["_7" /* TemplateRef */]) - ], ContainerComponent.prototype, "filtersTemplate", void 0); - ContainerComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'container', - template: __webpack_require__("../../../../../src/app/components/container/container.component.html"), - styles: [__webpack_require__("../../../../../src/app/components/container/container.component.css")] - }), - __metadata("design:paramtypes", []) - ], ContainerComponent); - return ContainerComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/components/loading/loading.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, ".loading-box {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n height: 100%;\n}", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/components/loading/loading.component.html": -/***/ (function(module, exports) { - -module.exports = "
\n
" - -/***/ }), - -/***/ "../../../../../src/app/components/loading/loading.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LoadingComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var LoadingComponent = /** @class */ (function () { - function LoadingComponent() { - } - LoadingComponent.prototype.ngOnInit = function () { - }; - LoadingComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'loading', - template: __webpack_require__("../../../../../src/app/components/loading/loading.component.html"), - styles: [__webpack_require__("../../../../../src/app/components/loading/loading.component.css")] - }), - __metadata("design:paramtypes", []) - ], LoadingComponent); - return LoadingComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/components/percentage-result/percentage-result.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, ".percentage-result {\n\twidth: 100%;\n\tmin-height: 33px;\n\tfont-size: 12px;\n\tmargin-top: 8px;\n}\n\n.percentage-result-image-container {\n\twidth: 20%;\n\theight: 20px;\n\tdisplay: inline;\n\tmargin-right: 10px;\n}\n\n.percentage-result-image {\n\twidth: auto;\n\theight: 20px;\n\tvertical-align: top;\n}\n\n.percentage-result-text {\n\twidth: 80%;\n\tline-height: 14px;\n\tdisplay: inline-block;\n}", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/components/percentage-result/percentage-result.component.html": -/***/ (function(module, exports) { - -module.exports = "
\n
\n \n
\n
\n {{ _value }} {{ text }}\n
\n
" - -/***/ }), - -/***/ "../../../../../src/app/components/percentage-result/percentage-result.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PercentageResultComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var PercentageResultComponent = /** @class */ (function () { - function PercentageResultComponent() { - this._color = '#AFB8C2'; - this._direction = 'zero'; - this._arrowImg = 'assets/arrows/arrow-zero.png'; - this._value = '0%'; - this.text = ''; - } - Object.defineProperty(PercentageResultComponent.prototype, "value", { - set: function (value) { - this._value = value + '%'; - if (parseFloat(value) > 0) { - this._direction = 'up'; - this._color = '#19BC7E'; - this._arrowImg = 'assets/arrows/arrow-up.png'; - } - else if (parseFloat(value) < 0) { - this._direction = 'down'; - this._color = '#FF0005'; - this._arrowImg = 'assets/arrows/arrow-down.png'; - } - else { - this._direction = 'zero'; - this._color = '##AFB8C2'; - this._arrowImg = 'assets/arrows/arrow-zero.png'; - } - }, - enumerable: true, - configurable: true - }); - PercentageResultComponent.prototype.ngOnInit = function () { - }; - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object), - __metadata("design:paramtypes", [Object]) - ], PercentageResultComponent.prototype, "value", null); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], PercentageResultComponent.prototype, "text", void 0); - PercentageResultComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'percentage-result', - template: __webpack_require__("../../../../../src/app/components/percentage-result/percentage-result.component.html"), - styles: [__webpack_require__("../../../../../src/app/components/percentage-result/percentage-result.component.css")] - }), - __metadata("design:paramtypes", []) - ], PercentageResultComponent); - return PercentageResultComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/components/result-box-group/result-box-group.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, ":host {\n width: 100%;\n}", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/components/result-box-group/result-box-group.component.html": -/***/ (function(module, exports) { - -module.exports = "\n \n {{ value.content }}\n\n \n \n" - -/***/ }), - -/***/ "../../../../../src/app/components/result-box-group/result-box-group.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ResultBoxGroupComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var ResultBoxGroupComponent = /** @class */ (function () { - function ResultBoxGroupComponent() { - this._values = [ - { - title: '', - content: '', - color: '', - percentageValue: '', - percentageText: '' - } - ]; - } - Object.defineProperty(ResultBoxGroupComponent.prototype, "values", { - set: function (values) { - if (typeof values === 'object') { - this._values = values; - } - }, - enumerable: true, - configurable: true - }); - ResultBoxGroupComponent.prototype.ngOnInit = function () { - }; - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object), - __metadata("design:paramtypes", [Object]) - ], ResultBoxGroupComponent.prototype, "values", null); - ResultBoxGroupComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'result-box-group', - template: __webpack_require__("../../../../../src/app/components/result-box-group/result-box-group.component.html"), - styles: [__webpack_require__("../../../../../src/app/components/result-box-group/result-box-group.component.css")] - }), - __metadata("design:paramtypes", []) - ], ResultBoxGroupComponent); - return ResultBoxGroupComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/components/result-box/result-box.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, ".result-box {\n\theight: 100%;\n\tmargin: 12px 6px 14px 6px;\n}\n\n.result-box-title {\n\tfont-size: 22px;\n\tfont-weight: bold;\n\tpadding-bottom: 5px;\n}\n\n.result-box-content {\n\tcolor: #AFB8C2;\n\tfont-size: 16px;\n}\n\n.result-box-container {\n\tmin-height: 92px;\n}", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/components/result-box/result-box.component.html": -/***/ (function(module, exports) { - -module.exports = "\n
\n \n
\n
\n
\n {{ title }}\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n" - -/***/ }), - -/***/ "../../../../../src/app/components/result-box/result-box.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ResultBoxComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var ResultBoxComponent = /** @class */ (function () { - function ResultBoxComponent() { - this._boxColor = '#D7D7D7'; - this._titleColor = '#354050'; - this.title = ''; - this.titleUnit = ''; - } - Object.defineProperty(ResultBoxComponent.prototype, "boxColor", { - set: function (boxColor) { - if (boxColor) { - this._boxColor = boxColor; - this._titleColor = boxColor; - } - }, - enumerable: true, - configurable: true - }); - ResultBoxComponent.prototype.ngOnInit = function () { - }; - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])('box-color'), - __metadata("design:type", Object), - __metadata("design:paramtypes", [Object]) - ], ResultBoxComponent.prototype, "boxColor", null); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], ResultBoxComponent.prototype, "title", void 0); - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */])(), - __metadata("design:type", Object) - ], ResultBoxComponent.prototype, "titleUnit", void 0); - ResultBoxComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'result-box', - template: __webpack_require__("../../../../../src/app/components/result-box/result-box.component.html"), - styles: [__webpack_require__("../../../../../src/app/components/result-box/result-box.component.css")] - }), - __metadata("design:paramtypes", []) - ], ResultBoxComponent); - return ResultBoxComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/components/toolbar/toolbar.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, ".toolbar {\n\theight: 58px;\n\twidth: calc(100% - 250px);\n\tfloat: right;\n}\n\n.toolbar-content {\n\tz-index: 100;\n\theight: 58px;\n\twidth: calc(100% - 250px);\n\tfont-size: 20px;\n\tbackground: white;\n\t-webkit-box-shadow: 0px 5px 12px -1px rgba(0,0,0,0.11);\n\tbox-shadow: 0px 5px 12px -1px rgba(0,0,0,0.11);\n\tposition: fixed;\n}\n\n.toolbar-search {\n\tposition: relative;\n\tfloat: left;\n\twidth: 45%;\n\theight: 100%;\n}\n\ninput {\n\tmargin-top: 14px;\n\tmargin-left: 64px;\n\twidth: 100%;\n\theight: 30px;\n\tfont-size: 14px;\n\tborder: none;\n\tbackground-color: transparent;\n\tcolor: #485C5D;\n\toutline: none;\n}\n\ninput::-webkit-input-placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */\n\tcolor: #859BB0;\n\topacity: 1; /* Firefox */\n}\n\ninput:-ms-input-placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */\n\tcolor: #859BB0;\n\topacity: 1; /* Firefox */\n}\n\ninput::-ms-input-placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */\n\tcolor: #859BB0;\n\topacity: 1; /* Firefox */\n}\n\ninput::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */\n\tcolor: #859BB0;\n\topacity: 1; /* Firefox */\n}\n\n.toolbar-search-image {\n\tmargin-top: 20px;\n\tmargin-left: 40px;\n\tposition: absolute;\n}\n\n.toolbar-group-right {\n\tfloat: right;\n\theight: 100%;\n\tcolor: #859BB0;\n font-size: 14px;\n}\n\n.toolbar-language-container {\n\tfloat: left;\n\tposition: relative;\n\tpadding: 0px 20px;\n\tcursor: pointer;\n}\n\n.toolbar-language-container:hover {\n\tbackground-color: #ddd\n}\n\n.toolbar-language-img-container {\n\tfloat: left;\n\tmargin: 22px 10px 10px 0px;\n}\n\n.toolbar-language-text-container {\n\tfloat: left;\n\tmargin: 20px 0px;\n}\n\n.toolbar-user-container {\n\tfloat: left;\n\tposition: relative;\n\tpadding: 0px 20px 0px 10px;\n\tcursor: pointer;\n}\n\n.toolbar-user-container:hover {\n\tbackground-color: #ddd\n}\n\n.toolbar-user-text-container {\n\tfloat: left;\n\tmargin: 20px 5px;\n}\n\n.toolbar-user-avatar {\n\tfloat: left;\n\tmargin-top: 8px;\n}\n\n.toolbar-search-box {\n\tposition: absolute;\n\ttop: 59px;\n\tmin-width: 150px;\n\toverflow: auto;\n\tbackground: white;\n\t-webkit-box-shadow: 0px 5px 20px 5px rgba(0,0,0,0.11);\n\tbox-shadow: 0px 5px 20px 5px rgba(0,0,0,0.11);\n\tz-index: 1;\n\tborder: 1px solid #D7D7D7;\n\tborder-radius: 5px;\n\twidth: 100%;\n\tmargin-left: 4px;\n\tmax-height: 500px;\n\toverflow: auto;\n}\n\n.itens-search-box {\n\tcolor: #607c7d;\n\tpadding: 6px 35px;\n\ttext-decoration: none;\n\tdisplay: block;\n\tfont-size: 13px;\n\tcursor: pointer;\n}\n\n.itens-search-box:hover {\n\tbackground-color: #ddd\n}\n\n.title-search-box {\n\tbackground-color: #f3f0f0;\n\tcolor: #485C5D;\n\tpadding: 6px 16px;\n\ttext-decoration: none;\n\tdisplay: block;\n\tfont-size: 15px;\n}\n\n.toolbar-dropdown {\n\tposition: absolute;\n\ttop: 59px;\n\tmin-width: 150px;\n\toverflow: auto;\n\tbackground: white;\n\t-webkit-box-shadow: 0px 5px 20px 5px rgba(0,0,0,0.11);\n\tbox-shadow: 0px 5px 20px 5px rgba(0,0,0,0.11);\n\tz-index: 1;\n\tborder: 1px solid #D7D7D7;\n\tborder-radius: 5px;\n}\n\n.toolbar-dropdown span {\n\tcolor: #778a9c;\n\tpadding: 6px 16px;\n\ttext-decoration: none;\n\tdisplay: block;\n\tfont-size: 14px;\n}\n\n.toolbar-dropdown span:hover {\n\tbackground-color: #ddd\n}\n\n.toolbar-dropdown-img-language {\n\tmargin-right: 10px;\n}\n", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/components/toolbar/toolbar.component.html": -/***/ (function(module, exports) { - -module.exports = "
\n
\n \n
\n\n \n\n
\n\n 0\" class=\"title-search-box\">\n Campanhas\n \n \n {{ campaign.label }}\n \n\n 0\" class=\"title-search-box\">\n Produtos\n \n \n {{ product.label }}\n \n\n \n \n \n\n \n Nenhum resultado encontrado\n \n
\n
\n\n
\n
\n\n
\n \n
\n
\n {{ language }}\n
\n\n
\n\n \n \n Português\n \n \n \n Inglês\n \n
\n
\n\n
\n\n \n \n
\n {{ user }}\n
\n
\n\n Sair\n
\n
\n
\n
\n
\n" - -/***/ }), - -/***/ "../../../../../src/app/components/toolbar/toolbar.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ToolbarComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_i18n_service__ = __webpack_require__("../../../../../src/app/services/i18n.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_auth_service__ = __webpack_require__("../../../../../src/app/services/auth.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__services_carol_querys_toolbar_search_service__ = __webpack_require__("../../../../../src/app/services/carol-querys/toolbar-search.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_rxjs_add_operator_debounceTime__ = __webpack_require__("../../../../rxjs/_esm5/add/operator/debounceTime.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_jsonpath_jsonpath__ = __webpack_require__("../../../../jsonpath/jsonpath.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_jsonpath_jsonpath___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_jsonpath_jsonpath__); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - - - - - - -var ToolbarComponent = /** @class */ (function () { - function ToolbarComponent(i18n, searchService, authService, renderer, router) { - var _this = this; - this.i18n = i18n; - this.searchService = searchService; - this.authService = authService; - this.renderer = renderer; - this.router = router; - this.showUserDropdown = false; - this.showLanguageDropdown = false; - this.showSearchBox = false; - this.searchInput = ''; - this.face = 'face.png'; - this.campaigns = []; - this.products = []; - this.searchingCampaigns = false; - this.searchingProducts = false; - renderer.listen('document', 'click', function (event) { - _this.wasClickedOutOfSearchBox(event); - }); - } - ToolbarComponent.prototype.ngOnInit = function () { - this.language = this.i18n.getLanguage(); - var email = localStorage.getItem('user'); - this.user = email.substring(0, email.indexOf('@')); - }; - ToolbarComponent.prototype.changeLanguage = function (language) { - this.language = language; - this.i18n.setLanguage(language); - }; - ToolbarComponent.prototype.logout = function () { - this.authService.logout(); - }; - ToolbarComponent.prototype.changeSearch = function (value) { - var _this = this; - if (value.length < 3) { - return; - } - this.showSearchBox = true; - this.searchingCampaigns = true; - this.searchingProducts = true; - this.campaigns = []; - this.products = []; - this.searchService.getCampaigns(value) - .subscribe(function (result) { - console.log('getCampaigns', result); - _this.campaigns = __WEBPACK_IMPORTED_MODULE_6_jsonpath_jsonpath__["query"](result, '$..campaign.buckets.*') - .map(function (x) { - return { - label: __WEBPACK_IMPORTED_MODULE_6_jsonpath_jsonpath__["query"](x, '$..aggregations..key'), - value: x['key'], - }; - }); - setTimeout(function () { - _this.searchingCampaigns = false; - }, 5000); - }, function (error) { - console.log('error getCampaigns', error); - _this.searchingCampaigns = false; - }); - this.searchService.getCampaignByProduct(value) - .subscribe(function (result) { - console.log('getCampaignByProduct', result); - _this.products = __WEBPACK_IMPORTED_MODULE_6_jsonpath_jsonpath__["query"](result, '$..campaign.buckets.*') - .filter(function (x) { return x['resolved']; }) - .map(function (x) { - return { - label: __WEBPACK_IMPORTED_MODULE_6_jsonpath_jsonpath__["query"](x, '$..aggregations..key'), - value: x['key'], - }; - }); - setTimeout(function () { - _this.searchingProducts = false; - }, 5000); - }, function (error) { - console.log('error getCampaignByProduct', error); - _this.searchingProducts = false; - }); - }; - ToolbarComponent.prototype.wasClickedOutOfSearchBox = function (event) { - if (!this.inputElement.nativeElement.contains(event.target)) { - this.showSearchBox = false; - } - }; - __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */])('inputElement', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] }), - __metadata("design:type", __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */]) - ], ToolbarComponent.prototype, "inputElement", void 0); - ToolbarComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'toolbar', - template: __webpack_require__("../../../../../src/app/components/toolbar/toolbar.component.html"), - styles: [__webpack_require__("../../../../../src/app/components/toolbar/toolbar.component.css")] - }), - __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2__services_i18n_service__["a" /* I18nService */], - __WEBPACK_IMPORTED_MODULE_4__services_carol_querys_toolbar_search_service__["a" /* ToolbarSearchService */], - __WEBPACK_IMPORTED_MODULE_3__services_auth_service__["a" /* AuthService */], - __WEBPACK_IMPORTED_MODULE_0__angular_core__["X" /* Renderer2 */], - __WEBPACK_IMPORTED_MODULE_1__angular_router__["b" /* Router */]]) - ], ToolbarComponent); - return ToolbarComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/i18n/literalsEN.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EN; }); -var EN = { - lSearchFor: 'Search for store or product', - lCampaigns: 'Campaigns', - lAnalysisPeriod: 'Analysis Period', - lLast30Days: 'Last 30 dias', - lLast60Days: 'Last 60 dias', - lLast90Days: 'Last 90 dias', - lSelectTheBranchs: 'Select the branchs', - lSignOut: 'Sign out', - lTotalClientFidelity: 'Total client fidelity', -}; - - -/***/ }), - -/***/ "../../../../../src/app/i18n/literalsPT.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PT; }); -var PT = { - lSearchFor: 'Buscar loja ou produto', - lCampaigns: 'Campanhas', - lAnalysisPeriod: 'Período de Análise', - lLast30Days: 'Últimos 30 dias', - lLast60Days: 'Últimos 60 dias', - lLast90Days: 'Últimos 90 dias', - lSelectTheBranchs: 'Selecione as unidades', - lSignOut: 'Sair', - lTotalClientFidelity: 'Total cliente fidelidade', -}; - - -/***/ }), - -/***/ "../../../../../src/app/pages/campaign-detail/campaign-detail-page.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, ".campaign-title {\n font-size: 24px;\n font-weight: bold;\n display: inline-block;\n padding: 10px;\n}\n\n.campaign-time {\n height: 30px;\n color: white;\n font-size: 14px;\n background-color: #f38400;\n display: inline-block;\n padding: 3px 8px;\n margin-left: 20px;\n}", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/pages/campaign-detail/campaign-detail-page.component.html": -/***/ (function(module, exports) { - -module.exports = "\n\n \n
\n
\n
\n Dia das Mães\n
\n
\n Final. em 5 dias\n
\n
\n
\n \n \n
\n
\n\n
\n\n
\n
\n\n \n \n \n \n \n
" - -/***/ }), - -/***/ "../../../../../src/app/pages/campaign-detail/campaign-detail-page.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CampaignDetailPageComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var CampaignDetailPageComponent = /** @class */ (function () { - function CampaignDetailPageComponent() { - var _this = this; - this.bestCampaigns = [ - { label: 'Cupons', value: 3500, max: 3000, primaryColor: '#99c9e8', secundaryColor: 'f1f7fd' } - ]; - this.columns = [ - { column: 'product', label: 'Produto', type: 'link', action: function (value, row) { _this.extras(value, row); } }, - { column: 'billing', label: 'Faturamento' }, - { column: 'profit', label: 'Lucro' }, - { column: 'avgticket', label: 'Ticket médio' }, - { column: 'vouchers', label: 'Vouchers convertidos / emitidos' }, - // { column: 'status', label: 'Status', type: 'subtitle', width: '5%', subtitles: [ - // { value: 'open', type: 'success', label: 'Aberta', content: '1' }, - // { value: 'next', type: 'warning', label: 'Prazo final próximo', content: '2' }, - // { value: 'closed', type: 'danger', label: 'Finalizada', content: '3' } - // ]} - { column: 'status', label: 'Status', color: this.experimentalColor } - ]; - this.items = [ - { campaign: 'Totvs Switch', - billing: 'On off checkbox similar to a light switch ', - link: '/documentation/thf-switch', - status: 'Final. em 5 dias' }, - { campaign: 'Totvs Radio Group', - billing: 'Group of round buttons that allows 1 item to be selected', - link: '/campaign/thf-radio-group', - profit: 'Best Practices', - status: '25/04/2018' }, - { campaign: 'Totvs Radio Group', - billing: 'Group of round buttons that allows 1 item to be selected', - link: '/campaign/thf-radio-group', - profit: 'Best Practices', - status: 'Finalizada' - } - ]; - } - CampaignDetailPageComponent.prototype.experimentalColor = function (row, column) { - if (row.status === 'Finalizada') { - return 'danger'; - } - else if (row.status.indexOf('Final.') > -1) { - return 'warning'; - } - else { - return 'success'; - } - }; - CampaignDetailPageComponent.prototype.extras = function (value, row) { - console.log(value, row, 'campaign clicked'); - }; - CampaignDetailPageComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'campaign-detail-page', - template: __webpack_require__("../../../../../src/app/pages/campaign-detail/campaign-detail-page.component.html"), - styles: [__webpack_require__("../../../../../src/app/pages/campaign-detail/campaign-detail-page.component.css")] - }), - __metadata("design:paramtypes", []) - ], CampaignDetailPageComponent); - return CampaignDetailPageComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/pages/campaigns/campaigns-page.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, "", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/pages/campaigns/campaigns-page.component.html": -/***/ (function(module, exports) { - -module.exports = "\n\n \n
\n \n \n\n \n \n\n \n\n \n\n \n
\n
\n\n \n \n \n \n\n
" - -/***/ }), - -/***/ "../../../../../src/app/pages/campaigns/campaigns-page.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CampaignsPageComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var CampaignsPageComponent = /** @class */ (function () { - function CampaignsPageComponent() { - var _this = this; - this.bestCampaigns = [ - { label: 'Dias das mães', value: 480, max: 500 }, - { label: 'Dia D da cerveja', value: 2500, max: 3000 }, - { label: 'Páscoa', value: 2890, max: 3000 }, - { label: 'Aniversário da cidade', value: 9988, max: 10000 }, - { label: 'Compre um e ganhe outro', value: 4890, max: 5000 } - ]; - this.worstCampaigns = [ - { label: 'Dias das mães', value: 480, max: 500 }, - { label: 'Dia D da cerveja', value: 2500, max: 3000 }, - { label: 'Páscoa', value: 2890, max: 3000 }, - { label: 'Aniversário da cidade', value: 9988, max: 10000 }, - { label: 'Compre um e ganhe outro', value: 4890, max: 5000 } - ]; - this.dataVouchers = []; - this.columns = [ - { column: 'campaign', label: 'Campanha', type: 'link', action: function (value, row) { _this.extras(value, row); } }, - { column: 'billing', label: 'Faturamento' }, - { column: 'profit', label: 'Lucro' }, - { column: 'avgticket', label: 'Ticket médio' }, - { column: 'vouchers', label: 'Vouchers convertidos / emitidos' }, - // { column: 'status', label: 'Status', type: 'subtitle', width: '5%', subtitles: [ - // { value: 'open', type: 'success', label: 'Aberta', content: '1' }, - // { value: 'next', type: 'warning', label: 'Prazo final próximo', content: '2' }, - // { value: 'closed', type: 'danger', label: 'Finalizada', content: '3' } - // ]} - { column: 'status', label: 'Status', color: this.experimentalColor } - ]; - this.items = [ - { campaign: 'Totvs Switch', - billing: 'On off checkbox similar to a light switch ', - link: '/documentation/thf-switch', - status: 'Final. em 5 dias' }, - { campaign: 'Totvs Radio Group', - billing: 'Group of round buttons that allows 1 item to be selected', - link: '/campaign/thf-radio-group', - profit: 'Best Practices', - status: '25/04/2018' }, - { campaign: 'Totvs Radio Group', - billing: 'Group of round buttons that allows 1 item to be selected', - link: '/campaign/thf-radio-group', - profit: 'Best Practices', - status: 'Finalizada' - } - ]; - } - CampaignsPageComponent.prototype.experimentalColor = function (row, column) { - if (row.status === 'Finalizada') { - return 'danger'; - } - else if (row.status.indexOf('Final.') > -1) { - return 'warning'; - } - else { - return 'success'; - } - }; - CampaignsPageComponent.prototype.extras = function (value, row) { - console.log(value, row, 'campaign clicked'); - }; - CampaignsPageComponent.prototype.ngOnInit = function () { - }; - CampaignsPageComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'campaigns-page', - template: __webpack_require__("../../../../../src/app/pages/campaigns/campaigns-page.component.html"), - styles: [__webpack_require__("../../../../../src/app/pages/campaigns/campaigns-page.component.css")] - }), - __metadata("design:paramtypes", []) - ], CampaignsPageComponent); - return CampaignsPageComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/pages/login/login.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, "", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/pages/login/login.component.html": -/***/ (function(module, exports) { - -module.exports = "\n" - -/***/ }), - -/***/ "../../../../../src/app/pages/login/login.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LoginComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__totvs_thf_ui_services_thf_notification_thf_notification_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-notification.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_auth_service__ = __webpack_require__("../../../../../src/app/services/auth.service.ts"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - - - -var LoginComponent = /** @class */ (function () { - function LoginComponent(authService, router, thfNotification) { - this.authService = authService; - this.router = router; - this.thfNotification = thfNotification; - } - LoginComponent.prototype.checkLogin = function (values) { - var _this = this; - // this.requests.login(values.login, values.password); - this.authService.login(values.login, values.password).subscribe(function (result) { - _this.authService.setSession(result, values.login); - _this.router.navigate([_this.authService.redirectUrl]); - }, function (error) { - if (error.status === 401) { - _this.thfNotification.error('Senha incorreta!'); - } - else { - _this.thfNotification.warning('Possível problema com o Servidor'); - } - }); - }; - LoginComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'login', - template: __webpack_require__("../../../../../src/app/pages/login/login.component.html"), - styles: [__webpack_require__("../../../../../src/app/pages/login/login.component.css")] - }), - __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_3__services_auth_service__["a" /* AuthService */], - __WEBPACK_IMPORTED_MODULE_1__angular_router__["b" /* Router */], - __WEBPACK_IMPORTED_MODULE_2__totvs_thf_ui_services_thf_notification_thf_notification_service__["a" /* ThfNotificationService */]]) - ], LoginComponent); - return LoginComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/pages/main/main-page.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, "", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/pages/main/main-page.component.html": -/***/ (function(module, exports) { - -module.exports = "\n\n\n \n
\n \n \n
\n
\n\n \n
\n
\n \n\n \n \n \n \n \n \n \n \n \n \n
\n\n
\n \n \n \n \n \n
\n
\n
\n
\n" - -/***/ }), - -/***/ "../../../../../src/app/pages/main/main-page.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MainPageComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__services_i18n_service__ = __webpack_require__("../../../../../src/app/services/i18n.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_carol_querys_main_page_service__ = __webpack_require__("../../../../../src/app/services/carol-querys/main-page.service.ts"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - - -var MainPageComponent = /** @class */ (function () { - function MainPageComponent(mainPageService, i18n) { - this.mainPageService = mainPageService; - this.i18n = i18n; - this.totalFidCustomers = ''; - this.totalNotFidCustomers = ''; - this.seriesFidCustomers = []; - this.categoriesFidCustomers = []; - } - MainPageComponent.prototype.ngOnInit = function () { - this.topResultBoxes = [{ - title: '0', - content: 'Orders', - color: '#00C6D3', - percentageValue: '', - percentageText: '' - }, - { - title: '0', - content: 'Customers', - color: 'pink', - percentageValue: '50', - percentageText: '' - }]; - this.newFilter(); - }; - MainPageComponent.prototype.labelContent = function (e) { - return e.category; - }; - MainPageComponent.prototype.newFilter = function () { - var _this = this; - this.mainPageService.runNamedQuery('customerPerSituation', {}).subscribe(function (result) { - if (result != undefined && result['aggs'] != undefined && result['aggs']['status'] != undefined && result['aggs']['status']['buckets'] != undefined) { - var dados = result['aggs']['status']['buckets']; - _this.dadosCustomersSituation = []; - for (var key in dados) { - if (dados.hasOwnProperty(key)) { - var valor = dados[key]['docCount']; - if (valor != 0) { - valor = valor / result["totalHits"]; - } - _this.dadosCustomersSituation.push({ kind: key, share: valor }); - console.log(key, dados[key]); - } - } - } - }, function (error) { - console.log('error customerPerSituation', error); - }); - function compare(a, b) { - if (a.data < b.data) - return -1; - if (a.data > b.data) - return 1; - return 0; - } - this.mainPageService.runNamedQuery('customersTop', {}).subscribe(function (result) { - _this.dadosCustomersTop = []; - if (result != undefined) { - if (result["aggs"] != undefined) { - if (result["aggs"]["name"] != undefined) { - if (result["aggs"]["name"]["buckets"] != undefined) { - var dados = result["aggs"]["name"]["buckets"]; - for (var key in dados) { - if (dados.hasOwnProperty(key)) { - var row = dados[key]; - _this.dadosCustomersTop.push({ name: row["key"], data: [row["aggregations"]["risk"]["value"]] }); - console.info(key); - } - } - _this.dadosCustomersTop.sort(compare); - } - } - } - } - }, function (error) { - console.log('error customersTop', error); - }); - this.mainPageService.runNamedQuery('QuantityOrders', {}).subscribe(function (result) { - _this.topResultBoxes[0]['title'] = result['totalHits']; - }, function (error) { - console.log('error getAverageTicket', error); - }); - this.mainPageService.runNamedQuery('QuantityCustomers', {}).subscribe(function (result) { - console.info(JSON.stringify(result)); - _this.topResultBoxes[1]['title'] = result['totalHits']; - }, function (error) { - console.log('error getAverageTicket', error); - }); - }; - MainPageComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'main-page', - template: __webpack_require__("../../../../../src/app/pages/main/main-page.component.html"), - styles: [__webpack_require__("../../../../../src/app/pages/main/main-page.component.css")] - }), - __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2__services_carol_querys_main_page_service__["a" /* MainPageService */], - __WEBPACK_IMPORTED_MODULE_1__services_i18n_service__["a" /* I18nService */]]) - ], MainPageComponent); - return MainPageComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/pages/product-detail/product-detail-page.component.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, ".campaign-title {\n font-size: 24px;\n font-weight: bold;\n display: inline-block;\n padding: 10px;\n}\n\n.campaign-time {\n height: 30px;\n color: white;\n font-size: 14px;\n background-color: #f38400;\n display: inline-block;\n padding: 3px 8px;\n margin-left: 20px;\n}", ""]); - -// exports - - -/*** EXPORTS FROM exports-loader ***/ -module.exports = module.exports.toString(); - -/***/ }), - -/***/ "../../../../../src/app/pages/product-detail/product-detail-page.component.html": -/***/ (function(module, exports) { - -module.exports = "\n\n \n
\n
\n
\n Coca Cola 2 litros\n
\n
\n Final. em 5 dias\n
\n
\n
\n \n \n
\n
\n\n
\n\n
\n
\n\n \n
\n
\n\n
\n\n
\n\n
\n
\n
\n\n
" - -/***/ }), - -/***/ "../../../../../src/app/pages/product-detail/product-detail-page.component.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ProductDetailPageComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - -var ProductDetailPageComponent = /** @class */ (function () { - function ProductDetailPageComponent() { - var _this = this; - this.avgProducts = [ - { label: 'Cupons', value: 3500, max: 3000, primaryColor: '#99c9e8', secundaryColor: 'f1f7fd' }, - { label: 'Cupons', value: 3500, max: 3000, primaryColor: '#99c9e8', secundaryColor: 'f1f7fd' }, - { label: 'Cupons', value: 3500, max: 3000, primaryColor: '#99c9e8', secundaryColor: 'f1f7fd' }, - { label: 'Cupons', value: 3500, max: 3000, primaryColor: '#99c9e8', secundaryColor: 'f1f7fd' }, - ]; - this.columns = [ - { column: 'product', label: 'Produto', type: 'link', action: function (value, row) { _this.extras(value, row); } }, - { column: 'billing', label: 'Faturamento' }, - { column: 'profit', label: 'Lucro' }, - { column: 'avgticket', label: 'Ticket médio' }, - { column: 'vouchers', label: 'Vouchers convertidos / emitidos' }, - // { column: 'status', label: 'Status', type: 'subtitle', width: '5%', subtitles: [ - // { value: 'open', type: 'success', label: 'Aberta', content: '1' }, - // { value: 'next', type: 'warning', label: 'Prazo final próximo', content: '2' }, - // { value: 'closed', type: 'danger', label: 'Finalizada', content: '3' } - // ]} - { column: 'status', label: 'Status', color: this.experimentalColor } - ]; - this.items = [ - { campaign: 'Totvs Switch', - billing: 'On off checkbox similar to a light switch ', - link: '/documentation/thf-switch', - status: 'Final. em 5 dias' }, - { campaign: 'Totvs Radio Group', - billing: 'Group of round buttons that allows 1 item to be selected', - link: '/campaign/thf-radio-group', - profit: 'Best Practices', - status: '25/04/2018' }, - { campaign: 'Totvs Radio Group', - billing: 'Group of round buttons that allows 1 item to be selected', - link: '/campaign/thf-radio-group', - profit: 'Best Practices', - status: 'Finalizada' - } - ]; - } - ProductDetailPageComponent.prototype.experimentalColor = function (row, column) { - if (row.status === 'Finalizada') { - return 'danger'; - } - else if (row.status.indexOf('Final.') > -1) { - return 'warning'; - } - else { - return 'success'; - } - }; - ProductDetailPageComponent.prototype.extras = function (value, row) { - console.log(value, row, 'campaign clicked'); - }; - ProductDetailPageComponent = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ - // tslint:disable-next-line:component-selector - selector: 'product-detail-page', - template: __webpack_require__("../../../../../src/app/pages/product-detail/product-detail-page.component.html"), - styles: [__webpack_require__("../../../../../src/app/pages/product-detail/product-detail-page.component.css")] - }), - __metadata("design:paramtypes", []) - ], ProductDetailPageComponent); - return ProductDetailPageComponent; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/services/auth-guard-login.service.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AuthGuardLogin; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__auth_service__ = __webpack_require__("../../../../../src/app/services/auth.service.ts"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - - -var AuthGuardLogin = /** @class */ (function () { - function AuthGuardLogin(authService, router) { - this.authService = authService; - this.router = router; - } - /** - * Prevents login from being accessed when logged in - */ - AuthGuardLogin.prototype.canActivate = function (route, state) { - if (this.authService.isLoggedIn()) { - this.router.navigate(['']); - return false; - } - return true; - }; - AuthGuardLogin = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */])(), - __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2__auth_service__["a" /* AuthService */], __WEBPACK_IMPORTED_MODULE_1__angular_router__["b" /* Router */]]) - ], AuthGuardLogin); - return AuthGuardLogin; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/services/auth-guard.service.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AuthGuard; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__auth_service__ = __webpack_require__("../../../../../src/app/services/auth.service.ts"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - - -var AuthGuard = /** @class */ (function () { - function AuthGuard(authService, router) { - this.authService = authService; - this.router = router; - } - /** - * Prevents access without login - */ - AuthGuard.prototype.canActivate = function (route, state) { - return this.checkLogin(state.url); - }; - AuthGuard.prototype.checkLogin = function (url) { - if (this.authService.isLoggedIn()) { - return true; - } - // Store the attempted URL for redirecting - this.authService.redirectUrl = url; - // Navigate to the login page with extras - this.router.navigate(['/login']); - return false; - }; - AuthGuard = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */])(), - __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2__auth_service__["a" /* AuthService */], __WEBPACK_IMPORTED_MODULE_1__angular_router__["b" /* Router */]]) - ], AuthGuard); - return AuthGuard; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/services/auth-interceptor.service.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AuthInterceptor; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; - -var AuthInterceptor = /** @class */ (function () { - function AuthInterceptor() { - } - AuthInterceptor.prototype.intercept = function (req, next) { - var idToken = localStorage.getItem('access_token'); - if (idToken) { - var cloned = req.clone({ - headers: req.headers.set('Authorization', 'Bearer ' + idToken) - }); - return next.handle(cloned); - } - else { - return next.handle(req); - } - }; - AuthInterceptor = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */])() - ], AuthInterceptor); - return AuthInterceptor; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/services/auth.service.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AuthService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__http_requests_service__ = __webpack_require__("../../../../../src/app/services/http-requests.service.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_moment__ = __webpack_require__("../../../../moment/moment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_moment__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - - - - -var AuthService = /** @class */ (function () { - function AuthService(requests, router, http) { - this.requests = requests; - this.router = router; - this.http = http; - this.redirectUrl = ''; - } - AuthService.prototype.login = function (username, password) { - var body = new __WEBPACK_IMPORTED_MODULE_1__angular_common_http__["f" /* HttpParams */]() - .set('grant_type', 'password') - .set('password', password) - .set('username', username) - .set('subdomain', this.requests.subdomain) - .set('connectorId', this.requests.connectorId); - var httpOptions = { - headers: new __WEBPACK_IMPORTED_MODULE_1__angular_common_http__["e" /* HttpHeaders */]({ - 'Content-Type': 'application/x-www-form-urlencoded' - }) - }; - return this.http.post(this.requests.rootUrl + 'oauth2/token', body.toString(), httpOptions); - }; - AuthService.prototype.setSession = function (authResult, user) { - localStorage.setItem('access_token', authResult['access_token']); - localStorage.setItem('user', user); - var expiresAt = __WEBPACK_IMPORTED_MODULE_3_moment__().add(authResult['expires_in'], 'second'); - localStorage.setItem('expires_at', JSON.stringify(expiresAt.valueOf())); - }; - AuthService.prototype.logout = function () { - localStorage.removeItem('access_token'); - localStorage.removeItem('expires_at'); - localStorage.removeItem('user'); - this.router.navigate(['/login']); - }; - AuthService.prototype.isLoggedIn = function () { - return __WEBPACK_IMPORTED_MODULE_3_moment__().isBefore(this.getExpiration()); - }; - AuthService.prototype.isLoggedOut = function () { - return !this.isLoggedIn(); - }; - AuthService.prototype.getExpiration = function () { - var expiration = localStorage.getItem('expires_at'); - var expiresAt = JSON.parse(expiration); - return __WEBPACK_IMPORTED_MODULE_3_moment__(expiresAt); - }; - AuthService = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */])(), - __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2__http_requests_service__["a" /* HttpRequestsService */], - __WEBPACK_IMPORTED_MODULE_4__angular_router__["b" /* Router */], - __WEBPACK_IMPORTED_MODULE_1__angular_common_http__["b" /* HttpClient */]]) - ], AuthService); - return AuthService; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/services/carol-querys/main-page.service.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MainPageService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__services_http_requests_service__ = __webpack_require__("../../../../../src/app/services/http-requests.service.ts"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - -var MainPageService = /** @class */ (function () { - function MainPageService(request) { - this.request = request; - } - MainPageService.prototype.runNamedQuery = function (namedQuery, params) { - var url = 'queries/named/' + namedQuery + '?indexType=MASTER&pageSize=0&sortOrder=ASC&scrollable=false'; - return this.request.post(url, params); - }; - MainPageService.prototype.getStringDate = function (date) { - return (date instanceof Date) ? date.toISOString().substring(0, 10) : date; - }; - MainPageService = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */])(), - __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1__services_http_requests_service__["a" /* HttpRequestsService */]]) - ], MainPageService); - return MainPageService; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/services/carol-querys/toolbar-search.service.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ToolbarSearchService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__services_http_requests_service__ = __webpack_require__("../../../../../src/app/services/http-requests.service.ts"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - -var ToolbarSearchService = /** @class */ (function () { - function ToolbarSearchService(request) { - this.request = request; - } - ToolbarSearchService.prototype.getCampaigns = function (value) { - var url = 'queries/named/findCampaigns?indexType=MASTER&pageSize=0&sortOrder=ASC&scrollable=false'; - /** - * camp_name - Campaign Name, string (optional) - * camp_id - Campaign ID, string (optional) - * count - number of matches for the query , (optional) - */ - var params = { - count: '50', - camp_name: value, - }; - return this.request.post(url, params); - }; - ToolbarSearchService.prototype.getCampaignByProduct = function (value) { - var url = 'queries/named/findCampaignsByProduct?indexType=MASTER&pageSize=0&sortOrder=ASC&scrollable=false'; - /** - * prod_name - Product Name, string (optional) - * prod_id - Product ID, string (optional) - * count - number of matches for the query, , (optional) - */ - var params = { - count: '50', - prod_name: value, - }; - return this.request.post(url, params); - }; - ToolbarSearchService = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */])(), - __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1__services_http_requests_service__["a" /* HttpRequestsService */]]) - ], ToolbarSearchService); - return ToolbarSearchService; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/services/http-requests.service.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HttpRequestsService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - -var HttpRequestsService = /** @class */ (function () { - function HttpRequestsService(http) { - this.http = http; - this.subdomain = undefined; - this.rootUrl = undefined; - this.connectorId = '0a0829172fc2433c9aa26460c31b78f0'; - var url = window.location.href; - var domain = url.match("/([a-z0-9|-]+\.)*[a-z0-9|-]+\.[a-z]+")[0]; - var index = domain.indexOf('.carol.ai'); - if (index > -1) { - domain = domain.substring(1, index); - console.info("from url: " + domain); - } - else { - domain = "gd"; - console.info("fixed in the code: " + domain); - } - this.subdomain = domain; - this.rootUrl = 'https://' + domain + '.carol.ai/api/v2/'; - } - HttpRequestsService.prototype.post = function (url, params) { - var body = JSON.stringify(params); - var httpOptions = { - headers: new __WEBPACK_IMPORTED_MODULE_1__angular_common_http__["e" /* HttpHeaders */]({ - 'Content-Type': 'application/json', - 'Cache-Control': 'no-cache' - }) - }; - return this.http.post(this.rootUrl + url, body.toString(), httpOptions); - }; - HttpRequestsService.prototype.get = function (params) { - }; - HttpRequestsService = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */])(), - __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1__angular_common_http__["b" /* HttpClient */]]) - ], HttpRequestsService); - return HttpRequestsService; -}()); - - - -/***/ }), - -/***/ "../../../../../src/app/services/i18n.service.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return I18nService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__i18n_literalsEN__ = __webpack_require__("../../../../../src/app/i18n/literalsEN.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__i18n_literalsPT__ = __webpack_require__("../../../../../src/app/i18n/literalsPT.ts"); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; - - - -var I18nService = /** @class */ (function () { - function I18nService() { - this.currentLanguage = (localStorage.getItem('language')) ? - localStorage.getItem('language') : - navigator.language.substring(0, 2).toUpperCase(); - this.setLiterals(this.currentLanguage); - } - I18nService.prototype.ngOnInit = function () { - }; - I18nService.prototype.getLanguage = function () { - return this.currentLanguage; - }; - I18nService.prototype.setLanguage = function (language) { - this.setLiterals(language); - localStorage.setItem('language', language); - location.reload(); - }; - I18nService.prototype.setLiterals = function (language) { - this.literals = (language === 'PT') ? __WEBPACK_IMPORTED_MODULE_2__i18n_literalsPT__["a" /* PT */] : __WEBPACK_IMPORTED_MODULE_1__i18n_literalsEN__["a" /* EN */]; - }; - I18nService.prototype.getLiterals = function () { - return this.literals; - }; - I18nService = __decorate([ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */])(), - __metadata("design:paramtypes", []) - ], I18nService); - return I18nService; -}()); - - - -/***/ }), - -/***/ "../../../../../src/environments/environment.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return environment; }); -// The file contents for the current environment will overwrite these during build. -// The build system defaults to the dev environment which uses `environment.ts`, but if you do -// `ng build --env=prod` then `environment.prod.ts` will be used instead. -// The list of which env maps to which file can be found in `.angular-cli.json`. -var environment = { - production: false -}; - - -/***/ }), - -/***/ "../../../../../src/main.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser_dynamic__ = __webpack_require__("../../../platform-browser-dynamic/esm5/platform-browser-dynamic.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__app_app_module__ = __webpack_require__("../../../../../src/app/app.module.ts"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__environments_environment__ = __webpack_require__("../../../../../src/environments/environment.ts"); - - - - -if (__WEBPACK_IMPORTED_MODULE_3__environments_environment__["a" /* environment */].production) { - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_17" /* enableProdMode */])(); -} -Object(__WEBPACK_IMPORTED_MODULE_1__angular_platform_browser_dynamic__["a" /* platformBrowserDynamic */])().bootstrapModule(__WEBPACK_IMPORTED_MODULE_2__app_app_module__["a" /* AppModule */]) - .catch(function (err) { return console.log(err); }); - - -/***/ }), - -/***/ "../../../../moment/locale recursive ^\\.\\/.*$": -/***/ (function(module, exports, __webpack_require__) { - -var map = { - "./af": "../../../../moment/locale/af.js", - "./af.js": "../../../../moment/locale/af.js", - "./ar": "../../../../moment/locale/ar.js", - "./ar-dz": "../../../../moment/locale/ar-dz.js", - "./ar-dz.js": "../../../../moment/locale/ar-dz.js", - "./ar-kw": "../../../../moment/locale/ar-kw.js", - "./ar-kw.js": "../../../../moment/locale/ar-kw.js", - "./ar-ly": "../../../../moment/locale/ar-ly.js", - "./ar-ly.js": "../../../../moment/locale/ar-ly.js", - "./ar-ma": "../../../../moment/locale/ar-ma.js", - "./ar-ma.js": "../../../../moment/locale/ar-ma.js", - "./ar-sa": "../../../../moment/locale/ar-sa.js", - "./ar-sa.js": "../../../../moment/locale/ar-sa.js", - "./ar-tn": "../../../../moment/locale/ar-tn.js", - "./ar-tn.js": "../../../../moment/locale/ar-tn.js", - "./ar.js": "../../../../moment/locale/ar.js", - "./az": "../../../../moment/locale/az.js", - "./az.js": "../../../../moment/locale/az.js", - "./be": "../../../../moment/locale/be.js", - "./be.js": "../../../../moment/locale/be.js", - "./bg": "../../../../moment/locale/bg.js", - "./bg.js": "../../../../moment/locale/bg.js", - "./bm": "../../../../moment/locale/bm.js", - "./bm.js": "../../../../moment/locale/bm.js", - "./bn": "../../../../moment/locale/bn.js", - "./bn.js": "../../../../moment/locale/bn.js", - "./bo": "../../../../moment/locale/bo.js", - "./bo.js": "../../../../moment/locale/bo.js", - "./br": "../../../../moment/locale/br.js", - "./br.js": "../../../../moment/locale/br.js", - "./bs": "../../../../moment/locale/bs.js", - "./bs.js": "../../../../moment/locale/bs.js", - "./ca": "../../../../moment/locale/ca.js", - "./ca.js": "../../../../moment/locale/ca.js", - "./cs": "../../../../moment/locale/cs.js", - "./cs.js": "../../../../moment/locale/cs.js", - "./cv": "../../../../moment/locale/cv.js", - "./cv.js": "../../../../moment/locale/cv.js", - "./cy": "../../../../moment/locale/cy.js", - "./cy.js": "../../../../moment/locale/cy.js", - "./da": "../../../../moment/locale/da.js", - "./da.js": "../../../../moment/locale/da.js", - "./de": "../../../../moment/locale/de.js", - "./de-at": "../../../../moment/locale/de-at.js", - "./de-at.js": "../../../../moment/locale/de-at.js", - "./de-ch": "../../../../moment/locale/de-ch.js", - "./de-ch.js": "../../../../moment/locale/de-ch.js", - "./de.js": "../../../../moment/locale/de.js", - "./dv": "../../../../moment/locale/dv.js", - "./dv.js": "../../../../moment/locale/dv.js", - "./el": "../../../../moment/locale/el.js", - "./el.js": "../../../../moment/locale/el.js", - "./en-au": "../../../../moment/locale/en-au.js", - "./en-au.js": "../../../../moment/locale/en-au.js", - "./en-ca": "../../../../moment/locale/en-ca.js", - "./en-ca.js": "../../../../moment/locale/en-ca.js", - "./en-gb": "../../../../moment/locale/en-gb.js", - "./en-gb.js": "../../../../moment/locale/en-gb.js", - "./en-ie": "../../../../moment/locale/en-ie.js", - "./en-ie.js": "../../../../moment/locale/en-ie.js", - "./en-il": "../../../../moment/locale/en-il.js", - "./en-il.js": "../../../../moment/locale/en-il.js", - "./en-nz": "../../../../moment/locale/en-nz.js", - "./en-nz.js": "../../../../moment/locale/en-nz.js", - "./eo": "../../../../moment/locale/eo.js", - "./eo.js": "../../../../moment/locale/eo.js", - "./es": "../../../../moment/locale/es.js", - "./es-do": "../../../../moment/locale/es-do.js", - "./es-do.js": "../../../../moment/locale/es-do.js", - "./es-us": "../../../../moment/locale/es-us.js", - "./es-us.js": "../../../../moment/locale/es-us.js", - "./es.js": "../../../../moment/locale/es.js", - "./et": "../../../../moment/locale/et.js", - "./et.js": "../../../../moment/locale/et.js", - "./eu": "../../../../moment/locale/eu.js", - "./eu.js": "../../../../moment/locale/eu.js", - "./fa": "../../../../moment/locale/fa.js", - "./fa.js": "../../../../moment/locale/fa.js", - "./fi": "../../../../moment/locale/fi.js", - "./fi.js": "../../../../moment/locale/fi.js", - "./fo": "../../../../moment/locale/fo.js", - "./fo.js": "../../../../moment/locale/fo.js", - "./fr": "../../../../moment/locale/fr.js", - "./fr-ca": "../../../../moment/locale/fr-ca.js", - "./fr-ca.js": "../../../../moment/locale/fr-ca.js", - "./fr-ch": "../../../../moment/locale/fr-ch.js", - "./fr-ch.js": "../../../../moment/locale/fr-ch.js", - "./fr.js": "../../../../moment/locale/fr.js", - "./fy": "../../../../moment/locale/fy.js", - "./fy.js": "../../../../moment/locale/fy.js", - "./gd": "../../../../moment/locale/gd.js", - "./gd.js": "../../../../moment/locale/gd.js", - "./gl": "../../../../moment/locale/gl.js", - "./gl.js": "../../../../moment/locale/gl.js", - "./gom-latn": "../../../../moment/locale/gom-latn.js", - "./gom-latn.js": "../../../../moment/locale/gom-latn.js", - "./gu": "../../../../moment/locale/gu.js", - "./gu.js": "../../../../moment/locale/gu.js", - "./he": "../../../../moment/locale/he.js", - "./he.js": "../../../../moment/locale/he.js", - "./hi": "../../../../moment/locale/hi.js", - "./hi.js": "../../../../moment/locale/hi.js", - "./hr": "../../../../moment/locale/hr.js", - "./hr.js": "../../../../moment/locale/hr.js", - "./hu": "../../../../moment/locale/hu.js", - "./hu.js": "../../../../moment/locale/hu.js", - "./hy-am": "../../../../moment/locale/hy-am.js", - "./hy-am.js": "../../../../moment/locale/hy-am.js", - "./id": "../../../../moment/locale/id.js", - "./id.js": "../../../../moment/locale/id.js", - "./is": "../../../../moment/locale/is.js", - "./is.js": "../../../../moment/locale/is.js", - "./it": "../../../../moment/locale/it.js", - "./it.js": "../../../../moment/locale/it.js", - "./ja": "../../../../moment/locale/ja.js", - "./ja.js": "../../../../moment/locale/ja.js", - "./jv": "../../../../moment/locale/jv.js", - "./jv.js": "../../../../moment/locale/jv.js", - "./ka": "../../../../moment/locale/ka.js", - "./ka.js": "../../../../moment/locale/ka.js", - "./kk": "../../../../moment/locale/kk.js", - "./kk.js": "../../../../moment/locale/kk.js", - "./km": "../../../../moment/locale/km.js", - "./km.js": "../../../../moment/locale/km.js", - "./kn": "../../../../moment/locale/kn.js", - "./kn.js": "../../../../moment/locale/kn.js", - "./ko": "../../../../moment/locale/ko.js", - "./ko.js": "../../../../moment/locale/ko.js", - "./ky": "../../../../moment/locale/ky.js", - "./ky.js": "../../../../moment/locale/ky.js", - "./lb": "../../../../moment/locale/lb.js", - "./lb.js": "../../../../moment/locale/lb.js", - "./lo": "../../../../moment/locale/lo.js", - "./lo.js": "../../../../moment/locale/lo.js", - "./lt": "../../../../moment/locale/lt.js", - "./lt.js": "../../../../moment/locale/lt.js", - "./lv": "../../../../moment/locale/lv.js", - "./lv.js": "../../../../moment/locale/lv.js", - "./me": "../../../../moment/locale/me.js", - "./me.js": "../../../../moment/locale/me.js", - "./mi": "../../../../moment/locale/mi.js", - "./mi.js": "../../../../moment/locale/mi.js", - "./mk": "../../../../moment/locale/mk.js", - "./mk.js": "../../../../moment/locale/mk.js", - "./ml": "../../../../moment/locale/ml.js", - "./ml.js": "../../../../moment/locale/ml.js", - "./mn": "../../../../moment/locale/mn.js", - "./mn.js": "../../../../moment/locale/mn.js", - "./mr": "../../../../moment/locale/mr.js", - "./mr.js": "../../../../moment/locale/mr.js", - "./ms": "../../../../moment/locale/ms.js", - "./ms-my": "../../../../moment/locale/ms-my.js", - "./ms-my.js": "../../../../moment/locale/ms-my.js", - "./ms.js": "../../../../moment/locale/ms.js", - "./mt": "../../../../moment/locale/mt.js", - "./mt.js": "../../../../moment/locale/mt.js", - "./my": "../../../../moment/locale/my.js", - "./my.js": "../../../../moment/locale/my.js", - "./nb": "../../../../moment/locale/nb.js", - "./nb.js": "../../../../moment/locale/nb.js", - "./ne": "../../../../moment/locale/ne.js", - "./ne.js": "../../../../moment/locale/ne.js", - "./nl": "../../../../moment/locale/nl.js", - "./nl-be": "../../../../moment/locale/nl-be.js", - "./nl-be.js": "../../../../moment/locale/nl-be.js", - "./nl.js": "../../../../moment/locale/nl.js", - "./nn": "../../../../moment/locale/nn.js", - "./nn.js": "../../../../moment/locale/nn.js", - "./pa-in": "../../../../moment/locale/pa-in.js", - "./pa-in.js": "../../../../moment/locale/pa-in.js", - "./pl": "../../../../moment/locale/pl.js", - "./pl.js": "../../../../moment/locale/pl.js", - "./pt": "../../../../moment/locale/pt.js", - "./pt-br": "../../../../moment/locale/pt-br.js", - "./pt-br.js": "../../../../moment/locale/pt-br.js", - "./pt.js": "../../../../moment/locale/pt.js", - "./ro": "../../../../moment/locale/ro.js", - "./ro.js": "../../../../moment/locale/ro.js", - "./ru": "../../../../moment/locale/ru.js", - "./ru.js": "../../../../moment/locale/ru.js", - "./sd": "../../../../moment/locale/sd.js", - "./sd.js": "../../../../moment/locale/sd.js", - "./se": "../../../../moment/locale/se.js", - "./se.js": "../../../../moment/locale/se.js", - "./si": "../../../../moment/locale/si.js", - "./si.js": "../../../../moment/locale/si.js", - "./sk": "../../../../moment/locale/sk.js", - "./sk.js": "../../../../moment/locale/sk.js", - "./sl": "../../../../moment/locale/sl.js", - "./sl.js": "../../../../moment/locale/sl.js", - "./sq": "../../../../moment/locale/sq.js", - "./sq.js": "../../../../moment/locale/sq.js", - "./sr": "../../../../moment/locale/sr.js", - "./sr-cyrl": "../../../../moment/locale/sr-cyrl.js", - "./sr-cyrl.js": "../../../../moment/locale/sr-cyrl.js", - "./sr.js": "../../../../moment/locale/sr.js", - "./ss": "../../../../moment/locale/ss.js", - "./ss.js": "../../../../moment/locale/ss.js", - "./sv": "../../../../moment/locale/sv.js", - "./sv.js": "../../../../moment/locale/sv.js", - "./sw": "../../../../moment/locale/sw.js", - "./sw.js": "../../../../moment/locale/sw.js", - "./ta": "../../../../moment/locale/ta.js", - "./ta.js": "../../../../moment/locale/ta.js", - "./te": "../../../../moment/locale/te.js", - "./te.js": "../../../../moment/locale/te.js", - "./tet": "../../../../moment/locale/tet.js", - "./tet.js": "../../../../moment/locale/tet.js", - "./tg": "../../../../moment/locale/tg.js", - "./tg.js": "../../../../moment/locale/tg.js", - "./th": "../../../../moment/locale/th.js", - "./th.js": "../../../../moment/locale/th.js", - "./tl-ph": "../../../../moment/locale/tl-ph.js", - "./tl-ph.js": "../../../../moment/locale/tl-ph.js", - "./tlh": "../../../../moment/locale/tlh.js", - "./tlh.js": "../../../../moment/locale/tlh.js", - "./tr": "../../../../moment/locale/tr.js", - "./tr.js": "../../../../moment/locale/tr.js", - "./tzl": "../../../../moment/locale/tzl.js", - "./tzl.js": "../../../../moment/locale/tzl.js", - "./tzm": "../../../../moment/locale/tzm.js", - "./tzm-latn": "../../../../moment/locale/tzm-latn.js", - "./tzm-latn.js": "../../../../moment/locale/tzm-latn.js", - "./tzm.js": "../../../../moment/locale/tzm.js", - "./ug-cn": "../../../../moment/locale/ug-cn.js", - "./ug-cn.js": "../../../../moment/locale/ug-cn.js", - "./uk": "../../../../moment/locale/uk.js", - "./uk.js": "../../../../moment/locale/uk.js", - "./ur": "../../../../moment/locale/ur.js", - "./ur.js": "../../../../moment/locale/ur.js", - "./uz": "../../../../moment/locale/uz.js", - "./uz-latn": "../../../../moment/locale/uz-latn.js", - "./uz-latn.js": "../../../../moment/locale/uz-latn.js", - "./uz.js": "../../../../moment/locale/uz.js", - "./vi": "../../../../moment/locale/vi.js", - "./vi.js": "../../../../moment/locale/vi.js", - "./x-pseudo": "../../../../moment/locale/x-pseudo.js", - "./x-pseudo.js": "../../../../moment/locale/x-pseudo.js", - "./yo": "../../../../moment/locale/yo.js", - "./yo.js": "../../../../moment/locale/yo.js", - "./zh-cn": "../../../../moment/locale/zh-cn.js", - "./zh-cn.js": "../../../../moment/locale/zh-cn.js", - "./zh-hk": "../../../../moment/locale/zh-hk.js", - "./zh-hk.js": "../../../../moment/locale/zh-hk.js", - "./zh-tw": "../../../../moment/locale/zh-tw.js", - "./zh-tw.js": "../../../../moment/locale/zh-tw.js" -}; -function webpackContext(req) { - return __webpack_require__(webpackContextResolve(req)); -}; -function webpackContextResolve(req) { - var id = map[req]; - if(!(id + 1)) // check for number or string - throw new Error("Cannot find module '" + req + "'."); - return id; -}; -webpackContext.keys = function webpackContextKeys() { - return Object.keys(map); -}; -webpackContext.resolve = webpackContextResolve; -module.exports = webpackContext; -webpackContext.id = "../../../../moment/locale recursive ^\\.\\/.*$"; - -/***/ }), - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__("../../../../../src/main.ts"); - - -/***/ }) - -},[0]); -//# sourceMappingURL=main.bundle.js.map \ No newline at end of file diff --git a/web-carolapp/site/main.bundle.js.map b/web-carolapp/site/main.bundle.js.map deleted file mode 100644 index 7239fa5..0000000 --- a/web-carolapp/site/main.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/$_lazy_route_resource lazy","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/app.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/app.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/app.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/app.module.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/app.routing.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/bullet-charts/bullet-charts.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/bullet-charts/bullet-charts.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/bullet-charts/bullet-charts.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/card/card.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/card/card.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/card/card.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/chart-pie/chart-pie.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/chart-pie/chart-pie.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/chart-pie/chart-pie.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/chart/chart.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/chart/chart.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/chart/chart.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/container/container.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/container/container.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/container/container.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/loading/loading.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/loading/loading.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/loading/loading.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/percentage-result/percentage-result.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/percentage-result/percentage-result.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/percentage-result/percentage-result.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/result-box-group/result-box-group.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/result-box-group/result-box-group.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/result-box-group/result-box-group.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/result-box/result-box.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/result-box/result-box.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/result-box/result-box.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/toolbar/toolbar.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/toolbar/toolbar.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/toolbar/toolbar.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/i18n/literalsEN.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/i18n/literalsPT.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/campaign-detail/campaign-detail-page.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/campaign-detail/campaign-detail-page.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/campaign-detail/campaign-detail-page.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/campaigns/campaigns-page.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/campaigns/campaigns-page.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/campaigns/campaigns-page.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/login/login.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/login/login.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/login/login.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/main/main-page.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/main/main-page.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/main/main-page.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/product-detail/product-detail-page.component.css","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/product-detail/product-detail-page.component.html","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/product-detail/product-detail-page.component.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/auth-guard-login.service.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/auth-guard.service.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/auth-interceptor.service.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/auth.service.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/carol-querys/main-page.service.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/carol-querys/toolbar-search.service.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/http-requests.service.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/i18n.service.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/environments/environment.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/main.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/moment/locale ^\\.\\/.*$"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,4CAA4C,WAAW;AACvD;AACA;AACA,yF;;;;;;;ACVA;AACA;;;AAGA;AACA;;AAEA;;;AAGA;AACA,2C;;;;;;;ACXA,oD;;;;;;;;;;;;;;;;;;;ACA0C;AAO1C;IAEE;IAAgB,CAAC;IAFN,YAAY;QALxB,wEAAS,CAAC;YACT,QAAQ,EAAE,UAAU;;;SAGrB,CAAC;;OACW,YAAY,CAIxB;IAAD,mBAAC;CAAA;AAJwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPiC;AACqB;AACtC;AACM;AACF;AAC8B;AAEnC;AAEO;AACe;AACpB;AAEwC;AACjB;AACS;AACM;AACuB;AACxC;AAET;AACiB;AACjB;AAEe;AACO;AACuB;AACf;AACO;AACjC;AACY;AAC+B;AACH;AACxB;AACL;AACiB;AAClB;AACW;AA+C/E;IAAA;IAAyB,CAAC;IAAb,SAAS;QA7CrB,uEAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,oEAAY;gBACZ,2FAAiB;gBACjB,uFAAa;gBACb,sGAAkB;gBAClB,6HAAyB;gBACzB,wGAAkB;gBAClB,gGAAgB;gBAChB,qFAAc;gBACd,yHAAuB;gBACvB,0GAAsB;gBACtB,iHAAqB;gBACrB,2HAA2B;gBAC3B,wHAA0B;gBAC1B,gGAAgB;gBAChB,0FAAc;gBACd,qGAAiB;aAClB;YACD,OAAO,EAAE;gBACP,gFAAa;gBACb,qGAAuB;gBACvB,qEAAY;gBACZ,mEAAW;gBACX,gEAAS;gBACT,oFAAY;gBACZ,8EAAgB;gBAChB,6DAAO;aACR;YACD,SAAS,EAAE;gBACT,4EAAW;gBACX,gFAAS;gBACT,2FAAc;gBACd,6FAAmB;gBACnB,kGAAe;gBACf,4GAAoB;gBACpB,4EAAW;gBACX;oBACE,OAAO,EAAE,+EAAiB;oBAC1B,QAAQ,EAAE,4FAAe;oBACzB,KAAK,EAAE,IAAI;iBACZ;aACF;YACD,SAAS,EAAE,CAAC,oEAAY,CAAC;SAC1B,CAAC;OACW,SAAS,CAAI;IAAD,gBAAC;CAAA;AAAJ;;;;;;;;;;;;;;;;;;ACpFiC;AAEc;AACN;AACqB;AACiB;AACH;AACxC;AACW;AAErE,IAAM,SAAS,GAAW;IAC1B,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,0FAAiB,EAAE,WAAW,EAAE,CAAC,+EAAS,CAAC,EAAE;IACpE,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,oFAAc,EAAE,WAAW,EAAE,CAAC,0FAAc,CAAC,EAAE;IAC3E,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,yGAAsB,EAAE,WAAW,EAAE,CAAC,+EAAS,CAAC,EAAE;IAClF,EAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,0HAA2B,EAAE,WAAW,EAAE,CAAC,+EAAS,CAAC,EAAE;IAC1F,EAAE,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,uHAA0B,EAAE,WAAW,EAAE,CAAC,+EAAS,CAAC,EAAE;IACxF,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE;CAC7B,CAAC;AAEK,IAAM,OAAO,GAAG,qEAAY,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;;;;;;;;ACnBvD;AACA;;;AAGA;AACA,yCAA0C,qBAAqB,qBAAqB,GAAG,0BAA0B,oBAAoB,eAAe,qBAAqB,sBAAsB,0BAA0B,GAAG,4BAA4B,eAAe,0BAA0B,sBAAsB,wBAAwB,GAAG,2BAA2B,oBAAoB,eAAe,0BAA0B,uBAAuB,sBAAsB,wBAAwB,GAAG;;AAElf;;;AAGA;AACA,2C;;;;;;;ACXA,6KAA6K,gBAAgB,2IAA2I,cAAc,iJAAiJ,gBAAgB,KAAK,cAAc,sC;;;;;;;;;;;;;;;;;;;ACAjd;AAUzD;IA4BE;QA1BA,kBAAa,GAAG,EAAE,CAAC;QAEV,UAAK,GAAG,EAAE,CAAC;QAEX,iBAAY,GAAG,SAAS,CAAC;QAEzB,mBAAc,GAAG,SAAS,CAAC;IAoBpB,CAAC;IAlBA,sBAAI,+CAAY;aAAhB,UAAiB,YAAiC;YAAnE,iBAgBC;YAfC,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;YAElC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,eAAK;gBAC9B,KAAK,CAAC,iBAAiB,CAAC,GAAG;oBACzB,GAAG,EAAE,CAAC;oBACN,GAAG,EAAE,KAAK,CAAC,GAAG;oBACd,SAAS,EAAE;wBACT;4BACE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAI,CAAC,YAAY;yBAC7F,EAAE;4BACD,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,KAAI,CAAC,cAAc;yBAC3G;qBACF;iBACF,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC;;;OAAA;IAID,wCAAQ,GAAR;IACA,CAAC;IA3BQ;QAAR,oEAAK,EAAE;;wDAAY;IAEX;QAAR,oEAAK,EAAE;;+DAA0B;IAEzB;QAAR,oEAAK,EAAE;;iEAA4B;IAEnB;QAAhB,oEAAK,CAAC,QAAQ,CAAC;kCAAgC,KAAK;yCAAL,KAAK;6DAgBpD;IA1BU,qBAAqB;QANjC,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,eAAe;;;SAG1B,CAAC;;OACW,qBAAqB,CAiCjC;IAAD,4BAAC;CAAA;AAjCiC;;;;;;;;ACVlC;AACA;;;AAGA;AACA,wCAAyC,mBAAmB,oBAAoB,sBAAsB,6BAA6B,GAAG;;AAEtI;;;AAGA;AACA,2C;;;;;;;ACXA,mIAAmI,SAAS,yE;;;;;;;;;;;;;;;;;;;ACAnF;AAQzD;IAIE;QAFS,UAAK,GAAG,EAAE,CAAC;IAEJ,CAAC;IAEjB,gCAAQ,GAAR;IACA,CAAC;IALQ;QAAR,oEAAK,EAAE;;gDAAY;IAFT,aAAa;QANzB,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,MAAM;;;SAGjB,CAAC;;OACW,aAAa,CASzB;IAAD,oBAAC;CAAA;AATyB;;;;;;;;ACR1B;AACA;;;AAGA;AACA;;AAEA;;;AAGA;AACA,2C;;;;;;;ACXA,qgB;;;;;;;;;;;;;;;;;;;ACAyD;AAQzD;IAqBE;QAVA;;;WAGG;QACM,WAAM,GAAkB,IAAI,CAAC;QAE7B,WAAM,GAAG,IAAI,CAAC;QAEd,WAAM,GAAG,EAAE,CAAC;IAEL,CAAC;IAEjB,oCAAQ,GAAR;IACA,CAAC;IAfQ;QAAR,oEAAK,EAAE;kCAAO,KAAK;mDAAM;IAMjB;QAAR,oEAAK,EAAE;kCAAS,KAAK;qDAAgB;IAE7B;QAAR,oEAAK,EAAE;;qDAAe;IAEd;QAAR,oEAAK,EAAE;;qDAAa;IAnBV,iBAAiB;QAN7B,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,WAAW;;;SAGtB,CAAC;;OACW,iBAAiB,CA0B7B;IAAD,wBAAC;CAAA;AA1B6B;;;;;;;;ACR9B;AACA;;;AAGA;AACA;;AAEA;;;AAGA;AACA,2C;;;;;;;ACXA,6UAA6U,yBAAyB,wNAAwN,EAAE,iS;;;;;;;;;;;;;;;;;;;ACAvgB;AAQzD;IAuCE;QArCS,UAAK,GAAG,EAAE,CAAC;QAEpB;;;;;WAKG;QACM,SAAI,GAAG,MAAM,CAAC;QAEvB;;;WAGG;QACM,eAAU,GAAG,EAAE,CAAC;QAEzB;;;;;;WAMG;QACM,WAAM,GAAG,EAAE,CAAC;QAErB;;;WAGG;QACM,WAAM,GAAG,EAAE,CAAC;QAEZ,WAAM,GAAG,EAAE,CAAC;QAEZ,WAAM,GAAG,IAAI,CAAC;QAEd,YAAO,GAAG,KAAK,CAAC;IAET,CAAC;IAEjB,iCAAQ,GAAR;IACA,CAAC;IAxCQ;QAAR,oEAAK,EAAE;;iDAAY;IAQX;QAAR,oEAAK,EAAE;;gDAAe;IAMd;QAAR,oEAAK,EAAE;;sDAAiB;IAShB;QAAR,oEAAK,EAAE;;kDAAa;IAMZ;QAAR,oEAAK,EAAE;;kDAAa;IAEZ;QAAR,oEAAK,EAAE;;kDAAa;IAEZ;QAAR,oEAAK,EAAE;;kDAAe;IAEd;QAAR,oEAAK,EAAE;;mDAAiB;IArCd,cAAc;QAN1B,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,OAAO;;;SAGlB,CAAC;;OACW,cAAc,CA4C1B;IAAD,qBAAC;CAAA;AA5C0B;;;;;;;;ACR3B;AACA;;;AAGA;AACA,gCAAiC,iBAAiB,yBAAyB,mBAAmB,iBAAiB,GAAG,gBAAgB,iBAAiB,oBAAoB,sBAAsB,uBAAuB,uBAAuB,iBAAiB,uBAAuB,aAAa,eAAe,GAAG,kBAAkB,8BAA8B,iBAAiB,kBAAkB,oBAAoB,GAAG,wBAAwB,eAAe,iBAAiB,4BAA4B,qBAAqB,uBAAuB,gCAAgC,GAAG,mBAAmB,8BAA8B,8BAA8B,kBAAkB,uBAAuB,gBAAgB,GAAG,wBAAwB,8BAA8B,iBAAiB,gBAAgB,mBAAmB,GAAG,0BAA0B,8BAA8B,iBAAiB,gBAAgB,mBAAmB,GAAG,4BAA4B,sBAAsB,uBAAuB,GAAG,8BAA8B,sBAAsB,uBAAuB,GAAG;;AAEhkC;;;AAGA;AACA,2C;;;;;;;ACXA,gtB;;;;;;;;;;;;;;;;;;;ACAsE;AAQtE;IAIE;IAAgB,CAAC;IAEjB,qCAAQ,GAAR;IACA,CAAC;IALQ;QAAR,oEAAK,EAAE;kCAAkB,mEAAW;+DAAM;IAFhC,kBAAkB;QAN9B,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,WAAW;;;SAGtB,CAAC;;OACW,kBAAkB,CAS9B;IAAD,yBAAC;CAAA;AAT8B;;;;;;;;ACR/B;AACA;;;AAGA;AACA,uCAAwC,yBAAyB,yBAAyB,kBAAkB,8BAA8B,+BAA+B,gCAAgC,6BAA6B,8BAA8B,oCAAoC,iBAAiB,GAAG;;AAE5T;;;AAGA;AACA,2C;;;;;;;ACXA,uE;;;;;;;;;;;;;;;;;;;ACAkD;AAQlD;IAEE;IAAgB,CAAC;IAEjB,mCAAQ,GAAR;IACA,CAAC;IALU,gBAAgB;QAN5B,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,SAAS;;;SAGpB,CAAC;;OACW,gBAAgB,CAO5B;IAAD,uBAAC;CAAA;AAP4B;;;;;;;;ACR7B;AACA;;;AAGA;AACA,6CAA8C,gBAAgB,qBAAqB,oBAAoB,oBAAoB,GAAG,wCAAwC,eAAe,iBAAiB,oBAAoB,uBAAuB,GAAG,8BAA8B,gBAAgB,iBAAiB,wBAAwB,GAAG,6BAA6B,eAAe,sBAAsB,0BAA0B,GAAG;;AAE7a;;;AAGA;AACA,2C;;;;;;;ACXA,8PAA8P,UAAU,GAAG,QAAQ,mB;;;;;;;;;;;;;;;;;;;ACA1N;AAQzD;IA2BE;QAzBA,WAAM,GAAG,SAAS,CAAC;QACnB,eAAU,GAAG,MAAM,CAAC;QACpB,cAAS,GAAG,8BAA8B,CAAC;QAC3C,WAAM,GAAG,IAAI,CAAC;QAoBL,SAAI,GAAG,EAAE,CAAC;IAEH,CAAC;IApBR,sBAAI,4CAAK;aAAT,UAAU,KAAK;YACtB,IAAI,CAAC,MAAM,GAAG,KAAK,GAAG,GAAG,CAAC;YAE1B,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC1B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;gBACvB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;gBACxB,IAAI,CAAC,SAAS,GAAG,4BAA4B,CAAC;YAChD,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBACjC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;gBACzB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;gBACxB,IAAI,CAAC,SAAS,GAAG,8BAA8B,CAAC;YAClD,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;gBACzB,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;gBACzB,IAAI,CAAC,SAAS,GAAG,8BAA8B,CAAC;YAClD,CAAC;QACH,CAAC;;;OAAA;IAMD,4CAAQ,GAAR;IACA,CAAC;IAvBQ;QAAR,oEAAK,EAAE;;;0DAgBP;IAEQ;QAAR,oEAAK,EAAE;;2DAAW;IAzBR,yBAAyB;QANrC,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,mBAAmB;;;SAG9B,CAAC;;OACW,yBAAyB,CAgCrC;IAAD,gCAAC;CAAA;AAhCqC;;;;;;;;ACRtC;AACA;;;AAGA;AACA,gCAAiC,gBAAgB,GAAG;;AAEpD;;;AAGA;AACA,2C;;;;;;;ACXA,8EAA8E,iHAAiH,2EAA2E,iBAAiB,kL;;;;;;;;;;;;;;;;;;;ACAlO;AAQzD;IAkBE;QAhBC,YAAO,GAAG;YACT;gBACE,KAAK,EAAE,EAAE;gBACT,OAAO,EAAE,EAAE;gBACX,KAAK,EAAE,EAAE;gBACT,eAAe,EAAE,EAAE;gBACnB,cAAc,EAAE,EAAE;aACnB;SACF,CAAC;IAQc,CAAC;IANR,sBAAI,2CAAM;aAAV,UAAW,MAAM;YACxB,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC;gBAC/B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;YACxB,CAAC;QACH,CAAC;;;OAAA;IAID,0CAAQ,GAAR;IACA,CAAC;IATQ;QAAR,oEAAK,EAAE;;;yDAIP;IAhBU,uBAAuB;QANnC,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,kBAAkB;;;SAG7B,CAAC;;OACW,uBAAuB,CAuBnC;IAAD,8BAAC;CAAA;AAvBmC;;;;;;;;ACRpC;AACA;;;AAGA;AACA,sCAAuC,iBAAiB,8BAA8B,GAAG,uBAAuB,oBAAoB,sBAAsB,wBAAwB,GAAG,yBAAyB,mBAAmB,oBAAoB,GAAG,2BAA2B,qBAAqB,GAAG;;AAE3S;;;AAGA;AACA,2C;;;;;;;ACXA,gOAAgO,SAAS,+R;;;;;;;;;;;;;;;;;;;ACAhL;AAQzD;IAgBE;QAdA,cAAS,GAAG,SAAS,CAAC;QACtB,gBAAW,GAAG,SAAS,CAAC;QASf,UAAK,GAAG,EAAE,CAAC;QAEX,cAAS,GAAG,EAAE,CAAC;IAER,CAAC;IAXG,sBAAI,wCAAQ;aAAZ,UAAa,QAAQ;YACvC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACb,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;gBAC1B,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC;YAC9B,CAAC;QACH,CAAC;;;OAAA;IAQD,qCAAQ,GAAR;IACA,CAAC;IAdmB;QAAnB,oEAAK,CAAC,WAAW,CAAC;;;sDAKlB;IAEQ;QAAR,oEAAK,EAAE;;qDAAY;IAEX;QAAR,oEAAK,EAAE;;yDAAgB;IAdb,kBAAkB;QAN9B,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,YAAY;;;SAGvB,CAAC;;OACW,kBAAkB,CAqB9B;IAAD,yBAAC;CAAA;AArB8B;;;;;;;;ACR/B;AACA;;;AAGA;AACA,mCAAoC,iBAAiB,8BAA8B,iBAAiB,GAAG,sBAAsB,iBAAiB,iBAAiB,8BAA8B,oBAAoB,sBAAsB,2DAA2D,mDAAmD,oBAAoB,GAAG,qBAAqB,uBAAuB,gBAAgB,eAAe,iBAAiB,GAAG,WAAW,qBAAqB,sBAAsB,gBAAgB,iBAAiB,oBAAoB,iBAAiB,kCAAkC,mBAAmB,kBAAkB,GAAG,sCAAsC,8DAA8D,eAAe,iBAAiB,iCAAiC,8DAA8D,eAAe,iBAAiB,kCAAkC,8DAA8D,eAAe,iBAAiB,wBAAwB,8DAA8D,eAAe,iBAAiB,2BAA2B,qBAAqB,sBAAsB,uBAAuB,GAAG,0BAA0B,iBAAiB,iBAAiB,mBAAmB,oBAAoB,GAAG,iCAAiC,gBAAgB,uBAAuB,sBAAsB,oBAAoB,GAAG,uCAAuC,6BAA6B,qCAAqC,gBAAgB,+BAA+B,GAAG,sCAAsC,gBAAgB,qBAAqB,GAAG,6BAA6B,gBAAgB,uBAAuB,+BAA+B,oBAAoB,GAAG,mCAAmC,6BAA6B,kCAAkC,gBAAgB,qBAAqB,GAAG,0BAA0B,gBAAgB,oBAAoB,GAAG,yBAAyB,uBAAuB,cAAc,qBAAqB,mBAAmB,sBAAsB,0DAA0D,kDAAkD,eAAe,8BAA8B,uBAAuB,gBAAgB,qBAAqB,sBAAsB,mBAAmB,GAAG,uBAAuB,mBAAmB,sBAAsB,0BAA0B,mBAAmB,oBAAoB,oBAAoB,GAAG,6BAA6B,6BAA6B,uBAAuB,8BAA8B,mBAAmB,sBAAsB,0BAA0B,mBAAmB,oBAAoB,GAAG,uBAAuB,uBAAuB,cAAc,qBAAqB,mBAAmB,sBAAsB,0DAA0D,kDAAkD,eAAe,8BAA8B,uBAAuB,GAAG,4BAA4B,mBAAmB,sBAAsB,0BAA0B,mBAAmB,oBAAoB,GAAG,kCAAkC,6BAA6B,oCAAoC,uBAAuB,GAAG;;AAEvxG;;;AAGA;AACA,2C;;;;;;;ACXA,qXAAqX,iBAAiB,gWAAgW,kBAAkB,6RAA6R,iBAAiB,2tBAA2tB,YAAY,8FAA8F,YAAY,ivBAAivB,QAAQ,sHAAsH,QAAQ,uP;;;;;;;;;;;;;;;;;;;;;;;;;;ACA1pF;AAC3C;AAEmB;AACF;AACgC;AAElD;AACA;AAQxC;IAkBE,0BAAoB,IAAiB,EACjB,aAAmC,EACnC,WAAwB,EACxB,QAAmB,EACnB,MAAc;QAJlC,iBAQC;QARmB,SAAI,GAAJ,IAAI,CAAa;QACjB,kBAAa,GAAb,aAAa,CAAsB;QACnC,gBAAW,GAAX,WAAW,CAAa;QACxB,aAAQ,GAAR,QAAQ,CAAW;QACnB,WAAM,GAAN,MAAM,CAAQ;QApBlC,qBAAgB,GAAG,KAAK,CAAC;QACzB,yBAAoB,GAAG,KAAK,CAAC;QAC7B,kBAAa,GAAG,KAAK,CAAC;QAGtB,gBAAW,GAAG,EAAE,CAAC;QACjB,SAAI,GAAG,UAAU,CAAC;QAGlB,cAAS,GAAG,EAAE,CAAC;QACf,aAAQ,GAAG,EAAE,CAAC;QACd,uBAAkB,GAAG,KAAK,CAAC;QAC3B,sBAAiB,GAAG,KAAK,CAAC;QASxB,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,EAAE,UAAC,KAAiB;YACrD,KAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,mCAAQ,GAAR;QACE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QACxC,IAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,yCAAc,GAAd,UAAe,QAAQ;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAED,iCAAM,GAAN;QACE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;IAC5B,CAAC;IAED,uCAAY,GAAZ,UAAa,KAAK;QAAlB,iBAwDC;QAvDC,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC;QACT,CAAC;QAED,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;QAC/B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAE9B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QAEnB,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC;aACnC,SAAS,CACR,gBAAM;YACJ,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;YAEpC,KAAI,CAAC,SAAS,GAAG,wDAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC;iBACvD,GAAG,CAAC,UAAS,CAAC;gBACb,MAAM,CAAC;oBACL,KAAK,EAAE,wDAAQ,CAAC,CAAC,EAAE,sBAAsB,CAAC;oBAC1C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;iBAChB,CAAC;YACJ,CAAC,CAAC,CAAC;YAEL,UAAU,CAAC;gBACT,KAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;YAClC,CAAC,EAAE,IAAI,CAAC,CAAC;QACX,CAAC,EACD,eAAK;YACH,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;YACzC,KAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QACrC,CAAC,CAAC,CAAC;QAEJ,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,KAAK,CAAC;aAC3C,SAAS,CACR,gBAAM;YACJ,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;YAE5C,KAAI,CAAC,QAAQ,GAAG,wDAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC;iBACtD,MAAM,CAAC,WAAC,IAAI,QAAC,CAAC,UAAU,CAAC,EAAb,CAAa,CAAC;iBAC1B,GAAG,CAAC,UAAS,CAAC;gBACb,MAAM,CAAC;oBACL,KAAK,EAAE,wDAAQ,CAAC,CAAC,EAAE,sBAAsB,CAAC;oBAC1C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;iBAChB,CAAC;YACJ,CAAC,CAAC,CAAC;YAEL,UAAU,CAAC;gBACT,KAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;YACjC,CAAC,EAAE,IAAI,CAAC,CAAC;QACX,CAAC,EACD,eAAK;YACH,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;YACjD,KAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QACpC,CAAC,CAAC,CAAC;IACN,CAAC;IAED,mDAAwB,GAAxB,UAAyB,KAAK;QAC5B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC5D,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC7B,CAAC;IACH,CAAC;IAzF8C;QAA9C,0EAAS,CAAC,cAAc,EAAE,EAAC,IAAI,EAAE,iEAAU,EAAC,CAAC;kCAAe,iEAAU;0DAAC;IAhB7D,gBAAgB;QAN5B,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,SAAS;;;SAGpB,CAAC;yCAmB0B,2EAAW;YACF,2GAAoB;YACtB,2EAAW;YACd,gEAAS;YACX,+DAAM;OAtBvB,gBAAgB,CA2G5B;IAAD,uBAAC;CAAA;AA3G4B;;;;;;;;;;AChBtB,IAAM,EAAE,GAAG;IAChB,UAAU,EAAE,6BAA6B;IACzC,UAAU,EAAE,WAAW;IACvB,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,cAAc;IAC3B,iBAAiB,EAAE,oBAAoB;IACvC,QAAQ,EAAE,UAAU;IACpB,oBAAoB,EAAE,uBAAuB;CAC9C,CAAC;;;;;;;;;;ACVK,IAAM,EAAE,GAAG;IAChB,UAAU,EAAE,wBAAwB;IACpC,UAAU,EAAE,WAAW;IACvB,eAAe,EAAE,oBAAoB;IACrC,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,iBAAiB;IAC9B,iBAAiB,EAAE,uBAAuB;IAC1C,QAAQ,EAAE,MAAM;IAChB,oBAAoB,EAAE,0BAA0B;CACjD,CAAC;;;;;;;;ACVF;AACA;;;AAGA;AACA,0CAA2C,oBAAoB,sBAAsB,0BAA0B,kBAAkB,GAAG,oBAAoB,iBAAiB,iBAAiB,oBAAoB,8BAA8B,0BAA0B,qBAAqB,sBAAsB,GAAG;;AAEpT;;;AAGA;AACA,2C;;;;;;;ACXA,8qB;;;;;;;;;;;;;;;;;;;ACAkD;AAWlD;IAsCE;QAAA,iBAAiB;QApCjB,kBAAa,GAAwB;YACnC,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAC;SAC7F,CAAC;QAEc,YAAO,GAAqB;YAC1C,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAC,KAAK,EAAE,GAAG,IAAO,KAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;YAC3G,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAC;YAC1C,EAAE,MAAM,EAAE,QAAQ,EAAG,KAAK,EAAE,OAAO,EAAE;YACrC,EAAE,MAAM,EAAE,WAAW,EAAG,KAAK,EAAE,cAAc,EAAE;YAC/C,EAAE,MAAM,EAAE,UAAU,EAAG,KAAK,EAAE,iCAAiC,EAAE;YACjE,mFAAmF;YACnF,uEAAuE;YACvE,oFAAoF;YACpF,2EAA2E;YAC3E,KAAK;YACL,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE;SACrE,CAAC;QAEc,UAAK,GAAe;YAClC,EAAE,QAAQ,EAAE,cAAc;gBACxB,OAAO,EAAE,4CAA4C;gBACrD,IAAI,EAAE,2BAA2B;gBACjC,MAAM,EAAE,kBAAkB,EAAE;YAC9B,EAAE,QAAQ,EAAE,mBAAmB;gBAC7B,OAAO,EAAE,0DAA0D;gBACnE,IAAI,EAAE,2BAA2B;gBACjC,MAAM,EAAE,gBAAgB;gBACxB,MAAM,EAAE,YAAY,EAAC;YACvB,EAAE,QAAQ,EAAE,mBAAmB;gBAC7B,OAAO,EAAE,0DAA0D;gBACnE,IAAI,EAAE,2BAA2B;gBACjC,MAAM,EAAE,gBAAgB;gBACxB,MAAM,EAAE,YAAY;aACrB;SACF,CAAC;IAEc,CAAC;IAEjB,uDAAiB,GAAjB,UAAkB,GAAG,EAAE,MAAM;QAE3B,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,QAAQ,CAAC;QAClB,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7C,MAAM,CAAC,SAAS,CAAC;QACnB,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,SAAS,CAAC;QACnB,CAAC;IAEH,CAAC;IAED,4CAAM,GAAN,UAAO,KAAK,EAAE,GAAG;QACf,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,kBAAkB,CAAC,CAAC;IAC9C,CAAC;IAtDU,2BAA2B;QANvC,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,sBAAsB;;;SAGjC,CAAC;;OACW,2BAA2B,CAwDvC;IAAD,kCAAC;CAAA;AAxDuC;;;;;;;;ACXxC;AACA;;;AAGA;AACA;;AAEA;;;AAGA;AACA,2C;;;;;;;ACXA,yzB;;;;;;;;;;;;;;;;;;;ACAkD;AAWlD;IAuBE;QAAA,iBAAiB;QArBjB,kBAAa,GAAwB;YACnC,EAAC,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAC;YAC9C,EAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAC;YACnD,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAC;YACzC,EAAC,KAAK,EAAE,uBAAuB,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAC;YACzD,EAAC,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAC;SAC3D,CAAC;QAEF,mBAAc,GAAwB;YACpC,EAAC,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAC;YAC9C,EAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAC;YACnD,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAC;YACzC,EAAC,KAAK,EAAE,uBAAuB,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAC;YACzD,EAAC,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAC;SAC3D,CAAC;QAEF,iBAAY,GAAG,EAGd,CAAC;QAIc,YAAO,GAAqB;YAC1C,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAC,KAAK,EAAE,GAAG,IAAO,KAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;YAC7G,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAC;YAC1C,EAAE,MAAM,EAAE,QAAQ,EAAG,KAAK,EAAE,OAAO,EAAE;YACrC,EAAE,MAAM,EAAE,WAAW,EAAG,KAAK,EAAE,cAAc,EAAE;YAC/C,EAAE,MAAM,EAAE,UAAU,EAAG,KAAK,EAAE,iCAAiC,EAAE;YACjE,mFAAmF;YACnF,uEAAuE;YACvE,oFAAoF;YACpF,2EAA2E;YAC3E,KAAK;YACL,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE;SACrE,CAAC;QAEc,UAAK,GAAe;YAClC,EAAE,QAAQ,EAAE,cAAc;gBACxB,OAAO,EAAE,4CAA4C;gBACrD,IAAI,EAAE,2BAA2B;gBACjC,MAAM,EAAE,kBAAkB,EAAE;YAC9B,EAAE,QAAQ,EAAE,mBAAmB;gBAC7B,OAAO,EAAE,0DAA0D;gBACnE,IAAI,EAAE,2BAA2B;gBACjC,MAAM,EAAE,gBAAgB;gBACxB,MAAM,EAAE,YAAY,EAAC;YACvB,EAAE,QAAQ,EAAE,mBAAmB;gBAC7B,OAAO,EAAE,0DAA0D;gBACnE,IAAI,EAAE,2BAA2B;gBACjC,MAAM,EAAE,gBAAgB;gBACxB,MAAM,EAAE,YAAY;aACrB;SACF,CAAC;IAhCc,CAAC;IAkCjB,kDAAiB,GAAjB,UAAkB,GAAG,EAAE,MAAM;QAE3B,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,QAAQ,CAAC;QAClB,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7C,MAAM,CAAC,SAAS,CAAC;QACnB,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,SAAS,CAAC;QACnB,CAAC;IAEH,CAAC;IAED,uCAAM,GAAN,UAAO,KAAK,EAAE,GAAG;QACf,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,kBAAkB,CAAC,CAAC;IAC9C,CAAC;IAED,yCAAQ,GAAR;IACA,CAAC;IA1EU,sBAAsB;QANlC,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,gBAAgB;;;SAG3B,CAAC;;OACW,sBAAsB,CA4ElC;IAAD,6BAAC;CAAA;AA5EkC;;;;;;;;ACXnC;AACA;;;AAGA;AACA;;AAEA;;;AAGA;AACA,2C;;;;;;;ACXA,yH;;;;;;;;;;;;;;;;;;;;;;ACA0C;AACD;AAEiE;AAEhD;AAS1D;IAEE,wBAAoB,WAAwB,EACxB,MAAc,EACd,eAAuC;QAFvC,gBAAW,GAAX,WAAW,CAAa;QACxB,WAAM,GAAN,MAAM,CAAQ;QACd,oBAAe,GAAf,eAAe,CAAwB;IAAI,CAAC;IAEhE,mCAAU,GAAV,UAAW,MAAM;QAAjB,iBAgBC;QAfC,sDAAsD;QACtD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC7D,gBAAM;YACJ,KAAI,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;YAClD,KAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAE,KAAI,CAAC,WAAW,CAAC,WAAW,CAAE,CAAC,CAAC;QACzD,CAAC,EACD,eAAK;YACH,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC;gBACzB,KAAI,CAAC,eAAe,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;YACjD,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,KAAI,CAAC,eAAe,CAAC,OAAO,CAAC,kCAAkC,CAAC,CAAC;YACnE,CAAC;QACH,CAAC,CACF,CAAC;IAEJ,CAAC;IAtBU,cAAc;QAN1B,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,OAAO;;;SAGlB,CAAC;yCAGiC,2EAAW;YAChB,+DAAM;YACG,gIAAsB;OAJhD,cAAc,CAwB1B;IAAD,qBAAC;CAAA;AAxB0B;;;;;;;;ACd3B;AACA;;;AAGA;AACA;;AAEA;;;AAGA;AACA,2C;;;;;;;ACXA,iaAAia,sxBAAsxB,8L;;;;;;;;;;;;;;;;;;;;;ACCroC;AAEQ;AACsB;AAYhF;IAYE,2BAAoB,eAAgC,EAChC,IAAiB;QADjB,oBAAe,GAAf,eAAe,CAAiB;QAChC,SAAI,GAAJ,IAAI,CAAa;QAPrC,sBAAiB,GAAG,EAAE,CAAC;QACvB,yBAAoB,GAAG,EAAE,CAAC;QAE1B,uBAAkB,GAAG,EAAE,CAAC;QACxB,2BAAsB,GAAG,EAAE,CAAC;IAGa,CAAC;IAE1C,oCAAQ,GAAR;QAEE,IAAI,CAAC,cAAc,GAAG,CAAC;gBACrB,KAAK,EAAE,GAAG;gBACV,OAAO,EAAE,QAAQ;gBACjB,KAAK,EAAE,SAAS;gBAChB,eAAe,EAAE,EAAE;gBACnB,cAAc,EAAE,EAAE;aACnB;YACD;gBACE,KAAK,EAAE,GAAG;gBACV,OAAO,EAAE,WAAW;gBACpB,KAAK,EAAE,MAAM;gBACb,eAAe,EAAE,IAAI;gBACrB,cAAc,EAAE,EAAE;aACnB,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAED,wCAAY,GAAZ,UAAa,CAAM;QACjB,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IACpB,CAAC;IAED,qCAAS,GAAT;QAAA,iBAuEC;QAtEC,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,gBAAM;YAC3E,EAAE,EAAC,MAAM,IAAI,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,IAAI,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC;gBACjJ,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC;gBAChD,KAAI,CAAC,uBAAuB,GAAG,EAAE,CAAC;gBAElC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC;oBACrB,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;wBAC7B,IAAI,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC;wBAEnC,EAAE,EAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC;4BACd,KAAK,GAAG,KAAK,GAAC,MAAM,CAAC,WAAW,CAAC,CAAC;wBACpC,CAAC;wBAED,KAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAC,CAAC,CAAC;wBAC7D,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;oBAChC,CAAC;gBACJ,CAAC;YACL,CAAC;QACL,CAAC,EAAE,eAAK;YACJ,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;QAEH,iBAAiB,CAAC,EAAC,CAAC;YAClB,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC;gBAClB,MAAM,CAAC,CAAC,CAAC,CAAC;YACZ,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC;gBAClB,MAAM,CAAC,CAAC,CAAC;YACX,MAAM,CAAC,CAAC,CAAC;QACX,CAAC;QAED,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,gBAAM;YACnE,KAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC;YAE5B,EAAE,EAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC;gBACrB,EAAE,EAAC,MAAM,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC;oBAC7B,EAAE,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC;wBACrC,EAAE,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC;4BAChD,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;4BAE9C,GAAG,EAAC,IAAI,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC;gCACnB,EAAE,EAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oCAC3B,IAAI,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;oCAErB,KAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,EAAC,CAAC,CAAC;oCAC9F,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gCACtB,CAAC;4BACL,CAAC;4BAED,KAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;wBACzC,CAAC;oBACL,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC,EAAE,eAAK;YACJ,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,gBAAM;YACrE,KAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;QAC1D,CAAC,EAAE,eAAK;YACJ,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,gBAAM;YACxE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;YACrC,KAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;QAC1D,CAAC,EAAE,eAAK;YACJ,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;IAEL,CAAC;IA9GU,iBAAiB;QAN7B,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,WAAW;;;SAGtB,CAAC;yCAaqC,iGAAe;YAC1B,2EAAW;OAb1B,iBAAiB,CA+G7B;IAAD,wBAAC;CAAA;AA/G6B;;;;;;;;AChB9B;AACA;;;AAGA;AACA,0CAA2C,oBAAoB,sBAAsB,0BAA0B,kBAAkB,GAAG,oBAAoB,iBAAiB,iBAAiB,oBAAoB,8BAA8B,0BAA0B,qBAAqB,sBAAsB,GAAG;;AAEpT;;;AAGA;AACA,2C;;;;;;;ACXA,koBAAkoB,sH;;;;;;;;;;;;;;;;;;;ACAhlB;AAWlD;IAyCE;QAAA,iBAAiB;QAvCjB,gBAAW,GAAwB;YACjC,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAC;YAC5F,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAC;YAC5F,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAC;YAC5F,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAC;SAC7F,CAAC;QAEc,YAAO,GAAqB;YAC1C,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAC,KAAK,EAAE,GAAG,IAAO,KAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;YAC3G,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAC;YAC1C,EAAE,MAAM,EAAE,QAAQ,EAAG,KAAK,EAAE,OAAO,EAAE;YACrC,EAAE,MAAM,EAAE,WAAW,EAAG,KAAK,EAAE,cAAc,EAAE;YAC/C,EAAE,MAAM,EAAE,UAAU,EAAG,KAAK,EAAE,iCAAiC,EAAE;YACjE,mFAAmF;YACnF,uEAAuE;YACvE,oFAAoF;YACpF,2EAA2E;YAC3E,KAAK;YACL,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE;SACrE,CAAC;QAEc,UAAK,GAAe;YAClC,EAAE,QAAQ,EAAE,cAAc;gBACxB,OAAO,EAAE,4CAA4C;gBACrD,IAAI,EAAE,2BAA2B;gBACjC,MAAM,EAAE,kBAAkB,EAAE;YAC9B,EAAE,QAAQ,EAAE,mBAAmB;gBAC7B,OAAO,EAAE,0DAA0D;gBACnE,IAAI,EAAE,2BAA2B;gBACjC,MAAM,EAAE,gBAAgB;gBACxB,MAAM,EAAE,YAAY,EAAC;YACvB,EAAE,QAAQ,EAAE,mBAAmB;gBAC7B,OAAO,EAAE,0DAA0D;gBACnE,IAAI,EAAE,2BAA2B;gBACjC,MAAM,EAAE,gBAAgB;gBACxB,MAAM,EAAE,YAAY;aACrB;SACF,CAAC;IAEc,CAAC;IAEjB,sDAAiB,GAAjB,UAAkB,GAAG,EAAE,MAAM;QAE3B,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,QAAQ,CAAC;QAClB,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7C,MAAM,CAAC,SAAS,CAAC;QACnB,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,SAAS,CAAC;QACnB,CAAC;IAEH,CAAC;IAED,2CAAM,GAAN,UAAO,KAAK,EAAE,GAAG;QACf,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,kBAAkB,CAAC,CAAC;IAC9C,CAAC;IAzDU,0BAA0B;QANtC,wEAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,qBAAqB;;;SAGhC,CAAC;;OACW,0BAA0B,CA2DtC;IAAD,iCAAC;CAAA;AA3DsC;;;;;;;;;;;;;;;;;;;;;;ACXI;AACwD;AAEtD;AAG7C;IAEE,wBAAoB,WAAwB,EAAU,MAAc;QAAhD,gBAAW,GAAX,WAAW,CAAa;QAAU,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAExE;;OAEG;IACH,oCAAW,GAAX,UAAY,KAA6B,EAAE,KAA0B;QACnE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;YAClC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC3B,MAAM,CAAC,KAAK,CAAC;QACf,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAdU,cAAc;QAD1B,yEAAU,EAAE;yCAGsB,kEAAW,EAAkB,+DAAM;OAFzD,cAAc,CAgB1B;IAAD,qBAAC;CAAA;AAhB0B;;;;;;;;;;;;;;;;;;;;;;ACNgB;AACwD;AAEtD;AAG7C;IAEE,mBAAoB,WAAwB,EAAU,MAAc;QAAhD,gBAAW,GAAX,WAAW,CAAa;QAAU,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAExE;;OAEG;IACH,+BAAW,GAAX,UAAY,KAA6B,EAAE,KAA0B;QACnE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IAED,8BAAU,GAAV,UAAW,GAAW;QACpB,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,IAAI,CAAC;QACd,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,WAAW,CAAC,WAAW,GAAG,GAAG,CAAC;QAEnC,yCAAyC;QACzC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;QACjC,MAAM,CAAC,KAAK,CAAC;IACf,CAAC;IAtBU,SAAS;QADrB,yEAAU,EAAE;yCAGsB,kEAAW,EAAkB,+DAAM;OAFzD,SAAS,CAwBrB;IAAD,gBAAC;CAAA;AAxBqB;;;;;;;;;;;;;;;;;ACNqB;AAM3C;IAAA;IAkBA,CAAC;IAhBC,mCAAS,GAAT,UAAU,GAAqB,EACrB,IAAiB;QAEzB,IAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAErD,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACZ,IAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC;gBACvB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EACtC,SAAS,GAAG,OAAO,CAAC;aACvB,CAAC,CAAC;YAEH,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7B,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IAjBU,eAAe;QAD3B,yEAAU,EAAE;OACA,eAAe,CAkB3B;IAAD,sBAAC;CAAA;AAlB2B;;;;;;;;;;;;;;;;;;;;;;;;;ACNe;AACgC;AAEb;AAE7B;AACQ;AAGzC;IAIE,qBAAoB,QAA6B,EAC7B,MAAc,EACd,IAAgB;QAFhB,aAAQ,GAAR,QAAQ,CAAqB;QAC7B,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAY;QAJpC,gBAAW,GAAG,EAAE,CAAC;IAIuB,CAAC;IAEzC,2BAAK,GAAL,UAAM,QAAQ,EAAE,QAAQ;QACtB,IAAM,IAAI,GAAG,IAAI,wEAAU,EAAE;aAC1B,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC;aAC7B,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC;aACzB,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC;aACzB,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;aACzC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAEjD,IAAM,WAAW,GAAG;YAClB,OAAO,EAAE,IAAI,yEAAW,CAAC;gBACvB,cAAc,EAAE,mCAAmC;aACpD,CAAC;SACH,CAAC;QAEF,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,GAAG,cAAc,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,WAAW,CAAC,CAAC;IAC9F,CAAC;IAED,gCAAU,GAAV,UAAW,UAAU,EAAE,IAAI;QACzB,YAAY,CAAC,OAAO,CAAC,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;QACjE,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAEnC,IAAM,SAAS,GAAG,oCAAM,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,CAAC;QACnE,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAE,CAAC;IAC3E,CAAC;IAED,4BAAM,GAAN;QACE,YAAY,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;QACxC,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;QACtC,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAEhC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IACnC,CAAC;IAED,gCAAU,GAAV;QACE,MAAM,CAAC,oCAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,iCAAW,GAAX;QACE,MAAM,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;IAC5B,CAAC;IAED,mCAAa,GAAb;QACE,IAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACtD,IAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACzC,MAAM,CAAC,oCAAM,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IArDU,WAAW;QADvB,yEAAU,EAAE;yCAKmB,mFAAmB;YACrB,+DAAM;YACR,wEAAU;OANzB,WAAW,CAuDvB;IAAD,kBAAC;CAAA;AAvDuB;;;;;;;;;;;;;;;;;;;;;ACTmB;AAEgC;AAG3E;IAEE,yBAAoB,OAA4B;QAA5B,YAAO,GAAP,OAAO,CAAqB;IAAI,CAAC;IAErD,uCAAa,GAAb,UAAc,UAAU,EAAE,MAAM;QAC9B,IAAM,GAAG,GAAG,gBAAgB,GAAG,UAAU,GAAG,6DAA6D,CAAC;QAE1G,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IAEO,uCAAa,GAArB,UAAsB,IAAI;QACxB,MAAM,CAAC,CAAC,IAAI,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7E,CAAC;IAZU,eAAe;QAD3B,yEAAU,EAAE;yCAGkB,4FAAmB;OAFrC,eAAe,CAc3B;IAAD,sBAAC;CAAA;AAd2B;;;;;;;;;;;;;;;;;;;;;ACLe;AAEgC;AAG3E;IAEE,8BAAoB,OAA4B;QAA5B,YAAO,GAAP,OAAO,CAAqB;IAAI,CAAC;IAErD,2CAAY,GAAZ,UAAa,KAAK;QAChB,IAAM,GAAG,GAAG,wFAAwF,CAAC;QAErG;;;;WAIG;QACH,IAAM,MAAM,GAAG;YACb,KAAK,EAAE,IAAI;YACX,SAAS,EAAE,KAAK;SACjB,CAAC;QAEF,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IAED,mDAAoB,GAApB,UAAqB,KAAK;QACxB,IAAM,GAAG,GAAG,iGAAiG,CAAC;QAE9G;;;;WAIG;QACH,IAAM,MAAM,GAAG;YACd,KAAK,EAAE,IAAI;YACX,SAAS,EAAE,KAAK;SAChB,CAAC;QAEF,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IAlCU,oBAAoB;QADhC,yEAAU,EAAE;yCAGkB,4FAAmB;OAFrC,oBAAoB,CAqChC;IAAD,2BAAC;CAAA;AArCgC;;;;;;;;;;;;;;;;;;;;;ACLU;AAEmD;AAK9F;IAKE,6BAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;QAJpC,cAAS,GAAG,SAAS,CAAC;QACtB,YAAO,GAAG,SAAS,CAAC;QACpB,gBAAW,GAAG,kCAAkC,CAAC;QAG/C,IAAI,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC/B,IAAI,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClE,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAExC,EAAE,EAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACZ,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,EAAC,KAAK,CAAC;YAClC,OAAO,CAAC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,CAAC;QACxC,CAAC;QACD,IAAI,CAAC,CAAC;YACF,MAAM,GAAG,IAAI,CAAC;YACd,OAAO,CAAC,IAAI,CAAC,qBAAqB,GAAG,MAAM,CAAC,CAAC;QACjD,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,mBAAmB,CAAC;IAC3D,CAAC;IAED,kCAAI,GAAJ,UAAK,GAAG,EAAE,MAAO;QAEf,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAEpC,IAAM,WAAW,GAAG;YAClB,OAAO,EAAE,IAAI,yEAAW,CAAC;gBACvB,cAAc,EAAE,kBAAkB;gBAClC,eAAe,EAAE,UAAU;aAC5B,CAAC;SACH,CAAC;QAEF,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,WAAW,CAAC,CAAC;IAC1E,CAAC;IAED,iCAAG,GAAH,UAAI,MAAO;IAEX,CAAC;IAvCU,mBAAmB;QAD/B,yEAAU,EAAE;yCAMe,wEAAU;OALzB,mBAAmB,CAyC/B;IAAD,0BAAC;CAAA;AAzC+B;;;;;;;;;;;;;;;;;;;;;;ACPmB;AAEX;AACA;AAGxC;IAKE;QACE,IAAI,CAAC,eAAe,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACnC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;YAClC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QAEzE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;IAED,8BAAQ,GAAR;IACA,CAAC;IAED,iCAAW,GAAX;QACE,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,iCAAW,GAAX,UAAY,QAAgB;QAC1B,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC3B,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC3C,QAAQ,CAAC,MAAM,EAAE,CAAC;IACpB,CAAC;IAED,iCAAW,GAAX,UAAY,QAAQ;QAClB,IAAI,CAAC,QAAQ,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,4DAAE,CAAC,CAAC,CAAC,4DAAE,CAAC;IAChD,CAAC;IAED,iCAAW,GAAX;QACE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAhCU,WAAW;QADvB,yEAAU,EAAE;;OACA,WAAW,CAiCvB;IAAD,kBAAC;CAAA;AAjCuB;;;;;;;;;ACNxB;AAAA,mFAAmF;AACnF,8FAA8F;AAC9F,yEAAyE;AACzE,gFAAgF;AAEzE,IAAM,WAAW,GAAG;IACzB,UAAU,EAAE,KAAK;CAClB,CAAC;;;;;;;;;;;;;;ACP6C;AAC4B;AAE9B;AACY;AAEzD,EAAE,CAAC,CAAC,8EAAW,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3B,+EAAc,EAAE,CAAC;AACnB,CAAC;AAED,yGAAsB,EAAE,CAAC,eAAe,CAAC,kEAAS,CAAC;KAChD,KAAK,CAAC,aAAG,IAAI,cAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAhB,CAAgB,CAAC,CAAC;;;;;;;;ACXlC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qE","file":"main.bundle.js","sourcesContent":["function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncatched exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"../../../../../src/$$_lazy_route_resource lazy recursive\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/$$_lazy_route_resource lazy\n// module id = ../../../../../src/$$_lazy_route_resource lazy recursive\n// module chunks = main","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/app.component.css\n// module id = ../../../../../src/app/app.component.css\n// module chunks = main","module.exports = \"\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/app.component.html\n// module id = ../../../../../src/app/app.component.html\n// module chunks = main","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.css']\n})\nexport class AppComponent {\n\n constructor() { }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/app.component.ts","import { BrowserModule } from '@angular/platform-browser';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';\n\nimport { routing } from './app.routing';\n\nimport { AppComponent } from './app.component';\nimport { ChartsModule } from '@progress/kendo-angular-charts';\nimport { ThfModule } from '@totvs/thf-ui';\n\nimport { ResultBoxComponent } from './components/result-box/result-box.component';\nimport { CardComponent } from './components/card/card.component';\nimport { ToolbarComponent } from './components/toolbar/toolbar.component';\nimport { ContainerComponent } from './components/container/container.component';\nimport { PercentageResultComponent } from './components/percentage-result/percentage-result.component';\nimport { LoginComponent } from './pages/login/login.component';\n\nimport { I18nService } from './services/i18n.service';\nimport { HttpRequestsService } from './services/http-requests.service';\nimport { AuthService } from './services/auth.service';\n\nimport { MainPageComponent } from './pages/main/main-page.component';\nimport { MainPageService } from './services/carol-querys/main-page.service';\nimport { ResultBoxGroupComponent } from './components/result-box-group/result-box-group.component';\nimport { CampaignsPageComponent } from './pages/campaigns/campaigns-page.component';\nimport { BulletChartsComponent } from './components/bullet-charts/bullet-charts.component';\nimport { AuthGuard } from './services/auth-guard.service';\nimport { AuthInterceptor } from './services/auth-interceptor.service';\nimport { CampaignDetailPageComponent } from './pages/campaign-detail/campaign-detail-page.component';\nimport { ProductDetailPageComponent } from './pages/product-detail/product-detail-page.component';\nimport { LoadingComponent } from './components/loading/loading.component';\nimport { AuthGuardLogin } from './services/auth-guard-login.service';\nimport { ToolbarSearchService } from './services/carol-querys/toolbar-search.service';\nimport { ChartComponent } from './components/chart/chart.component';\nimport { ChartPieComponent } from './components/chart-pie/chart-pie.component';\n\n@NgModule({\n declarations: [\n AppComponent,\n MainPageComponent,\n CardComponent,\n ContainerComponent,\n PercentageResultComponent,\n ResultBoxComponent,\n ToolbarComponent,\n LoginComponent,\n ResultBoxGroupComponent,\n CampaignsPageComponent,\n BulletChartsComponent,\n CampaignDetailPageComponent,\n ProductDetailPageComponent,\n LoadingComponent,\n ChartComponent,\n ChartPieComponent\n ],\n imports: [\n BrowserModule,\n BrowserAnimationsModule,\n CommonModule,\n FormsModule,\n ThfModule,\n ChartsModule,\n HttpClientModule,\n routing\n ],\n providers: [\n AuthService,\n AuthGuard,\n AuthGuardLogin,\n HttpRequestsService,\n MainPageService,\n ToolbarSearchService,\n I18nService,\n {\n provide: HTTP_INTERCEPTORS,\n useClass: AuthInterceptor,\n multi: true,\n },\n ],\n bootstrap: [AppComponent]\n})\nexport class AppModule { }\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/app.module.ts","import { Routes, RouterModule } from '@angular/router';\n\nimport { MainPageComponent } from './pages/main/main-page.component';\nimport { LoginComponent } from './pages/login/login.component';\nimport { CampaignsPageComponent } from './pages/campaigns/campaigns-page.component';\nimport { CampaignDetailPageComponent } from './pages/campaign-detail/campaign-detail-page.component';\nimport { ProductDetailPageComponent } from './pages/product-detail/product-detail-page.component';\nimport { AuthGuard } from './services/auth-guard.service';\nimport { AuthGuardLogin } from './services/auth-guard-login.service';\n\nconst appRoutes: Routes = [\n{ path: '', component: MainPageComponent, canActivate: [AuthGuard] },\n{ path: 'login', component: LoginComponent, canActivate: [AuthGuardLogin] },\n{ path: 'campaigns', component: CampaignsPageComponent, canActivate: [AuthGuard] },\n{ path: 'campaign/:id', component: CampaignDetailPageComponent, canActivate: [AuthGuard] },\n{ path: 'product/:id', component: ProductDetailPageComponent, canActivate: [AuthGuard] },\n{ path: '**', redirectTo: '' },\n];\n\nexport const routing = RouterModule.forRoot(appRoutes);\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/app.routing.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".bullet-charts {\\n margin-top: 12px;\\n margin-left: 5px;\\n}\\n\\n.bullet-charts-label {\\n font-size: 12px;\\n width: 25%;\\n min-height: 40px;\\n line-height: 20px;\\n display: inline-block;\\n}\\n\\n.bullet-charts-content {\\n width: 40%;\\n display: inline-block;\\n padding-left: 8px;\\n vertical-align: top;\\n}\\n\\n.bullet-charts-values {\\n font-size: 12px;\\n width: 30%;\\n display: inline-block;\\n text-align: center;\\n padding-left: 8px;\\n vertical-align: top;\\n}\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/bullet-charts/bullet-charts.component.css\n// module id = ../../../../../src/app/components/bullet-charts/bullet-charts.component.css\n// module chunks = main","module.exports = \"\\n
\\n
\\n {{ bullet.label }}\\n
\\n \\n
\\n \\n \\n
\\n \\n
\\n {{ bullet.value }} / {{ bullet.max }}\\n
\\n
\\n
\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/bullet-charts/bullet-charts.component.html\n// module id = ../../../../../src/app/components/bullet-charts/bullet-charts.component.html\n// module chunks = main","import { Component, Input, OnInit } from '@angular/core';\n\nimport { BulletCharts } from './bullet-charts.interface';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'bullet-charts',\n templateUrl: './bullet-charts.component.html',\n styleUrls: ['./bullet-charts.component.css']\n})\nexport class BulletChartsComponent implements OnInit {\n\n _bulletCharts = [];\n\n @Input() title = '';\n\n @Input() primaryColor = '#98CBE5';\n\n @Input() secundaryColor = '#CCE5F1';\n\n @Input('values') set bulletCharts(bulletCharts: Array) {\n this._bulletCharts = bulletCharts;\n\n this._bulletCharts.forEach(value => {\n value['bulletValueAxis'] = {\n min: 0,\n max: value.max,\n plotBands: [\n {\n from: 0, to: value.value, color: value.primaryColor ? value.primaryColor : this.primaryColor\n }, {\n from: value.value, to: value.max, color: value.secundaryColor ? value.secundaryColor : this.secundaryColor\n }\n ]\n };\n });\n }\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/bullet-charts/bullet-charts.component.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\\n.card-title {\\n\\tcolor: #495C5F;\\n\\tfont-size: 17px;\\n\\tfont-weight: bold;\\n\\tmargin: 4px 0px 8px 13px;\\n}\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/card/card.component.css\n// module id = ../../../../../src/app/components/card/card.component.css\n// module chunks = main","module.exports = \"
\\n \\n
\\n {{ title }}\\n
\\n \\n
\\n
\\n \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/card/card.component.html\n// module id = ../../../../../src/app/components/card/card.component.html\n// module chunks = main","import { Component, Input, OnInit } from '@angular/core';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'card',\n templateUrl: './card.component.html',\n styleUrls: ['./card.component.css']\n})\nexport class CardComponent implements OnInit {\n\n @Input() title = '';\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/card/card.component.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/chart-pie/chart-pie.component.css\n// module id = ../../../../../src/app/components/chart-pie/chart-pie.component.css\n// module chunks = main","module.exports = \"
\\n \\n
\\n\\n0\\\"\\n [seriesColors]=\\\"colors\\\"\\n [style.height]=\\\"height\\\">\\n\\n \\n \\n \\n \\n \\n\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/chart-pie/chart-pie.component.html\n// module id = ../../../../../src/app/components/chart-pie/chart-pie.component.html\n// module chunks = main","import { Component, Input, OnInit } from '@angular/core';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'chart-pie',\n templateUrl: './chart-pie.component.html',\n styleUrls: ['./chart-pie.component.css']\n})\nexport class ChartPieComponent implements OnInit {\n\n /**\n * Example:\n * [\n * { label: 'Eaten', value: 0.42 },\n * { label: 'Not eaten', value: 0.58 }\n * ]\n */\n @Input() data: Array;\n\n /**\n * Example:\n * ['orange', 'blue', '#F00']\n */\n @Input() colors: Array = null;\n\n @Input() legend = true;\n\n @Input() height = '';\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/chart-pie/chart-pie.component.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/chart/chart.component.css\n// module id = ../../../../../src/app/components/chart/chart.component.css\n// module chunks = main","module.exports = \"
\\n \\n
\\n\\n
0\\\">\\n \\n 0\\\"\\n [seriesColors]=\\\"colors\\\"\\n [categoryAxis]=\\\"{ categories: categories }\\\"\\n [style.height]=\\\"height\\\">\\n\\n \\n \\n \\n \\n \\n \\n \\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/chart/chart.component.html\n// module id = ../../../../../src/app/components/chart/chart.component.html\n// module chunks = main","import { Component, Input, OnInit } from '@angular/core';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'chart',\n templateUrl: './chart.component.html',\n styleUrls: ['./chart.component.css']\n})\nexport class ChartComponent implements OnInit {\n\n @Input() title = '';\n\n /**\n * Valid types\n * - line\n * - column\n * - bar\n */\n @Input() type = 'line';\n\n /**\n * Example:\n * ['January', 'February', 'March']\n */\n @Input() categories = [];\n\n /**\n * Example:\n * [\n * {data: [3, 4, 4.1, 3.5], label: 'Item 1'},\n * {data: [4, 3, 2.1, 3.8], label: 'Item 2'}\n * ]\n */\n @Input() series = [];\n\n /**\n * Example:\n * ['orange', 'blue', '#F00']\n */\n @Input() colors = [];\n\n @Input() height = '';\n\n @Input() legend = true;\n\n @Input() tooltip = false;\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/chart/chart.component.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".page {\\n\\theight: 100%;\\n\\t/* max-width: 1200px; */\\n\\twidth: 100%;\\n\\tmargin: auto;\\n}\\n\\n.page-info {\\n\\tcolor: white;\\n\\tfont-size: 25px;\\n\\tfont-weight: bold;\\n\\ttext-align: center;\\n\\tpadding: 25px 15px;\\n\\twidth: 190px;\\n\\tposition: absolute;\\n\\ttop: 0px;\\n\\tright: 0px;\\n}\\n\\n.page-filter {\\n\\tbackground-color: #425357;\\n\\twidth: 250px;\\n\\theight: 100vh;\\n\\tposition: fixed;\\n}\\n\\n.page-filter-field {\\n\\twidth: 90%;\\n\\tmargin: auto;\\n\\tbackground-color: white;\\n\\tmargin-top: 30px;\\n\\tborder-radius: 5px;\\n\\tpadding: 15px 15px 5px 15px;\\n}\\n\\n.page-content {\\n\\tbackground-color: #FAFBFB;\\n\\twidth: calc(100% - 250px);\\n\\theight: 100vh;\\n\\tposition: relative;\\n\\tleft: 250px;\\n}\\n\\n.page-menu-general {\\n background-color: #00C0E2;\\n height: 60px;\\n\\twidth: 60px;\\n\\tdisplay: block;\\n}\\n\\n.page-menu-campaigns {\\n background-color: #FFB72F;\\n height: 60px;\\n\\twidth: 60px;\\n\\tdisplay: block;\\n}\\n\\n.page-menu-img-general {\\n\\tpadding-top: 17px;\\n\\tpadding-left: 16px;\\n}\\n\\n.page-menu-img-campaigns {\\n\\tpadding-top: 19px;\\n\\tpadding-left: 12px;\\n}\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/container/container.component.css\n// module id = ../../../../../src/app/components/container/container.component.css\n// module chunks = main","module.exports = \"\\n\\n
\\n
\\n \\n \\n \\n\\n\\n\\n
\\n Demo Carol App\\n
\\n
\\n \\n
\\n
\\n\\n
\\n \\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/container/container.component.html\n// module id = ../../../../../src/app/components/container/container.component.html\n// module chunks = main","import { Component, Input, OnInit, TemplateRef } from '@angular/core';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'container',\n templateUrl: './container.component.html',\n styleUrls: ['./container.component.css']\n})\nexport class ContainerComponent implements OnInit {\n\n @Input() filtersTemplate: TemplateRef;\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/container/container.component.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".loading-box {\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n height: 100%;\\n}\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/loading/loading.component.css\n// module id = ../../../../../src/app/components/loading/loading.component.css\n// module chunks = main","module.exports = \"
\\n
\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/loading/loading.component.html\n// module id = ../../../../../src/app/components/loading/loading.component.html\n// module chunks = main","import { Component, OnInit } from '@angular/core';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'loading',\n templateUrl: './loading.component.html',\n styleUrls: ['./loading.component.css']\n})\nexport class LoadingComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/loading/loading.component.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".percentage-result {\\n\\twidth: 100%;\\n\\tmin-height: 33px;\\n\\tfont-size: 12px;\\n\\tmargin-top: 8px;\\n}\\n\\n.percentage-result-image-container {\\n\\twidth: 20%;\\n\\theight: 20px;\\n\\tdisplay: inline;\\n\\tmargin-right: 10px;\\n}\\n\\n.percentage-result-image {\\n\\twidth: auto;\\n\\theight: 20px;\\n\\tvertical-align: top;\\n}\\n\\n.percentage-result-text {\\n\\twidth: 80%;\\n\\tline-height: 14px;\\n\\tdisplay: inline-block;\\n}\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/percentage-result/percentage-result.component.css\n// module id = ../../../../../src/app/components/percentage-result/percentage-result.component.css\n// module chunks = main","module.exports = \"
\\n
\\n \\n
\\n
\\n {{ _value }} {{ text }}\\n
\\n
\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/percentage-result/percentage-result.component.html\n// module id = ../../../../../src/app/components/percentage-result/percentage-result.component.html\n// module chunks = main","import { Component, Input, OnInit } from '@angular/core';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'percentage-result',\n templateUrl: './percentage-result.component.html',\n styleUrls: ['./percentage-result.component.css']\n})\nexport class PercentageResultComponent implements OnInit {\n\n _color = '#AFB8C2';\n _direction = 'zero';\n _arrowImg = 'assets/arrows/arrow-zero.png';\n _value = '0%';\n\n @Input() set value(value) {\n this._value = value + '%';\n\n if (parseFloat(value) > 0) {\n this._direction = 'up';\n this._color = '#19BC7E';\n this._arrowImg = 'assets/arrows/arrow-up.png';\n } else if (parseFloat(value) < 0) {\n this._direction = 'down';\n this._color = '#FF0005';\n this._arrowImg = 'assets/arrows/arrow-down.png';\n } else {\n this._direction = 'zero';\n this._color = '##AFB8C2';\n this._arrowImg = 'assets/arrows/arrow-zero.png';\n }\n }\n\n @Input() text = '';\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/percentage-result/percentage-result.component.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \":host {\\n width: 100%;\\n}\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/result-box-group/result-box-group.component.css\n// module id = ../../../../../src/app/components/result-box-group/result-box-group.component.css\n// module chunks = main","module.exports = \"\\n \\n {{ value.content }}\\n\\n \\n \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/result-box-group/result-box-group.component.html\n// module id = ../../../../../src/app/components/result-box-group/result-box-group.component.html\n// module chunks = main","import { Component, Input, OnInit } from '@angular/core';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'result-box-group',\n templateUrl: './result-box-group.component.html',\n styleUrls: ['./result-box-group.component.css']\n})\nexport class ResultBoxGroupComponent implements OnInit {\n\n _values = [\n {\n title: '',\n content: '',\n color: '',\n percentageValue: '',\n percentageText: ''\n }\n ];\n\n @Input() set values(values) {\n if (typeof values === 'object') {\n this._values = values;\n }\n }\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/result-box-group/result-box-group.component.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".result-box {\\n\\theight: 100%;\\n\\tmargin: 12px 6px 14px 6px;\\n}\\n\\n.result-box-title {\\n\\tfont-size: 22px;\\n\\tfont-weight: bold;\\n\\tpadding-bottom: 5px;\\n}\\n\\n.result-box-content {\\n\\tcolor: #AFB8C2;\\n\\tfont-size: 16px;\\n}\\n\\n.result-box-container {\\n\\tmin-height: 92px;\\n}\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/result-box/result-box.component.css\n// module id = ../../../../../src/app/components/result-box/result-box.component.css\n// module chunks = main","module.exports = \"\\n
\\n \\n
\\n
\\n
\\n {{ title }}\\n
\\n
\\n \\n
\\n
\\n
\\n \\n
\\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/result-box/result-box.component.html\n// module id = ../../../../../src/app/components/result-box/result-box.component.html\n// module chunks = main","import { Component, Input, OnInit } from '@angular/core';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'result-box',\n templateUrl: './result-box.component.html',\n styleUrls: ['./result-box.component.css']\n})\nexport class ResultBoxComponent implements OnInit {\n\n _boxColor = '#D7D7D7';\n _titleColor = '#354050';\n\n @Input('box-color') set boxColor(boxColor) {\n if (boxColor) {\n this._boxColor = boxColor;\n this._titleColor = boxColor;\n }\n }\n\n @Input() title = '';\n\n @Input() titleUnit = '';\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/result-box/result-box.component.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".toolbar {\\n\\theight: 58px;\\n\\twidth: calc(100% - 250px);\\n\\tfloat: right;\\n}\\n\\n.toolbar-content {\\n\\tz-index: 100;\\n\\theight: 58px;\\n\\twidth: calc(100% - 250px);\\n\\tfont-size: 20px;\\n\\tbackground: white;\\n\\t-webkit-box-shadow: 0px 5px 12px -1px rgba(0,0,0,0.11);\\n\\tbox-shadow: 0px 5px 12px -1px rgba(0,0,0,0.11);\\n\\tposition: fixed;\\n}\\n\\n.toolbar-search {\\n\\tposition: relative;\\n\\tfloat: left;\\n\\twidth: 45%;\\n\\theight: 100%;\\n}\\n\\ninput {\\n\\tmargin-top: 14px;\\n\\tmargin-left: 64px;\\n\\twidth: 100%;\\n\\theight: 30px;\\n\\tfont-size: 14px;\\n\\tborder: none;\\n\\tbackground-color: transparent;\\n\\tcolor: #485C5D;\\n\\toutline: none;\\n}\\n\\ninput::-webkit-input-placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */\\n\\tcolor: #859BB0;\\n\\topacity: 1; /* Firefox */\\n}\\n\\ninput:-ms-input-placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */\\n\\tcolor: #859BB0;\\n\\topacity: 1; /* Firefox */\\n}\\n\\ninput::-ms-input-placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */\\n\\tcolor: #859BB0;\\n\\topacity: 1; /* Firefox */\\n}\\n\\ninput::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */\\n\\tcolor: #859BB0;\\n\\topacity: 1; /* Firefox */\\n}\\n\\n.toolbar-search-image {\\n\\tmargin-top: 20px;\\n\\tmargin-left: 40px;\\n\\tposition: absolute;\\n}\\n\\n.toolbar-group-right {\\n\\tfloat: right;\\n\\theight: 100%;\\n\\tcolor: #859BB0;\\n font-size: 14px;\\n}\\n\\n.toolbar-language-container {\\n\\tfloat: left;\\n\\tposition: relative;\\n\\tpadding: 0px 20px;\\n\\tcursor: pointer;\\n}\\n\\n.toolbar-language-container:hover {\\n\\tbackground-color: #ddd\\n}\\n\\n.toolbar-language-img-container {\\n\\tfloat: left;\\n\\tmargin: 22px 10px 10px 0px;\\n}\\n\\n.toolbar-language-text-container {\\n\\tfloat: left;\\n\\tmargin: 20px 0px;\\n}\\n\\n.toolbar-user-container {\\n\\tfloat: left;\\n\\tposition: relative;\\n\\tpadding: 0px 20px 0px 10px;\\n\\tcursor: pointer;\\n}\\n\\n.toolbar-user-container:hover {\\n\\tbackground-color: #ddd\\n}\\n\\n.toolbar-user-text-container {\\n\\tfloat: left;\\n\\tmargin: 20px 5px;\\n}\\n\\n.toolbar-user-avatar {\\n\\tfloat: left;\\n\\tmargin-top: 8px;\\n}\\n\\n.toolbar-search-box {\\n\\tposition: absolute;\\n\\ttop: 59px;\\n\\tmin-width: 150px;\\n\\toverflow: auto;\\n\\tbackground: white;\\n\\t-webkit-box-shadow: 0px 5px 20px 5px rgba(0,0,0,0.11);\\n\\tbox-shadow: 0px 5px 20px 5px rgba(0,0,0,0.11);\\n\\tz-index: 1;\\n\\tborder: 1px solid #D7D7D7;\\n\\tborder-radius: 5px;\\n\\twidth: 100%;\\n\\tmargin-left: 4px;\\n\\tmax-height: 500px;\\n\\toverflow: auto;\\n}\\n\\n.itens-search-box {\\n\\tcolor: #607c7d;\\n\\tpadding: 6px 35px;\\n\\ttext-decoration: none;\\n\\tdisplay: block;\\n\\tfont-size: 13px;\\n\\tcursor: pointer;\\n}\\n\\n.itens-search-box:hover {\\n\\tbackground-color: #ddd\\n}\\n\\n.title-search-box {\\n\\tbackground-color: #f3f0f0;\\n\\tcolor: #485C5D;\\n\\tpadding: 6px 16px;\\n\\ttext-decoration: none;\\n\\tdisplay: block;\\n\\tfont-size: 15px;\\n}\\n\\n.toolbar-dropdown {\\n\\tposition: absolute;\\n\\ttop: 59px;\\n\\tmin-width: 150px;\\n\\toverflow: auto;\\n\\tbackground: white;\\n\\t-webkit-box-shadow: 0px 5px 20px 5px rgba(0,0,0,0.11);\\n\\tbox-shadow: 0px 5px 20px 5px rgba(0,0,0,0.11);\\n\\tz-index: 1;\\n\\tborder: 1px solid #D7D7D7;\\n\\tborder-radius: 5px;\\n}\\n\\n.toolbar-dropdown span {\\n\\tcolor: #778a9c;\\n\\tpadding: 6px 16px;\\n\\ttext-decoration: none;\\n\\tdisplay: block;\\n\\tfont-size: 14px;\\n}\\n\\n.toolbar-dropdown span:hover {\\n\\tbackground-color: #ddd\\n}\\n\\n.toolbar-dropdown-img-language {\\n\\tmargin-right: 10px;\\n}\\n\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/toolbar/toolbar.component.css\n// module id = ../../../../../src/app/components/toolbar/toolbar.component.css\n// module chunks = main","module.exports = \"
\\n
\\n \\n
\\n\\n \\n\\n
\\n\\n 0\\\" class=\\\"title-search-box\\\">\\n Campanhas\\n \\n \\n {{ campaign.label }}\\n \\n\\n 0\\\" class=\\\"title-search-box\\\">\\n Produtos\\n \\n \\n {{ product.label }}\\n \\n\\n \\n \\n \\n\\n \\n Nenhum resultado encontrado\\n \\n
\\n
\\n\\n
\\n
\\n\\n
\\n \\n
\\n
\\n {{ language }}\\n
\\n\\n
\\n\\n \\n \\n Português\\n \\n \\n \\n Inglês\\n \\n
\\n
\\n\\n
\\n\\n \\n \\n
\\n {{ user }}\\n
\\n
\\n\\n Sair\\n
\\n
\\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/toolbar/toolbar.component.html\n// module id = ../../../../../src/app/components/toolbar/toolbar.component.html\n// module chunks = main","import { Component, OnInit, Renderer2, ViewChild, ElementRef } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { I18nService } from './../../services/i18n.service';\nimport { AuthService } from '../../services/auth.service';\nimport { ToolbarSearchService } from '../../services/carol-querys/toolbar-search.service';\n\nimport 'rxjs/add/operator/debounceTime';\nimport * as jp from 'jsonpath/jsonpath';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'toolbar',\n templateUrl: './toolbar.component.html',\n styleUrls: ['./toolbar.component.css']\n})\nexport class ToolbarComponent implements OnInit {\n\n showUserDropdown = false;\n showLanguageDropdown = false;\n showSearchBox = false;\n\n language;\n searchInput = '';\n face = 'face.png';\n user;\n\n campaigns = [];\n products = [];\n searchingCampaigns = false;\n searchingProducts = false;\n\n @ViewChild('inputElement', {read: ElementRef}) inputElement: ElementRef;\n\n constructor(private i18n: I18nService,\n private searchService: ToolbarSearchService,\n private authService: AuthService,\n private renderer: Renderer2,\n private router: Router) {\n renderer.listen('document', 'click', (event: MouseEvent) => {\n this.wasClickedOutOfSearchBox(event);\n });\n }\n\n ngOnInit() {\n this.language = this.i18n.getLanguage();\n const email = localStorage.getItem('user');\n this.user = email.substring(0, email.indexOf('@'));\n }\n\n changeLanguage(language) {\n this.language = language;\n this.i18n.setLanguage(language);\n }\n\n logout() {\n this.authService.logout();\n }\n\n changeSearch(value) {\n if (value.length < 3) {\n return;\n }\n\n this.showSearchBox = true;\n this.searchingCampaigns = true;\n this.searchingProducts = true;\n\n this.campaigns = [];\n this.products = [];\n\n this.searchService.getCampaigns(value)\n .subscribe(\n result => {\n console.log('getCampaigns', result);\n\n this.campaigns = jp.query(result, '$..campaign.buckets.*')\n .map(function(x) {\n return {\n label: jp.query(x, '$..aggregations..key'),\n value: x['key'],\n };\n });\n\n setTimeout(() => {\n this.searchingCampaigns = false;\n }, 5000);\n },\n error => {\n console.log('error getCampaigns', error);\n this.searchingCampaigns = false;\n });\n\n this.searchService.getCampaignByProduct(value)\n .subscribe(\n result => {\n console.log('getCampaignByProduct', result);\n\n this.products = jp.query(result, '$..campaign.buckets.*')\n .filter(x => x['resolved'])\n .map(function(x) {\n return {\n label: jp.query(x, '$..aggregations..key'),\n value: x['key'],\n };\n });\n\n setTimeout(() => {\n this.searchingProducts = false;\n }, 5000);\n },\n error => {\n console.log('error getCampaignByProduct', error);\n this.searchingProducts = false;\n });\n }\n\n wasClickedOutOfSearchBox(event) {\n if (!this.inputElement.nativeElement.contains(event.target)) {\n this.showSearchBox = false;\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/components/toolbar/toolbar.component.ts","export const EN = {\n lSearchFor: 'Search for store or product',\n lCampaigns: 'Campaigns',\n lAnalysisPeriod: 'Analysis Period',\n lLast30Days: 'Last 30 dias',\n lLast60Days: 'Last 60 dias',\n lLast90Days: 'Last 90 dias',\n lSelectTheBranchs: 'Select the branchs',\n lSignOut: 'Sign out',\n lTotalClientFidelity: 'Total client fidelity',\n};\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/i18n/literalsEN.ts","export const PT = {\n lSearchFor: 'Buscar loja ou produto',\n lCampaigns: 'Campanhas',\n lAnalysisPeriod: 'Período de Análise',\n lLast30Days: 'Últimos 30 dias',\n lLast60Days: 'Últimos 60 dias',\n lLast90Days: 'Últimos 90 dias',\n lSelectTheBranchs: 'Selecione as unidades',\n lSignOut: 'Sair',\n lTotalClientFidelity: 'Total cliente fidelidade',\n};\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/i18n/literalsPT.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".campaign-title {\\n font-size: 24px;\\n font-weight: bold;\\n display: inline-block;\\n padding: 10px;\\n}\\n\\n.campaign-time {\\n height: 30px;\\n color: white;\\n font-size: 14px;\\n background-color: #f38400;\\n display: inline-block;\\n padding: 3px 8px;\\n margin-left: 20px;\\n}\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/campaign-detail/campaign-detail-page.component.css\n// module id = ../../../../../src/app/pages/campaign-detail/campaign-detail-page.component.css\n// module chunks = main","module.exports = \"\\n\\n \\n
\\n
\\n
\\n Dia das Mães\\n
\\n
\\n Final. em 5 dias\\n
\\n
\\n
\\n \\n \\n
\\n
\\n\\n
\\n\\n
\\n
\\n\\n \\n \\n \\n \\n \\n
\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/campaign-detail/campaign-detail-page.component.html\n// module id = ../../../../../src/app/pages/campaign-detail/campaign-detail-page.component.html\n// module chunks = main","import { Component, OnInit } from '@angular/core';\n\nimport { BulletCharts } from '../../components/bullet-charts/bullet-charts.interface';\nimport { ThfTableColumn } from '@totvs/thf-ui/components/thf-table';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'campaign-detail-page',\n templateUrl: './campaign-detail-page.component.html',\n styleUrls: ['./campaign-detail-page.component.css']\n})\nexport class CampaignDetailPageComponent {\n\n bestCampaigns: Array = [\n {label: 'Cupons', value: 3500, max: 3000, primaryColor: '#99c9e8', secundaryColor: 'f1f7fd'}\n ];\n\n public readonly columns: ThfTableColumn[] = [\n { column: 'product', label: 'Produto', type: 'link', action: (value, row) => { this.extras(value, row); } },\n { column: 'billing', label: 'Faturamento'},\n { column: 'profit', label: 'Lucro' },\n { column: 'avgticket', label: 'Ticket médio' },\n { column: 'vouchers', label: 'Vouchers convertidos / emitidos' },\n // { column: 'status', label: 'Status', type: 'subtitle', width: '5%', subtitles: [\n // { value: 'open', type: 'success', label: 'Aberta', content: '1' },\n // { value: 'next', type: 'warning', label: 'Prazo final próximo', content: '2' },\n // { value: 'closed', type: 'danger', label: 'Finalizada', content: '3' }\n // ]}\n { column: 'status', label: 'Status', color: this.experimentalColor }\n ];\n\n public readonly items: Array = [\n { campaign: 'Totvs Switch',\n billing: 'On off checkbox similar to a light switch ',\n link: '/documentation/thf-switch',\n status: 'Final. em 5 dias' },\n { campaign: 'Totvs Radio Group',\n billing: 'Group of round buttons that allows 1 item to be selected',\n link: '/campaign/thf-radio-group',\n profit: 'Best Practices',\n status: '25/04/2018'},\n { campaign: 'Totvs Radio Group',\n billing: 'Group of round buttons that allows 1 item to be selected',\n link: '/campaign/thf-radio-group',\n profit: 'Best Practices',\n status: 'Finalizada'\n }\n ];\n\n constructor() { }\n\n experimentalColor(row, column) {\n\n if (row.status === 'Finalizada') {\n return 'danger';\n } else if (row.status.indexOf('Final.') > -1) {\n return 'warning';\n } else {\n return 'success';\n }\n\n }\n\n extras(value, row) {\n console.log(value, row, 'campaign clicked');\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/campaign-detail/campaign-detail-page.component.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/campaigns/campaigns-page.component.css\n// module id = ../../../../../src/app/pages/campaigns/campaigns-page.component.css\n// module chunks = main","module.exports = \"\\n\\n \\n
\\n \\n \\n\\n \\n \\n\\n \\n\\n \\n\\n \\n
\\n
\\n\\n \\n \\n \\n \\n\\n
\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/campaigns/campaigns-page.component.html\n// module id = ../../../../../src/app/pages/campaigns/campaigns-page.component.html\n// module chunks = main","import { Component, OnInit } from '@angular/core';\n\nimport { ThfTableColumn } from '@totvs/thf-ui/components/thf-table';\nimport { BulletCharts } from './../../components/bullet-charts/bullet-charts.interface';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'campaigns-page',\n templateUrl: './campaigns-page.component.html',\n styleUrls: ['./campaigns-page.component.css']\n})\nexport class CampaignsPageComponent implements OnInit {\n\n bestCampaigns: Array = [\n {label: 'Dias das mães', value: 480, max: 500},\n {label: 'Dia D da cerveja', value: 2500, max: 3000},\n {label: 'Páscoa', value: 2890, max: 3000},\n {label: 'Aniversário da cidade', value: 9988, max: 10000},\n {label: 'Compre um e ganhe outro', value: 4890, max: 5000}\n ];\n\n worstCampaigns: Array = [\n {label: 'Dias das mães', value: 480, max: 500},\n {label: 'Dia D da cerveja', value: 2500, max: 3000},\n {label: 'Páscoa', value: 2890, max: 3000},\n {label: 'Aniversário da cidade', value: 9988, max: 10000},\n {label: 'Compre um e ganhe outro', value: 4890, max: 5000}\n ];\n\n dataVouchers = [\n // { label: 'Eaten', value: 0.42 },\n // { label: 'Not eaten', value: 0.58 }\n ];\n\n constructor() { }\n\n public readonly columns: ThfTableColumn[] = [\n { column: 'campaign', label: 'Campanha', type: 'link', action: (value, row) => { this.extras(value, row); } },\n { column: 'billing', label: 'Faturamento'},\n { column: 'profit', label: 'Lucro' },\n { column: 'avgticket', label: 'Ticket médio' },\n { column: 'vouchers', label: 'Vouchers convertidos / emitidos' },\n // { column: 'status', label: 'Status', type: 'subtitle', width: '5%', subtitles: [\n // { value: 'open', type: 'success', label: 'Aberta', content: '1' },\n // { value: 'next', type: 'warning', label: 'Prazo final próximo', content: '2' },\n // { value: 'closed', type: 'danger', label: 'Finalizada', content: '3' }\n // ]}\n { column: 'status', label: 'Status', color: this.experimentalColor }\n ];\n\n public readonly items: Array = [\n { campaign: 'Totvs Switch',\n billing: 'On off checkbox similar to a light switch ',\n link: '/documentation/thf-switch',\n status: 'Final. em 5 dias' },\n { campaign: 'Totvs Radio Group',\n billing: 'Group of round buttons that allows 1 item to be selected',\n link: '/campaign/thf-radio-group',\n profit: 'Best Practices',\n status: '25/04/2018'},\n { campaign: 'Totvs Radio Group',\n billing: 'Group of round buttons that allows 1 item to be selected',\n link: '/campaign/thf-radio-group',\n profit: 'Best Practices',\n status: 'Finalizada'\n }\n ];\n\n experimentalColor(row, column) {\n\n if (row.status === 'Finalizada') {\n return 'danger';\n } else if (row.status.indexOf('Final.') > -1) {\n return 'warning';\n } else {\n return 'success';\n }\n\n }\n\n extras(value, row) {\n console.log(value, row, 'campaign clicked');\n }\n\n ngOnInit() {\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/campaigns/campaigns-page.component.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/login/login.component.css\n// module id = ../../../../../src/app/pages/login/login.component.css\n// module chunks = main","module.exports = \"\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/login/login.component.html\n// module id = ../../../../../src/app/pages/login/login.component.html\n// module chunks = main","import { Component } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { ThfNotificationService } from '@totvs/thf-ui/services/thf-notification/thf-notification.service';\n\nimport { AuthService } from '../../services/auth.service';\nimport { HttpRequestsService } from '../../services/http-requests.service';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'login',\n templateUrl: './login.component.html',\n styleUrls: ['./login.component.css']\n})\nexport class LoginComponent {\n\n constructor(private authService: AuthService,\n private router: Router,\n private thfNotification: ThfNotificationService) { }\n\n checkLogin(values) {\n // this.requests.login(values.login, values.password);\n this.authService.login(values.login, values.password).subscribe(\n result => {\n this.authService.setSession(result, values.login);\n this.router.navigate([ this.authService.redirectUrl ]);\n },\n error => {\n if (error.status === 401) {\n this.thfNotification.error('Senha incorreta!');\n } else {\n this.thfNotification.warning('Possível problema com o Servidor');\n }\n }\n );\n\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/login/login.component.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/main/main-page.component.css\n// module id = ../../../../../src/app/pages/main/main-page.component.css\n// module chunks = main","module.exports = \"\\n\\n\\n \\n
\\n \\n \\n
\\n
\\n\\n \\n
\\n
\\n \\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n\\n
\\n \\n \\n \\n \\n \\n
\\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/main/main-page.component.html\n// module id = ../../../../../src/app/pages/main/main-page.component.html\n// module chunks = main","import { AuthService } from './../../services/auth.service';\nimport { Component, OnInit } from '@angular/core';\n\nimport { I18nService } from '../../services/i18n.service';\nimport { MainPageService } from '../../services/carol-querys/main-page.service';\n\nimport { getShortMonthString } from '../../utils';\n\nimport * as jp from 'jsonpath/jsonpath';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'main-page',\n templateUrl: './main-page.component.html',\n styleUrls: ['./main-page.component.css']\n})\nexport class MainPageComponent implements OnInit {\n dadosCustomersSituation;\n dadosCustomersTop;\n\n topResultBoxes;\n\n totalFidCustomers = '';\n totalNotFidCustomers = '';\n\n seriesFidCustomers = [];\n categoriesFidCustomers = [];\n\n constructor(private mainPageService: MainPageService,\n private i18n: I18nService) { }\n\n ngOnInit() {\n\n this.topResultBoxes = [{\n title: '0',\n content: 'Orders',\n color: '#00C6D3',\n percentageValue: '',\n percentageText: ''\n },\n {\n title: '0',\n content: 'Customers',\n color: 'pink',\n percentageValue: '50',\n percentageText: ''\n }];\n\n this.newFilter();\n }\n\n labelContent(e: any): string {\n return e.category;\n }\n\n newFilter() {\n this.mainPageService.runNamedQuery('customerPerSituation', {}).subscribe(result => {\n if(result != undefined && result['aggs'] != undefined && result['aggs']['status'] != undefined && result['aggs']['status']['buckets'] != undefined) {\n var dados = result['aggs']['status']['buckets'];\n this.dadosCustomersSituation = [];\n\n for (var key in dados) {\n if (dados.hasOwnProperty(key)) {\n var valor = dados[key]['docCount'];\n\n if(valor != 0) {\n valor = valor/result[\"totalHits\"];\n }\n\n this.dadosCustomersSituation.push({kind: key, share: valor});\n console.log(key, dados[key]);\n }\n }\n }\n }, error => {\n console.log('error customerPerSituation', error);\n });\n\n function compare(a,b) {\n if (a.data < b.data)\n return -1;\n if (a.data > b.data)\n return 1;\n return 0;\n }\n\n this.mainPageService.runNamedQuery('customersTop', {}).subscribe(result => {\n this.dadosCustomersTop = [];\n\n if(result != undefined) {\n if(result[\"aggs\"] != undefined) {\n if(result[\"aggs\"][\"name\"] != undefined) {\n if(result[\"aggs\"][\"name\"][\"buckets\"] != undefined) {\n var dados = result[\"aggs\"][\"name\"][\"buckets\"];\n\n for(var key in dados) {\n if(dados.hasOwnProperty(key)) {\n var row = dados[key];\n\n this.dadosCustomersTop.push({name: row[\"key\"], data: [row[\"aggregations\"][\"risk\"][\"value\"]]});\n console.info(key);\n }\n }\n\n this.dadosCustomersTop.sort(compare);\n }\n }\n }\n }\n }, error => {\n console.log('error customersTop', error);\n });\n\n this.mainPageService.runNamedQuery('QuantityOrders', {}).subscribe(result => {\n this.topResultBoxes[0]['title'] = result['totalHits'];\n }, error => {\n console.log('error getAverageTicket', error);\n });\n\n this.mainPageService.runNamedQuery('QuantityCustomers', {}).subscribe(result => {\n console.info(JSON.stringify(result));\n this.topResultBoxes[1]['title'] = result['totalHits'];\n }, error => {\n console.log('error getAverageTicket', error);\n });\n\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/main/main-page.component.ts","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".campaign-title {\\n font-size: 24px;\\n font-weight: bold;\\n display: inline-block;\\n padding: 10px;\\n}\\n\\n.campaign-time {\\n height: 30px;\\n color: white;\\n font-size: 14px;\\n background-color: #f38400;\\n display: inline-block;\\n padding: 3px 8px;\\n margin-left: 20px;\\n}\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/product-detail/product-detail-page.component.css\n// module id = ../../../../../src/app/pages/product-detail/product-detail-page.component.css\n// module chunks = main","module.exports = \"\\n\\n \\n
\\n
\\n
\\n Coca Cola 2 litros\\n
\\n
\\n Final. em 5 dias\\n
\\n
\\n
\\n \\n \\n
\\n
\\n\\n
\\n\\n
\\n
\\n\\n \\n
\\n
\\n\\n
\\n\\n
\\n\\n
\\n
\\n
\\n\\n
\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/product-detail/product-detail-page.component.html\n// module id = ../../../../../src/app/pages/product-detail/product-detail-page.component.html\n// module chunks = main","import { Component, OnInit } from '@angular/core';\n\nimport { BulletCharts } from '../../components/bullet-charts/bullet-charts.interface';\nimport { ThfTableColumn } from '@totvs/thf-ui/components/thf-table';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'product-detail-page',\n templateUrl: './product-detail-page.component.html',\n styleUrls: ['./product-detail-page.component.css']\n})\nexport class ProductDetailPageComponent {\n\n avgProducts: Array = [\n {label: 'Cupons', value: 3500, max: 3000, primaryColor: '#99c9e8', secundaryColor: 'f1f7fd'},\n {label: 'Cupons', value: 3500, max: 3000, primaryColor: '#99c9e8', secundaryColor: 'f1f7fd'},\n {label: 'Cupons', value: 3500, max: 3000, primaryColor: '#99c9e8', secundaryColor: 'f1f7fd'},\n {label: 'Cupons', value: 3500, max: 3000, primaryColor: '#99c9e8', secundaryColor: 'f1f7fd'},\n ];\n\n public readonly columns: ThfTableColumn[] = [\n { column: 'product', label: 'Produto', type: 'link', action: (value, row) => { this.extras(value, row); } },\n { column: 'billing', label: 'Faturamento'},\n { column: 'profit', label: 'Lucro' },\n { column: 'avgticket', label: 'Ticket médio' },\n { column: 'vouchers', label: 'Vouchers convertidos / emitidos' },\n // { column: 'status', label: 'Status', type: 'subtitle', width: '5%', subtitles: [\n // { value: 'open', type: 'success', label: 'Aberta', content: '1' },\n // { value: 'next', type: 'warning', label: 'Prazo final próximo', content: '2' },\n // { value: 'closed', type: 'danger', label: 'Finalizada', content: '3' }\n // ]}\n { column: 'status', label: 'Status', color: this.experimentalColor }\n ];\n\n public readonly items: Array = [\n { campaign: 'Totvs Switch',\n billing: 'On off checkbox similar to a light switch ',\n link: '/documentation/thf-switch',\n status: 'Final. em 5 dias' },\n { campaign: 'Totvs Radio Group',\n billing: 'Group of round buttons that allows 1 item to be selected',\n link: '/campaign/thf-radio-group',\n profit: 'Best Practices',\n status: '25/04/2018'},\n { campaign: 'Totvs Radio Group',\n billing: 'Group of round buttons that allows 1 item to be selected',\n link: '/campaign/thf-radio-group',\n profit: 'Best Practices',\n status: 'Finalizada'\n }\n ];\n\n constructor() { }\n\n experimentalColor(row, column) {\n\n if (row.status === 'Finalizada') {\n return 'danger';\n } else if (row.status.indexOf('Final.') > -1) {\n return 'warning';\n } else {\n return 'success';\n }\n\n }\n\n extras(value, row) {\n console.log(value, row, 'campaign clicked');\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/pages/product-detail/product-detail-page.component.ts","import { Injectable } from '@angular/core';\nimport { CanActivate, Router, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router';\n\nimport { AuthService } from './auth.service';\n\n@Injectable()\nexport class AuthGuardLogin implements CanActivate {\n\n constructor(private authService: AuthService, private router: Router) {}\n\n /**\n * Prevents login from being accessed when logged in\n */\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n if (this.authService.isLoggedIn()) {\n this.router.navigate(['']);\n return false;\n }\n\n return true;\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/auth-guard-login.service.ts","import { Injectable } from '@angular/core';\nimport { CanActivate, Router, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router';\n\nimport { AuthService } from './auth.service';\n\n@Injectable()\nexport class AuthGuard implements CanActivate {\n\n constructor(private authService: AuthService, private router: Router) {}\n\n /**\n * Prevents access without login\n */\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n return this.checkLogin(state.url);\n }\n\n checkLogin(url: string): boolean {\n if (this.authService.isLoggedIn()) {\n return true;\n }\n\n // Store the attempted URL for redirecting\n this.authService.redirectUrl = url;\n\n // Navigate to the login page with extras\n this.router.navigate(['/login']);\n return false;\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/auth-guard.service.ts","import { Injectable } from '@angular/core';\nimport { HttpRequest, HttpInterceptor, HttpHandler, HttpEvent } from '@angular/common/http';\n\nimport { Observable } from 'rxjs/Observable';\n\n@Injectable()\nexport class AuthInterceptor implements HttpInterceptor {\n\n intercept(req: HttpRequest,\n next: HttpHandler): Observable> {\n\n const idToken = localStorage.getItem('access_token');\n\n if (idToken) {\n const cloned = req.clone({\n headers: req.headers.set('Authorization',\n 'Bearer ' + idToken)\n });\n\n return next.handle(cloned);\n } else {\n return next.handle(req);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/auth-interceptor.service.ts","import { Injectable } from '@angular/core';\nimport { HttpParams, HttpHeaders, HttpClient } from '@angular/common/http';\n\nimport { HttpRequestsService } from './http-requests.service';\n\nimport * as moment from 'moment';\nimport { Router } from '@angular/router';\n\n@Injectable()\nexport class AuthService {\n\n redirectUrl = '';\n\n constructor(private requests: HttpRequestsService,\n private router: Router,\n private http: HttpClient) { }\n\n login(username, password) {\n const body = new HttpParams()\n .set('grant_type', 'password')\n .set('password', password)\n .set('username', username)\n .set('subdomain', this.requests.subdomain)\n .set('connectorId', this.requests.connectorId);\n\n const httpOptions = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/x-www-form-urlencoded'\n })\n };\n\n return this.http.post(this.requests.rootUrl + 'oauth2/token', body.toString(), httpOptions);\n }\n\n setSession(authResult, user) {\n localStorage.setItem('access_token', authResult['access_token']);\n localStorage.setItem('user', user);\n\n const expiresAt = moment().add(authResult['expires_in'], 'second');\n localStorage.setItem('expires_at', JSON.stringify(expiresAt.valueOf()) );\n }\n\n logout() {\n localStorage.removeItem('access_token');\n localStorage.removeItem('expires_at');\n localStorage.removeItem('user');\n\n this.router.navigate(['/login']);\n }\n\n isLoggedIn() {\n return moment().isBefore(this.getExpiration());\n }\n\n isLoggedOut() {\n return !this.isLoggedIn();\n }\n\n getExpiration() {\n const expiration = localStorage.getItem('expires_at');\n const expiresAt = JSON.parse(expiration);\n return moment(expiresAt);\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/auth.service.ts","import { Injectable } from '@angular/core';\n\nimport { HttpRequestsService } from '../../services/http-requests.service';\n\n@Injectable()\nexport class MainPageService {\n\n constructor(private request: HttpRequestsService) { }\n\n runNamedQuery(namedQuery, params) {\n const url = 'queries/named/' + namedQuery + '?indexType=MASTER&pageSize=0&sortOrder=ASC&scrollable=false';\n\n return this.request.post(url, params);\n }\n\n private getStringDate(date) {\n return (date instanceof Date) ? date.toISOString().substring(0, 10) : date;\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/carol-querys/main-page.service.ts","import { Injectable } from '@angular/core';\n\nimport { HttpRequestsService } from '../../services/http-requests.service';\n\n@Injectable()\nexport class ToolbarSearchService {\n\n constructor(private request: HttpRequestsService) { }\n\n getCampaigns(value) {\n const url = 'queries/named/findCampaigns?indexType=MASTER&pageSize=0&sortOrder=ASC&scrollable=false';\n\n /**\n * camp_name - Campaign Name, string (optional)\n * camp_id - Campaign ID, string (optional)\n * count - number of matches for the query , (optional)\n */\n const params = {\n count: '50',\n camp_name: value,\n };\n\n return this.request.post(url, params);\n }\n\n getCampaignByProduct(value) {\n const url = 'queries/named/findCampaignsByProduct?indexType=MASTER&pageSize=0&sortOrder=ASC&scrollable=false';\n\n /**\n * prod_name - Product Name, string (optional)\n * prod_id - Product ID, string (optional)\n * count - number of matches for the query, , (optional)\n */\n const params = {\n count: '50',\n prod_name: value,\n };\n\n return this.request.post(url, params);\n }\n\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/carol-querys/toolbar-search.service.ts","import { Injectable } from '@angular/core';\n\nimport { HttpClient, HttpHeaders, HttpErrorResponse, HttpParams } from '@angular/common/http';\nimport { catchError, retry } from 'rxjs/operators';\nimport { ErrorObservable } from 'rxjs/observable/ErrorObservable';\n\n@Injectable()\nexport class HttpRequestsService {\n subdomain = undefined;\n rootUrl = undefined;\n connectorId = '0a0829172fc2433c9aa26460c31b78f0';\n\n constructor(private http: HttpClient) {\n var url = window.location.href;\n var domain = url.match(\"/([a-z0-9|-]+\\.)*[a-z0-9|-]+\\.[a-z]+\")[0];\n var index = domain.indexOf('.carol.ai');\n\n if(index > -1) {\n domain = domain.substring(1,index)\n console.info(\"from url: \" + domain);\n }\n else {\n domain = \"gd\";\n console.info(\"fixed in the code: \" + domain);\n }\n\n this.subdomain = domain;\n this.rootUrl = 'https://' + domain + '.carol.ai/api/v2/';\n }\n\n post(url, params?) {\n\n const body = JSON.stringify(params);\n\n const httpOptions = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n })\n };\n\n return this.http.post(this.rootUrl + url, body.toString(), httpOptions);\n }\n\n get(params?) {\n\n }\n\n}\n\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/http-requests.service.ts","import { Injectable, OnInit } from '@angular/core';\n\nimport { EN } from '../i18n/literalsEN';\nimport { PT } from '../i18n/literalsPT';\n\n@Injectable()\nexport class I18nService implements OnInit {\n\n currentLanguage;\n literals;\n\n constructor() {\n this.currentLanguage = (localStorage.getItem('language')) ?\n localStorage.getItem('language') :\n navigator.language.substring(0, 2).toUpperCase();\n\n this.setLiterals(this.currentLanguage);\n }\n\n ngOnInit() {\n }\n\n getLanguage() {\n return this.currentLanguage;\n }\n\n setLanguage(language: string) {\n this.setLiterals(language);\n localStorage.setItem('language', language);\n location.reload();\n }\n\n setLiterals(language) {\n this.literals = (language === 'PT') ? PT : EN;\n }\n\n getLiterals() {\n return this.literals;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/app/services/i18n.service.ts","// The file contents for the current environment will overwrite these during build.\n// The build system defaults to the dev environment which uses `environment.ts`, but if you do\n// `ng build --env=prod` then `environment.prod.ts` will be used instead.\n// The list of which env maps to which file can be found in `.angular-cli.json`.\n\nexport const environment = {\n production: false\n};\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/environments/environment.ts","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.log(err));\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/main.ts","var map = {\n\t\"./af\": \"../../../../moment/locale/af.js\",\n\t\"./af.js\": \"../../../../moment/locale/af.js\",\n\t\"./ar\": \"../../../../moment/locale/ar.js\",\n\t\"./ar-dz\": \"../../../../moment/locale/ar-dz.js\",\n\t\"./ar-dz.js\": \"../../../../moment/locale/ar-dz.js\",\n\t\"./ar-kw\": \"../../../../moment/locale/ar-kw.js\",\n\t\"./ar-kw.js\": \"../../../../moment/locale/ar-kw.js\",\n\t\"./ar-ly\": \"../../../../moment/locale/ar-ly.js\",\n\t\"./ar-ly.js\": \"../../../../moment/locale/ar-ly.js\",\n\t\"./ar-ma\": \"../../../../moment/locale/ar-ma.js\",\n\t\"./ar-ma.js\": \"../../../../moment/locale/ar-ma.js\",\n\t\"./ar-sa\": \"../../../../moment/locale/ar-sa.js\",\n\t\"./ar-sa.js\": \"../../../../moment/locale/ar-sa.js\",\n\t\"./ar-tn\": \"../../../../moment/locale/ar-tn.js\",\n\t\"./ar-tn.js\": \"../../../../moment/locale/ar-tn.js\",\n\t\"./ar.js\": \"../../../../moment/locale/ar.js\",\n\t\"./az\": \"../../../../moment/locale/az.js\",\n\t\"./az.js\": \"../../../../moment/locale/az.js\",\n\t\"./be\": \"../../../../moment/locale/be.js\",\n\t\"./be.js\": \"../../../../moment/locale/be.js\",\n\t\"./bg\": \"../../../../moment/locale/bg.js\",\n\t\"./bg.js\": \"../../../../moment/locale/bg.js\",\n\t\"./bm\": \"../../../../moment/locale/bm.js\",\n\t\"./bm.js\": \"../../../../moment/locale/bm.js\",\n\t\"./bn\": \"../../../../moment/locale/bn.js\",\n\t\"./bn.js\": \"../../../../moment/locale/bn.js\",\n\t\"./bo\": \"../../../../moment/locale/bo.js\",\n\t\"./bo.js\": \"../../../../moment/locale/bo.js\",\n\t\"./br\": \"../../../../moment/locale/br.js\",\n\t\"./br.js\": \"../../../../moment/locale/br.js\",\n\t\"./bs\": \"../../../../moment/locale/bs.js\",\n\t\"./bs.js\": \"../../../../moment/locale/bs.js\",\n\t\"./ca\": \"../../../../moment/locale/ca.js\",\n\t\"./ca.js\": \"../../../../moment/locale/ca.js\",\n\t\"./cs\": \"../../../../moment/locale/cs.js\",\n\t\"./cs.js\": \"../../../../moment/locale/cs.js\",\n\t\"./cv\": \"../../../../moment/locale/cv.js\",\n\t\"./cv.js\": \"../../../../moment/locale/cv.js\",\n\t\"./cy\": \"../../../../moment/locale/cy.js\",\n\t\"./cy.js\": \"../../../../moment/locale/cy.js\",\n\t\"./da\": \"../../../../moment/locale/da.js\",\n\t\"./da.js\": \"../../../../moment/locale/da.js\",\n\t\"./de\": \"../../../../moment/locale/de.js\",\n\t\"./de-at\": \"../../../../moment/locale/de-at.js\",\n\t\"./de-at.js\": \"../../../../moment/locale/de-at.js\",\n\t\"./de-ch\": \"../../../../moment/locale/de-ch.js\",\n\t\"./de-ch.js\": \"../../../../moment/locale/de-ch.js\",\n\t\"./de.js\": \"../../../../moment/locale/de.js\",\n\t\"./dv\": \"../../../../moment/locale/dv.js\",\n\t\"./dv.js\": \"../../../../moment/locale/dv.js\",\n\t\"./el\": \"../../../../moment/locale/el.js\",\n\t\"./el.js\": \"../../../../moment/locale/el.js\",\n\t\"./en-au\": \"../../../../moment/locale/en-au.js\",\n\t\"./en-au.js\": \"../../../../moment/locale/en-au.js\",\n\t\"./en-ca\": \"../../../../moment/locale/en-ca.js\",\n\t\"./en-ca.js\": \"../../../../moment/locale/en-ca.js\",\n\t\"./en-gb\": \"../../../../moment/locale/en-gb.js\",\n\t\"./en-gb.js\": \"../../../../moment/locale/en-gb.js\",\n\t\"./en-ie\": \"../../../../moment/locale/en-ie.js\",\n\t\"./en-ie.js\": \"../../../../moment/locale/en-ie.js\",\n\t\"./en-il\": \"../../../../moment/locale/en-il.js\",\n\t\"./en-il.js\": \"../../../../moment/locale/en-il.js\",\n\t\"./en-nz\": \"../../../../moment/locale/en-nz.js\",\n\t\"./en-nz.js\": \"../../../../moment/locale/en-nz.js\",\n\t\"./eo\": \"../../../../moment/locale/eo.js\",\n\t\"./eo.js\": \"../../../../moment/locale/eo.js\",\n\t\"./es\": \"../../../../moment/locale/es.js\",\n\t\"./es-do\": \"../../../../moment/locale/es-do.js\",\n\t\"./es-do.js\": \"../../../../moment/locale/es-do.js\",\n\t\"./es-us\": \"../../../../moment/locale/es-us.js\",\n\t\"./es-us.js\": \"../../../../moment/locale/es-us.js\",\n\t\"./es.js\": \"../../../../moment/locale/es.js\",\n\t\"./et\": \"../../../../moment/locale/et.js\",\n\t\"./et.js\": \"../../../../moment/locale/et.js\",\n\t\"./eu\": \"../../../../moment/locale/eu.js\",\n\t\"./eu.js\": \"../../../../moment/locale/eu.js\",\n\t\"./fa\": \"../../../../moment/locale/fa.js\",\n\t\"./fa.js\": \"../../../../moment/locale/fa.js\",\n\t\"./fi\": \"../../../../moment/locale/fi.js\",\n\t\"./fi.js\": \"../../../../moment/locale/fi.js\",\n\t\"./fo\": \"../../../../moment/locale/fo.js\",\n\t\"./fo.js\": \"../../../../moment/locale/fo.js\",\n\t\"./fr\": \"../../../../moment/locale/fr.js\",\n\t\"./fr-ca\": \"../../../../moment/locale/fr-ca.js\",\n\t\"./fr-ca.js\": \"../../../../moment/locale/fr-ca.js\",\n\t\"./fr-ch\": \"../../../../moment/locale/fr-ch.js\",\n\t\"./fr-ch.js\": \"../../../../moment/locale/fr-ch.js\",\n\t\"./fr.js\": \"../../../../moment/locale/fr.js\",\n\t\"./fy\": \"../../../../moment/locale/fy.js\",\n\t\"./fy.js\": \"../../../../moment/locale/fy.js\",\n\t\"./gd\": \"../../../../moment/locale/gd.js\",\n\t\"./gd.js\": \"../../../../moment/locale/gd.js\",\n\t\"./gl\": \"../../../../moment/locale/gl.js\",\n\t\"./gl.js\": \"../../../../moment/locale/gl.js\",\n\t\"./gom-latn\": \"../../../../moment/locale/gom-latn.js\",\n\t\"./gom-latn.js\": \"../../../../moment/locale/gom-latn.js\",\n\t\"./gu\": \"../../../../moment/locale/gu.js\",\n\t\"./gu.js\": \"../../../../moment/locale/gu.js\",\n\t\"./he\": \"../../../../moment/locale/he.js\",\n\t\"./he.js\": \"../../../../moment/locale/he.js\",\n\t\"./hi\": \"../../../../moment/locale/hi.js\",\n\t\"./hi.js\": \"../../../../moment/locale/hi.js\",\n\t\"./hr\": \"../../../../moment/locale/hr.js\",\n\t\"./hr.js\": \"../../../../moment/locale/hr.js\",\n\t\"./hu\": \"../../../../moment/locale/hu.js\",\n\t\"./hu.js\": \"../../../../moment/locale/hu.js\",\n\t\"./hy-am\": \"../../../../moment/locale/hy-am.js\",\n\t\"./hy-am.js\": \"../../../../moment/locale/hy-am.js\",\n\t\"./id\": \"../../../../moment/locale/id.js\",\n\t\"./id.js\": \"../../../../moment/locale/id.js\",\n\t\"./is\": \"../../../../moment/locale/is.js\",\n\t\"./is.js\": \"../../../../moment/locale/is.js\",\n\t\"./it\": \"../../../../moment/locale/it.js\",\n\t\"./it.js\": \"../../../../moment/locale/it.js\",\n\t\"./ja\": \"../../../../moment/locale/ja.js\",\n\t\"./ja.js\": \"../../../../moment/locale/ja.js\",\n\t\"./jv\": \"../../../../moment/locale/jv.js\",\n\t\"./jv.js\": \"../../../../moment/locale/jv.js\",\n\t\"./ka\": \"../../../../moment/locale/ka.js\",\n\t\"./ka.js\": \"../../../../moment/locale/ka.js\",\n\t\"./kk\": \"../../../../moment/locale/kk.js\",\n\t\"./kk.js\": \"../../../../moment/locale/kk.js\",\n\t\"./km\": \"../../../../moment/locale/km.js\",\n\t\"./km.js\": \"../../../../moment/locale/km.js\",\n\t\"./kn\": \"../../../../moment/locale/kn.js\",\n\t\"./kn.js\": \"../../../../moment/locale/kn.js\",\n\t\"./ko\": \"../../../../moment/locale/ko.js\",\n\t\"./ko.js\": \"../../../../moment/locale/ko.js\",\n\t\"./ky\": \"../../../../moment/locale/ky.js\",\n\t\"./ky.js\": \"../../../../moment/locale/ky.js\",\n\t\"./lb\": \"../../../../moment/locale/lb.js\",\n\t\"./lb.js\": \"../../../../moment/locale/lb.js\",\n\t\"./lo\": \"../../../../moment/locale/lo.js\",\n\t\"./lo.js\": \"../../../../moment/locale/lo.js\",\n\t\"./lt\": \"../../../../moment/locale/lt.js\",\n\t\"./lt.js\": \"../../../../moment/locale/lt.js\",\n\t\"./lv\": \"../../../../moment/locale/lv.js\",\n\t\"./lv.js\": \"../../../../moment/locale/lv.js\",\n\t\"./me\": \"../../../../moment/locale/me.js\",\n\t\"./me.js\": \"../../../../moment/locale/me.js\",\n\t\"./mi\": \"../../../../moment/locale/mi.js\",\n\t\"./mi.js\": \"../../../../moment/locale/mi.js\",\n\t\"./mk\": \"../../../../moment/locale/mk.js\",\n\t\"./mk.js\": \"../../../../moment/locale/mk.js\",\n\t\"./ml\": \"../../../../moment/locale/ml.js\",\n\t\"./ml.js\": \"../../../../moment/locale/ml.js\",\n\t\"./mn\": \"../../../../moment/locale/mn.js\",\n\t\"./mn.js\": \"../../../../moment/locale/mn.js\",\n\t\"./mr\": \"../../../../moment/locale/mr.js\",\n\t\"./mr.js\": \"../../../../moment/locale/mr.js\",\n\t\"./ms\": \"../../../../moment/locale/ms.js\",\n\t\"./ms-my\": \"../../../../moment/locale/ms-my.js\",\n\t\"./ms-my.js\": \"../../../../moment/locale/ms-my.js\",\n\t\"./ms.js\": \"../../../../moment/locale/ms.js\",\n\t\"./mt\": \"../../../../moment/locale/mt.js\",\n\t\"./mt.js\": \"../../../../moment/locale/mt.js\",\n\t\"./my\": \"../../../../moment/locale/my.js\",\n\t\"./my.js\": \"../../../../moment/locale/my.js\",\n\t\"./nb\": \"../../../../moment/locale/nb.js\",\n\t\"./nb.js\": \"../../../../moment/locale/nb.js\",\n\t\"./ne\": \"../../../../moment/locale/ne.js\",\n\t\"./ne.js\": \"../../../../moment/locale/ne.js\",\n\t\"./nl\": \"../../../../moment/locale/nl.js\",\n\t\"./nl-be\": \"../../../../moment/locale/nl-be.js\",\n\t\"./nl-be.js\": \"../../../../moment/locale/nl-be.js\",\n\t\"./nl.js\": \"../../../../moment/locale/nl.js\",\n\t\"./nn\": \"../../../../moment/locale/nn.js\",\n\t\"./nn.js\": \"../../../../moment/locale/nn.js\",\n\t\"./pa-in\": \"../../../../moment/locale/pa-in.js\",\n\t\"./pa-in.js\": \"../../../../moment/locale/pa-in.js\",\n\t\"./pl\": \"../../../../moment/locale/pl.js\",\n\t\"./pl.js\": \"../../../../moment/locale/pl.js\",\n\t\"./pt\": \"../../../../moment/locale/pt.js\",\n\t\"./pt-br\": \"../../../../moment/locale/pt-br.js\",\n\t\"./pt-br.js\": \"../../../../moment/locale/pt-br.js\",\n\t\"./pt.js\": \"../../../../moment/locale/pt.js\",\n\t\"./ro\": \"../../../../moment/locale/ro.js\",\n\t\"./ro.js\": \"../../../../moment/locale/ro.js\",\n\t\"./ru\": \"../../../../moment/locale/ru.js\",\n\t\"./ru.js\": \"../../../../moment/locale/ru.js\",\n\t\"./sd\": \"../../../../moment/locale/sd.js\",\n\t\"./sd.js\": \"../../../../moment/locale/sd.js\",\n\t\"./se\": \"../../../../moment/locale/se.js\",\n\t\"./se.js\": \"../../../../moment/locale/se.js\",\n\t\"./si\": \"../../../../moment/locale/si.js\",\n\t\"./si.js\": \"../../../../moment/locale/si.js\",\n\t\"./sk\": \"../../../../moment/locale/sk.js\",\n\t\"./sk.js\": \"../../../../moment/locale/sk.js\",\n\t\"./sl\": \"../../../../moment/locale/sl.js\",\n\t\"./sl.js\": \"../../../../moment/locale/sl.js\",\n\t\"./sq\": \"../../../../moment/locale/sq.js\",\n\t\"./sq.js\": \"../../../../moment/locale/sq.js\",\n\t\"./sr\": \"../../../../moment/locale/sr.js\",\n\t\"./sr-cyrl\": \"../../../../moment/locale/sr-cyrl.js\",\n\t\"./sr-cyrl.js\": \"../../../../moment/locale/sr-cyrl.js\",\n\t\"./sr.js\": \"../../../../moment/locale/sr.js\",\n\t\"./ss\": \"../../../../moment/locale/ss.js\",\n\t\"./ss.js\": \"../../../../moment/locale/ss.js\",\n\t\"./sv\": \"../../../../moment/locale/sv.js\",\n\t\"./sv.js\": \"../../../../moment/locale/sv.js\",\n\t\"./sw\": \"../../../../moment/locale/sw.js\",\n\t\"./sw.js\": \"../../../../moment/locale/sw.js\",\n\t\"./ta\": \"../../../../moment/locale/ta.js\",\n\t\"./ta.js\": \"../../../../moment/locale/ta.js\",\n\t\"./te\": \"../../../../moment/locale/te.js\",\n\t\"./te.js\": \"../../../../moment/locale/te.js\",\n\t\"./tet\": \"../../../../moment/locale/tet.js\",\n\t\"./tet.js\": \"../../../../moment/locale/tet.js\",\n\t\"./tg\": \"../../../../moment/locale/tg.js\",\n\t\"./tg.js\": \"../../../../moment/locale/tg.js\",\n\t\"./th\": \"../../../../moment/locale/th.js\",\n\t\"./th.js\": \"../../../../moment/locale/th.js\",\n\t\"./tl-ph\": \"../../../../moment/locale/tl-ph.js\",\n\t\"./tl-ph.js\": \"../../../../moment/locale/tl-ph.js\",\n\t\"./tlh\": \"../../../../moment/locale/tlh.js\",\n\t\"./tlh.js\": \"../../../../moment/locale/tlh.js\",\n\t\"./tr\": \"../../../../moment/locale/tr.js\",\n\t\"./tr.js\": \"../../../../moment/locale/tr.js\",\n\t\"./tzl\": \"../../../../moment/locale/tzl.js\",\n\t\"./tzl.js\": \"../../../../moment/locale/tzl.js\",\n\t\"./tzm\": \"../../../../moment/locale/tzm.js\",\n\t\"./tzm-latn\": \"../../../../moment/locale/tzm-latn.js\",\n\t\"./tzm-latn.js\": \"../../../../moment/locale/tzm-latn.js\",\n\t\"./tzm.js\": \"../../../../moment/locale/tzm.js\",\n\t\"./ug-cn\": \"../../../../moment/locale/ug-cn.js\",\n\t\"./ug-cn.js\": \"../../../../moment/locale/ug-cn.js\",\n\t\"./uk\": \"../../../../moment/locale/uk.js\",\n\t\"./uk.js\": \"../../../../moment/locale/uk.js\",\n\t\"./ur\": \"../../../../moment/locale/ur.js\",\n\t\"./ur.js\": \"../../../../moment/locale/ur.js\",\n\t\"./uz\": \"../../../../moment/locale/uz.js\",\n\t\"./uz-latn\": \"../../../../moment/locale/uz-latn.js\",\n\t\"./uz-latn.js\": \"../../../../moment/locale/uz-latn.js\",\n\t\"./uz.js\": \"../../../../moment/locale/uz.js\",\n\t\"./vi\": \"../../../../moment/locale/vi.js\",\n\t\"./vi.js\": \"../../../../moment/locale/vi.js\",\n\t\"./x-pseudo\": \"../../../../moment/locale/x-pseudo.js\",\n\t\"./x-pseudo.js\": \"../../../../moment/locale/x-pseudo.js\",\n\t\"./yo\": \"../../../../moment/locale/yo.js\",\n\t\"./yo.js\": \"../../../../moment/locale/yo.js\",\n\t\"./zh-cn\": \"../../../../moment/locale/zh-cn.js\",\n\t\"./zh-cn.js\": \"../../../../moment/locale/zh-cn.js\",\n\t\"./zh-hk\": \"../../../../moment/locale/zh-hk.js\",\n\t\"./zh-hk.js\": \"../../../../moment/locale/zh-hk.js\",\n\t\"./zh-tw\": \"../../../../moment/locale/zh-tw.js\",\n\t\"./zh-tw.js\": \"../../../../moment/locale/zh-tw.js\"\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"../../../../moment/locale recursive ^\\\\.\\\\/.*$\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/moment/locale ^\\.\\/.*$\n// module id = ../../../../moment/locale recursive ^\\.\\/.*$\n// module chunks = main"],"sourceRoot":"webpack:///"} \ No newline at end of file diff --git a/web-carolapp/site/polyfills.bundle.js b/web-carolapp/site/polyfills.bundle.js deleted file mode 100644 index ac42307..0000000 --- a/web-carolapp/site/polyfills.bundle.js +++ /dev/null @@ -1,5153 +0,0 @@ -webpackJsonp(["polyfills"],{ - -/***/ "../../../../../src/polyfills.ts": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_core_js_es7_reflect__ = __webpack_require__("../../../../core-js/es7/reflect.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_core_js_es7_reflect___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_core_js_es7_reflect__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_zone_js_dist_zone__ = __webpack_require__("../../../../zone.js/dist/zone.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_zone_js_dist_zone___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_zone_js_dist_zone__); -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html - */ -/*************************************************************************************************** - * BROWSER POLYFILLS - */ -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ -// import 'core-js/es6/symbol'; -// import 'core-js/es6/object'; -// import 'core-js/es6/function'; -// import 'core-js/es6/parse-int'; -// import 'core-js/es6/parse-float'; -// import 'core-js/es6/number'; -// import 'core-js/es6/math'; -// import 'core-js/es6/string'; -// import 'core-js/es6/date'; -// import 'core-js/es6/array'; -// import 'core-js/es6/regexp'; -// import 'core-js/es6/map'; -// import 'core-js/es6/weak-map'; -// import 'core-js/es6/set'; -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. -/** IE10 and IE11 requires the following for the Reflect API. */ -// import 'core-js/es6/reflect'; -/** Evergreen browsers require these. **/ -// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. - -/** - * Required to support Web Animations `@angular/platform-browser/animations`. - * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation - **/ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ - // Included with Angular CLI. -/*************************************************************************************************** - * APPLICATION IMPORTS - */ - - -/***/ }), - -/***/ "../../../../core-js/es7/reflect.js": -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__("../../../../core-js/modules/es7.reflect.define-metadata.js"); -__webpack_require__("../../../../core-js/modules/es7.reflect.delete-metadata.js"); -__webpack_require__("../../../../core-js/modules/es7.reflect.get-metadata.js"); -__webpack_require__("../../../../core-js/modules/es7.reflect.get-metadata-keys.js"); -__webpack_require__("../../../../core-js/modules/es7.reflect.get-own-metadata.js"); -__webpack_require__("../../../../core-js/modules/es7.reflect.get-own-metadata-keys.js"); -__webpack_require__("../../../../core-js/modules/es7.reflect.has-metadata.js"); -__webpack_require__("../../../../core-js/modules/es7.reflect.has-own-metadata.js"); -__webpack_require__("../../../../core-js/modules/es7.reflect.metadata.js"); -module.exports = __webpack_require__("../../../../core-js/modules/_core.js").Reflect; - - -/***/ }), - -/***/ "../../../../core-js/modules/_a-function.js": -/***/ (function(module, exports) { - -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_an-instance.js": -/***/ (function(module, exports) { - -module.exports = function (it, Constructor, name, forbiddenField) { - if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { - throw TypeError(name + ': incorrect invocation!'); - } return it; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_an-object.js": -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__("../../../../core-js/modules/_is-object.js"); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_array-from-iterable.js": -/***/ (function(module, exports, __webpack_require__) { - -var forOf = __webpack_require__("../../../../core-js/modules/_for-of.js"); - -module.exports = function (iter, ITERATOR) { - var result = []; - forOf(iter, false, result.push, result, ITERATOR); - return result; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_array-includes.js": -/***/ (function(module, exports, __webpack_require__) { - -// false -> Array#indexOf -// true -> Array#includes -var toIObject = __webpack_require__("../../../../core-js/modules/_to-iobject.js"); -var toLength = __webpack_require__("../../../../core-js/modules/_to-length.js"); -var toAbsoluteIndex = __webpack_require__("../../../../core-js/modules/_to-absolute-index.js"); -module.exports = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_array-methods.js": -/***/ (function(module, exports, __webpack_require__) { - -// 0 -> Array#forEach -// 1 -> Array#map -// 2 -> Array#filter -// 3 -> Array#some -// 4 -> Array#every -// 5 -> Array#find -// 6 -> Array#findIndex -var ctx = __webpack_require__("../../../../core-js/modules/_ctx.js"); -var IObject = __webpack_require__("../../../../core-js/modules/_iobject.js"); -var toObject = __webpack_require__("../../../../core-js/modules/_to-object.js"); -var toLength = __webpack_require__("../../../../core-js/modules/_to-length.js"); -var asc = __webpack_require__("../../../../core-js/modules/_array-species-create.js"); -module.exports = function (TYPE, $create) { - var IS_MAP = TYPE == 1; - var IS_FILTER = TYPE == 2; - var IS_SOME = TYPE == 3; - var IS_EVERY = TYPE == 4; - var IS_FIND_INDEX = TYPE == 6; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - var create = $create || asc; - return function ($this, callbackfn, that) { - var O = toObject($this); - var self = IObject(O); - var f = ctx(callbackfn, that, 3); - var length = toLength(self.length); - var index = 0; - var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; - var val, res; - for (;length > index; index++) if (NO_HOLES || index in self) { - val = self[index]; - res = f(val, index, O); - if (TYPE) { - if (IS_MAP) result[index] = res; // map - else if (res) switch (TYPE) { - case 3: return true; // some - case 5: return val; // find - case 6: return index; // findIndex - case 2: result.push(val); // filter - } else if (IS_EVERY) return false; // every - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; - }; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_array-species-constructor.js": -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__("../../../../core-js/modules/_is-object.js"); -var isArray = __webpack_require__("../../../../core-js/modules/_is-array.js"); -var SPECIES = __webpack_require__("../../../../core-js/modules/_wks.js")('species'); - -module.exports = function (original) { - var C; - if (isArray(original)) { - C = original.constructor; - // cross-realm fallback - if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; - if (isObject(C)) { - C = C[SPECIES]; - if (C === null) C = undefined; - } - } return C === undefined ? Array : C; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_array-species-create.js": -/***/ (function(module, exports, __webpack_require__) { - -// 9.4.2.3 ArraySpeciesCreate(originalArray, length) -var speciesConstructor = __webpack_require__("../../../../core-js/modules/_array-species-constructor.js"); - -module.exports = function (original, length) { - return new (speciesConstructor(original))(length); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_classof.js": -/***/ (function(module, exports, __webpack_require__) { - -// getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__("../../../../core-js/modules/_cof.js"); -var TAG = __webpack_require__("../../../../core-js/modules/_wks.js")('toStringTag'); -// ES3 wrong here -var ARG = cof(function () { return arguments; }()) == 'Arguments'; - -// fallback for IE11 Script Access Denied error -var tryGet = function (it, key) { - try { - return it[key]; - } catch (e) { /* empty */ } -}; - -module.exports = function (it) { - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T - // builtinTag case - : ARG ? cof(O) - // ES3 arguments fallback - : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_cof.js": -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_collection-strong.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var dP = __webpack_require__("../../../../core-js/modules/_object-dp.js").f; -var create = __webpack_require__("../../../../core-js/modules/_object-create.js"); -var redefineAll = __webpack_require__("../../../../core-js/modules/_redefine-all.js"); -var ctx = __webpack_require__("../../../../core-js/modules/_ctx.js"); -var anInstance = __webpack_require__("../../../../core-js/modules/_an-instance.js"); -var forOf = __webpack_require__("../../../../core-js/modules/_for-of.js"); -var $iterDefine = __webpack_require__("../../../../core-js/modules/_iter-define.js"); -var step = __webpack_require__("../../../../core-js/modules/_iter-step.js"); -var setSpecies = __webpack_require__("../../../../core-js/modules/_set-species.js"); -var DESCRIPTORS = __webpack_require__("../../../../core-js/modules/_descriptors.js"); -var fastKey = __webpack_require__("../../../../core-js/modules/_meta.js").fastKey; -var validate = __webpack_require__("../../../../core-js/modules/_validate-collection.js"); -var SIZE = DESCRIPTORS ? '_s' : 'size'; - -var getEntry = function (that, key) { - // fast case - var index = fastKey(key); - var entry; - if (index !== 'F') return that._i[index]; - // frozen object case - for (entry = that._f; entry; entry = entry.n) { - if (entry.k == key) return entry; - } -}; - -module.exports = { - getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { - var C = wrapper(function (that, iterable) { - anInstance(that, C, NAME, '_i'); - that._t = NAME; // collection type - that._i = create(null); // index - that._f = undefined; // first entry - that._l = undefined; // last entry - that[SIZE] = 0; // size - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - }); - redefineAll(C.prototype, { - // 23.1.3.1 Map.prototype.clear() - // 23.2.3.2 Set.prototype.clear() - clear: function clear() { - for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { - entry.r = true; - if (entry.p) entry.p = entry.p.n = undefined; - delete data[entry.i]; - } - that._f = that._l = undefined; - that[SIZE] = 0; - }, - // 23.1.3.3 Map.prototype.delete(key) - // 23.2.3.4 Set.prototype.delete(value) - 'delete': function (key) { - var that = validate(this, NAME); - var entry = getEntry(that, key); - if (entry) { - var next = entry.n; - var prev = entry.p; - delete that._i[entry.i]; - entry.r = true; - if (prev) prev.n = next; - if (next) next.p = prev; - if (that._f == entry) that._f = next; - if (that._l == entry) that._l = prev; - that[SIZE]--; - } return !!entry; - }, - // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) - // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) - forEach: function forEach(callbackfn /* , that = undefined */) { - validate(this, NAME); - var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); - var entry; - while (entry = entry ? entry.n : this._f) { - f(entry.v, entry.k, this); - // revert to the last existing entry - while (entry && entry.r) entry = entry.p; - } - }, - // 23.1.3.7 Map.prototype.has(key) - // 23.2.3.7 Set.prototype.has(value) - has: function has(key) { - return !!getEntry(validate(this, NAME), key); - } - }); - if (DESCRIPTORS) dP(C.prototype, 'size', { - get: function () { - return validate(this, NAME)[SIZE]; - } - }); - return C; - }, - def: function (that, key, value) { - var entry = getEntry(that, key); - var prev, index; - // change existing entry - if (entry) { - entry.v = value; - // create new entry - } else { - that._l = entry = { - i: index = fastKey(key, true), // <- index - k: key, // <- key - v: value, // <- value - p: prev = that._l, // <- previous entry - n: undefined, // <- next entry - r: false // <- removed - }; - if (!that._f) that._f = entry; - if (prev) prev.n = entry; - that[SIZE]++; - // add to index - if (index !== 'F') that._i[index] = entry; - } return that; - }, - getEntry: getEntry, - setStrong: function (C, NAME, IS_MAP) { - // add .keys, .values, .entries, [@@iterator] - // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 - $iterDefine(C, NAME, function (iterated, kind) { - this._t = validate(iterated, NAME); // target - this._k = kind; // kind - this._l = undefined; // previous - }, function () { - var that = this; - var kind = that._k; - var entry = that._l; - // revert to the last existing entry - while (entry && entry.r) entry = entry.p; - // get next entry - if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { - // or finish the iteration - that._t = undefined; - return step(1); - } - // return step by kind - if (kind == 'keys') return step(0, entry.k); - if (kind == 'values') return step(0, entry.v); - return step(0, [entry.k, entry.v]); - }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); - - // add [@@species], 23.1.2.2, 23.2.2.2 - setSpecies(NAME); - } -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_collection-weak.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var redefineAll = __webpack_require__("../../../../core-js/modules/_redefine-all.js"); -var getWeak = __webpack_require__("../../../../core-js/modules/_meta.js").getWeak; -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var isObject = __webpack_require__("../../../../core-js/modules/_is-object.js"); -var anInstance = __webpack_require__("../../../../core-js/modules/_an-instance.js"); -var forOf = __webpack_require__("../../../../core-js/modules/_for-of.js"); -var createArrayMethod = __webpack_require__("../../../../core-js/modules/_array-methods.js"); -var $has = __webpack_require__("../../../../core-js/modules/_has.js"); -var validate = __webpack_require__("../../../../core-js/modules/_validate-collection.js"); -var arrayFind = createArrayMethod(5); -var arrayFindIndex = createArrayMethod(6); -var id = 0; - -// fallback for uncaught frozen keys -var uncaughtFrozenStore = function (that) { - return that._l || (that._l = new UncaughtFrozenStore()); -}; -var UncaughtFrozenStore = function () { - this.a = []; -}; -var findUncaughtFrozen = function (store, key) { - return arrayFind(store.a, function (it) { - return it[0] === key; - }); -}; -UncaughtFrozenStore.prototype = { - get: function (key) { - var entry = findUncaughtFrozen(this, key); - if (entry) return entry[1]; - }, - has: function (key) { - return !!findUncaughtFrozen(this, key); - }, - set: function (key, value) { - var entry = findUncaughtFrozen(this, key); - if (entry) entry[1] = value; - else this.a.push([key, value]); - }, - 'delete': function (key) { - var index = arrayFindIndex(this.a, function (it) { - return it[0] === key; - }); - if (~index) this.a.splice(index, 1); - return !!~index; - } -}; - -module.exports = { - getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { - var C = wrapper(function (that, iterable) { - anInstance(that, C, NAME, '_i'); - that._t = NAME; // collection type - that._i = id++; // collection id - that._l = undefined; // leak store for uncaught frozen objects - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - }); - redefineAll(C.prototype, { - // 23.3.3.2 WeakMap.prototype.delete(key) - // 23.4.3.3 WeakSet.prototype.delete(value) - 'delete': function (key) { - if (!isObject(key)) return false; - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); - return data && $has(data, this._i) && delete data[this._i]; - }, - // 23.3.3.4 WeakMap.prototype.has(key) - // 23.4.3.4 WeakSet.prototype.has(value) - has: function has(key) { - if (!isObject(key)) return false; - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); - return data && $has(data, this._i); - } - }); - return C; - }, - def: function (that, key, value) { - var data = getWeak(anObject(key), true); - if (data === true) uncaughtFrozenStore(that).set(key, value); - else data[that._i] = value; - return that; - }, - ufstore: uncaughtFrozenStore -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_collection.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var global = __webpack_require__("../../../../core-js/modules/_global.js"); -var $export = __webpack_require__("../../../../core-js/modules/_export.js"); -var redefine = __webpack_require__("../../../../core-js/modules/_redefine.js"); -var redefineAll = __webpack_require__("../../../../core-js/modules/_redefine-all.js"); -var meta = __webpack_require__("../../../../core-js/modules/_meta.js"); -var forOf = __webpack_require__("../../../../core-js/modules/_for-of.js"); -var anInstance = __webpack_require__("../../../../core-js/modules/_an-instance.js"); -var isObject = __webpack_require__("../../../../core-js/modules/_is-object.js"); -var fails = __webpack_require__("../../../../core-js/modules/_fails.js"); -var $iterDetect = __webpack_require__("../../../../core-js/modules/_iter-detect.js"); -var setToStringTag = __webpack_require__("../../../../core-js/modules/_set-to-string-tag.js"); -var inheritIfRequired = __webpack_require__("../../../../core-js/modules/_inherit-if-required.js"); - -module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { - var Base = global[NAME]; - var C = Base; - var ADDER = IS_MAP ? 'set' : 'add'; - var proto = C && C.prototype; - var O = {}; - var fixMethod = function (KEY) { - var fn = proto[KEY]; - redefine(proto, KEY, - KEY == 'delete' ? function (a) { - return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); - } : KEY == 'has' ? function has(a) { - return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); - } : KEY == 'get' ? function get(a) { - return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); - } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } - : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } - ); - }; - if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { - new C().entries().next(); - }))) { - // create collection constructor - C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); - redefineAll(C.prototype, methods); - meta.NEED = true; - } else { - var instance = new C(); - // early implementations not supports chaining - var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; - // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false - var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); - // most early implementations doesn't supports iterables, most modern - not close it correctly - var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new - // for early implementations -0 and +0 not the same - var BUGGY_ZERO = !IS_WEAK && fails(function () { - // V8 ~ Chromium 42- fails only with 5+ elements - var $instance = new C(); - var index = 5; - while (index--) $instance[ADDER](index, index); - return !$instance.has(-0); - }); - if (!ACCEPT_ITERABLES) { - C = wrapper(function (target, iterable) { - anInstance(target, C, NAME); - var that = inheritIfRequired(new Base(), target, C); - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - return that; - }); - C.prototype = proto; - proto.constructor = C; - } - if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { - fixMethod('delete'); - fixMethod('has'); - IS_MAP && fixMethod('get'); - } - if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); - // weak collections should not contains .clear method - if (IS_WEAK && proto.clear) delete proto.clear; - } - - setToStringTag(C, NAME); - - O[NAME] = C; - $export($export.G + $export.W + $export.F * (C != Base), O); - - if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); - - return C; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_core.js": -/***/ (function(module, exports) { - -var core = module.exports = { version: '2.5.5' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - - -/***/ }), - -/***/ "../../../../core-js/modules/_ctx.js": -/***/ (function(module, exports, __webpack_require__) { - -// optional / simple context binding -var aFunction = __webpack_require__("../../../../core-js/modules/_a-function.js"); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_defined.js": -/***/ (function(module, exports) { - -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_descriptors.js": -/***/ (function(module, exports, __webpack_require__) { - -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__("../../../../core-js/modules/_fails.js")(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), - -/***/ "../../../../core-js/modules/_dom-create.js": -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__("../../../../core-js/modules/_is-object.js"); -var document = __webpack_require__("../../../../core-js/modules/_global.js").document; -// typeof document.createElement is 'object' in old IE -var is = isObject(document) && isObject(document.createElement); -module.exports = function (it) { - return is ? document.createElement(it) : {}; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_enum-bug-keys.js": -/***/ (function(module, exports) { - -// IE 8- don't enum bug keys -module.exports = ( - 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' -).split(','); - - -/***/ }), - -/***/ "../../../../core-js/modules/_export.js": -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__("../../../../core-js/modules/_global.js"); -var core = __webpack_require__("../../../../core-js/modules/_core.js"); -var hide = __webpack_require__("../../../../core-js/modules/_hide.js"); -var redefine = __webpack_require__("../../../../core-js/modules/_redefine.js"); -var ctx = __webpack_require__("../../../../core-js/modules/_ctx.js"); -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); - var key, own, out, exp; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - // export native or passed - out = (own ? target : source)[key]; - // bind timers to global for call from export context - exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // extend global - if (target) redefine(target, key, out, type & $export.U); - // export - if (exports[key] != out) hide(exports, key, exp); - if (IS_PROTO && expProto[key] != out) expProto[key] = out; - } -}; -global.core = core; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - - -/***/ }), - -/***/ "../../../../core-js/modules/_fails.js": -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_for-of.js": -/***/ (function(module, exports, __webpack_require__) { - -var ctx = __webpack_require__("../../../../core-js/modules/_ctx.js"); -var call = __webpack_require__("../../../../core-js/modules/_iter-call.js"); -var isArrayIter = __webpack_require__("../../../../core-js/modules/_is-array-iter.js"); -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var toLength = __webpack_require__("../../../../core-js/modules/_to-length.js"); -var getIterFn = __webpack_require__("../../../../core-js/modules/core.get-iterator-method.js"); -var BREAK = {}; -var RETURN = {}; -var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { - var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); - var f = ctx(fn, that, entries ? 2 : 1); - var index = 0; - var length, step, iterator, result; - if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); - // fast case for arrays with default iterator - if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { - result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if (result === BREAK || result === RETURN) return result; - } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { - result = call(iterator, f, step.value, entries); - if (result === BREAK || result === RETURN) return result; - } -}; -exports.BREAK = BREAK; -exports.RETURN = RETURN; - - -/***/ }), - -/***/ "../../../../core-js/modules/_global.js": -/***/ (function(module, exports) { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - - -/***/ }), - -/***/ "../../../../core-js/modules/_has.js": -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_hide.js": -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__("../../../../core-js/modules/_object-dp.js"); -var createDesc = __webpack_require__("../../../../core-js/modules/_property-desc.js"); -module.exports = __webpack_require__("../../../../core-js/modules/_descriptors.js") ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_html.js": -/***/ (function(module, exports, __webpack_require__) { - -var document = __webpack_require__("../../../../core-js/modules/_global.js").document; -module.exports = document && document.documentElement; - - -/***/ }), - -/***/ "../../../../core-js/modules/_ie8-dom-define.js": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = !__webpack_require__("../../../../core-js/modules/_descriptors.js") && !__webpack_require__("../../../../core-js/modules/_fails.js")(function () { - return Object.defineProperty(__webpack_require__("../../../../core-js/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), - -/***/ "../../../../core-js/modules/_inherit-if-required.js": -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__("../../../../core-js/modules/_is-object.js"); -var setPrototypeOf = __webpack_require__("../../../../core-js/modules/_set-proto.js").set; -module.exports = function (that, target, C) { - var S = target.constructor; - var P; - if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { - setPrototypeOf(that, P); - } return that; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_iobject.js": -/***/ (function(module, exports, __webpack_require__) { - -// fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__("../../../../core-js/modules/_cof.js"); -// eslint-disable-next-line no-prototype-builtins -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { - return cof(it) == 'String' ? it.split('') : Object(it); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_is-array-iter.js": -/***/ (function(module, exports, __webpack_require__) { - -// check on default Array iterator -var Iterators = __webpack_require__("../../../../core-js/modules/_iterators.js"); -var ITERATOR = __webpack_require__("../../../../core-js/modules/_wks.js")('iterator'); -var ArrayProto = Array.prototype; - -module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_is-array.js": -/***/ (function(module, exports, __webpack_require__) { - -// 7.2.2 IsArray(argument) -var cof = __webpack_require__("../../../../core-js/modules/_cof.js"); -module.exports = Array.isArray || function isArray(arg) { - return cof(arg) == 'Array'; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_is-object.js": -/***/ (function(module, exports) { - -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_iter-call.js": -/***/ (function(module, exports, __webpack_require__) { - -// call something on iterator step with safe closing on error -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -module.exports = function (iterator, fn, value, entries) { - try { - return entries ? fn(anObject(value)[0], value[1]) : fn(value); - // 7.4.6 IteratorClose(iterator, completion) - } catch (e) { - var ret = iterator['return']; - if (ret !== undefined) anObject(ret.call(iterator)); - throw e; - } -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_iter-create.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var create = __webpack_require__("../../../../core-js/modules/_object-create.js"); -var descriptor = __webpack_require__("../../../../core-js/modules/_property-desc.js"); -var setToStringTag = __webpack_require__("../../../../core-js/modules/_set-to-string-tag.js"); -var IteratorPrototype = {}; - -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -__webpack_require__("../../../../core-js/modules/_hide.js")(IteratorPrototype, __webpack_require__("../../../../core-js/modules/_wks.js")('iterator'), function () { return this; }); - -module.exports = function (Constructor, NAME, next) { - Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); - setToStringTag(Constructor, NAME + ' Iterator'); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_iter-define.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var LIBRARY = __webpack_require__("../../../../core-js/modules/_library.js"); -var $export = __webpack_require__("../../../../core-js/modules/_export.js"); -var redefine = __webpack_require__("../../../../core-js/modules/_redefine.js"); -var hide = __webpack_require__("../../../../core-js/modules/_hide.js"); -var Iterators = __webpack_require__("../../../../core-js/modules/_iterators.js"); -var $iterCreate = __webpack_require__("../../../../core-js/modules/_iter-create.js"); -var setToStringTag = __webpack_require__("../../../../core-js/modules/_set-to-string-tag.js"); -var getPrototypeOf = __webpack_require__("../../../../core-js/modules/_object-gpo.js"); -var ITERATOR = __webpack_require__("../../../../core-js/modules/_wks.js")('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; - -var returnThis = function () { return this; }; - -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - $iterCreate(Constructor, NAME, next); - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: return function keys() { return new Constructor(this, kind); }; - case VALUES: return function values() { return new Constructor(this, kind); }; - } return function entries() { return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; - // Fix native - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // fix for some old engines - if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); - } - } - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - $default = function values() { return $native.call(this); }; - } - // Define iterator - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - hide(proto, ITERATOR, $default); - } - // Plug for library - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_iter-detect.js": -/***/ (function(module, exports, __webpack_require__) { - -var ITERATOR = __webpack_require__("../../../../core-js/modules/_wks.js")('iterator'); -var SAFE_CLOSING = false; - -try { - var riter = [7][ITERATOR](); - riter['return'] = function () { SAFE_CLOSING = true; }; - // eslint-disable-next-line no-throw-literal - Array.from(riter, function () { throw 2; }); -} catch (e) { /* empty */ } - -module.exports = function (exec, skipClosing) { - if (!skipClosing && !SAFE_CLOSING) return false; - var safe = false; - try { - var arr = [7]; - var iter = arr[ITERATOR](); - iter.next = function () { return { done: safe = true }; }; - arr[ITERATOR] = function () { return iter; }; - exec(arr); - } catch (e) { /* empty */ } - return safe; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_iter-step.js": -/***/ (function(module, exports) { - -module.exports = function (done, value) { - return { value: value, done: !!done }; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_iterators.js": -/***/ (function(module, exports) { - -module.exports = {}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_library.js": -/***/ (function(module, exports) { - -module.exports = false; - - -/***/ }), - -/***/ "../../../../core-js/modules/_meta.js": -/***/ (function(module, exports, __webpack_require__) { - -var META = __webpack_require__("../../../../core-js/modules/_uid.js")('meta'); -var isObject = __webpack_require__("../../../../core-js/modules/_is-object.js"); -var has = __webpack_require__("../../../../core-js/modules/_has.js"); -var setDesc = __webpack_require__("../../../../core-js/modules/_object-dp.js").f; -var id = 0; -var isExtensible = Object.isExtensible || function () { - return true; -}; -var FREEZE = !__webpack_require__("../../../../core-js/modules/_fails.js")(function () { - return isExtensible(Object.preventExtensions({})); -}); -var setMeta = function (it) { - setDesc(it, META, { value: { - i: 'O' + ++id, // object ID - w: {} // weak collections IDs - } }); -}; -var fastKey = function (it, create) { - // return primitive with prefix - if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return 'F'; - // not necessary to add metadata - if (!create) return 'E'; - // add missing metadata - setMeta(it); - // return object ID - } return it[META].i; -}; -var getWeak = function (it, create) { - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return true; - // not necessary to add metadata - if (!create) return false; - // add missing metadata - setMeta(it); - // return hash weak collections IDs - } return it[META].w; -}; -// add metadata on freeze-family methods calling -var onFreeze = function (it) { - if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); - return it; -}; -var meta = module.exports = { - KEY: META, - NEED: false, - fastKey: fastKey, - getWeak: getWeak, - onFreeze: onFreeze -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_metadata.js": -/***/ (function(module, exports, __webpack_require__) { - -var Map = __webpack_require__("../../../../core-js/modules/es6.map.js"); -var $export = __webpack_require__("../../../../core-js/modules/_export.js"); -var shared = __webpack_require__("../../../../core-js/modules/_shared.js")('metadata'); -var store = shared.store || (shared.store = new (__webpack_require__("../../../../core-js/modules/es6.weak-map.js"))()); - -var getOrCreateMetadataMap = function (target, targetKey, create) { - var targetMetadata = store.get(target); - if (!targetMetadata) { - if (!create) return undefined; - store.set(target, targetMetadata = new Map()); - } - var keyMetadata = targetMetadata.get(targetKey); - if (!keyMetadata) { - if (!create) return undefined; - targetMetadata.set(targetKey, keyMetadata = new Map()); - } return keyMetadata; -}; -var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { - var metadataMap = getOrCreateMetadataMap(O, P, false); - return metadataMap === undefined ? false : metadataMap.has(MetadataKey); -}; -var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { - var metadataMap = getOrCreateMetadataMap(O, P, false); - return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); -}; -var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { - getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); -}; -var ordinaryOwnMetadataKeys = function (target, targetKey) { - var metadataMap = getOrCreateMetadataMap(target, targetKey, false); - var keys = []; - if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); }); - return keys; -}; -var toMetaKey = function (it) { - return it === undefined || typeof it == 'symbol' ? it : String(it); -}; -var exp = function (O) { - $export($export.S, 'Reflect', O); -}; - -module.exports = { - store: store, - map: getOrCreateMetadataMap, - has: ordinaryHasOwnMetadata, - get: ordinaryGetOwnMetadata, - set: ordinaryDefineOwnMetadata, - keys: ordinaryOwnMetadataKeys, - key: toMetaKey, - exp: exp -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_object-assign.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -// 19.1.2.1 Object.assign(target, source, ...) -var getKeys = __webpack_require__("../../../../core-js/modules/_object-keys.js"); -var gOPS = __webpack_require__("../../../../core-js/modules/_object-gops.js"); -var pIE = __webpack_require__("../../../../core-js/modules/_object-pie.js"); -var toObject = __webpack_require__("../../../../core-js/modules/_to-object.js"); -var IObject = __webpack_require__("../../../../core-js/modules/_iobject.js"); -var $assign = Object.assign; - -// should work with symbols and should have deterministic property order (V8 bug) -module.exports = !$assign || __webpack_require__("../../../../core-js/modules/_fails.js")(function () { - var A = {}; - var B = {}; - // eslint-disable-next-line no-undef - var S = Symbol(); - var K = 'abcdefghijklmnopqrst'; - A[S] = 7; - K.split('').forEach(function (k) { B[k] = k; }); - return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; -}) ? function assign(target, source) { // eslint-disable-line no-unused-vars - var T = toObject(target); - var aLen = arguments.length; - var index = 1; - var getSymbols = gOPS.f; - var isEnum = pIE.f; - while (aLen > index) { - var S = IObject(arguments[index++]); - var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; - } return T; -} : $assign; - - -/***/ }), - -/***/ "../../../../core-js/modules/_object-create.js": -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var dPs = __webpack_require__("../../../../core-js/modules/_object-dps.js"); -var enumBugKeys = __webpack_require__("../../../../core-js/modules/_enum-bug-keys.js"); -var IE_PROTO = __webpack_require__("../../../../core-js/modules/_shared-key.js")('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE = 'prototype'; - -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__("../../../../core-js/modules/_dom-create.js")('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - __webpack_require__("../../../../core-js/modules/_html.js").appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; - return createDict(); -}; - -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : dPs(result, Properties); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_object-dp.js": -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var IE8_DOM_DEFINE = __webpack_require__("../../../../core-js/modules/_ie8-dom-define.js"); -var toPrimitive = __webpack_require__("../../../../core-js/modules/_to-primitive.js"); -var dP = Object.defineProperty; - -exports.f = __webpack_require__("../../../../core-js/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_object-dps.js": -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__("../../../../core-js/modules/_object-dp.js"); -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var getKeys = __webpack_require__("../../../../core-js/modules/_object-keys.js"); - -module.exports = __webpack_require__("../../../../core-js/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = getKeys(Properties); - var length = keys.length; - var i = 0; - var P; - while (length > i) dP.f(O, P = keys[i++], Properties[P]); - return O; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_object-gopd.js": -/***/ (function(module, exports, __webpack_require__) { - -var pIE = __webpack_require__("../../../../core-js/modules/_object-pie.js"); -var createDesc = __webpack_require__("../../../../core-js/modules/_property-desc.js"); -var toIObject = __webpack_require__("../../../../core-js/modules/_to-iobject.js"); -var toPrimitive = __webpack_require__("../../../../core-js/modules/_to-primitive.js"); -var has = __webpack_require__("../../../../core-js/modules/_has.js"); -var IE8_DOM_DEFINE = __webpack_require__("../../../../core-js/modules/_ie8-dom-define.js"); -var gOPD = Object.getOwnPropertyDescriptor; - -exports.f = __webpack_require__("../../../../core-js/modules/_descriptors.js") ? gOPD : function getOwnPropertyDescriptor(O, P) { - O = toIObject(O); - P = toPrimitive(P, true); - if (IE8_DOM_DEFINE) try { - return gOPD(O, P); - } catch (e) { /* empty */ } - if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_object-gops.js": -/***/ (function(module, exports) { - -exports.f = Object.getOwnPropertySymbols; - - -/***/ }), - -/***/ "../../../../core-js/modules/_object-gpo.js": -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__("../../../../core-js/modules/_has.js"); -var toObject = __webpack_require__("../../../../core-js/modules/_to-object.js"); -var IE_PROTO = __webpack_require__("../../../../core-js/modules/_shared-key.js")('IE_PROTO'); -var ObjectProto = Object.prototype; - -module.exports = Object.getPrototypeOf || function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_object-keys-internal.js": -/***/ (function(module, exports, __webpack_require__) { - -var has = __webpack_require__("../../../../core-js/modules/_has.js"); -var toIObject = __webpack_require__("../../../../core-js/modules/_to-iobject.js"); -var arrayIndexOf = __webpack_require__("../../../../core-js/modules/_array-includes.js")(false); -var IE_PROTO = __webpack_require__("../../../../core-js/modules/_shared-key.js")('IE_PROTO'); - -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - return result; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_object-keys.js": -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__("../../../../core-js/modules/_object-keys-internal.js"); -var enumBugKeys = __webpack_require__("../../../../core-js/modules/_enum-bug-keys.js"); - -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_object-pie.js": -/***/ (function(module, exports) { - -exports.f = {}.propertyIsEnumerable; - - -/***/ }), - -/***/ "../../../../core-js/modules/_property-desc.js": -/***/ (function(module, exports) { - -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_redefine-all.js": -/***/ (function(module, exports, __webpack_require__) { - -var redefine = __webpack_require__("../../../../core-js/modules/_redefine.js"); -module.exports = function (target, src, safe) { - for (var key in src) redefine(target, key, src[key], safe); - return target; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_redefine.js": -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__("../../../../core-js/modules/_global.js"); -var hide = __webpack_require__("../../../../core-js/modules/_hide.js"); -var has = __webpack_require__("../../../../core-js/modules/_has.js"); -var SRC = __webpack_require__("../../../../core-js/modules/_uid.js")('src'); -var TO_STRING = 'toString'; -var $toString = Function[TO_STRING]; -var TPL = ('' + $toString).split(TO_STRING); - -__webpack_require__("../../../../core-js/modules/_core.js").inspectSource = function (it) { - return $toString.call(it); -}; - -(module.exports = function (O, key, val, safe) { - var isFunction = typeof val == 'function'; - if (isFunction) has(val, 'name') || hide(val, 'name', key); - if (O[key] === val) return; - if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); - if (O === global) { - O[key] = val; - } else if (!safe) { - delete O[key]; - hide(O, key, val); - } else if (O[key]) { - O[key] = val; - } else { - hide(O, key, val); - } -// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative -})(Function.prototype, TO_STRING, function toString() { - return typeof this == 'function' && this[SRC] || $toString.call(this); -}); - - -/***/ }), - -/***/ "../../../../core-js/modules/_set-proto.js": -/***/ (function(module, exports, __webpack_require__) { - -// Works with __proto__ only. Old v8 can't work with null proto objects. -/* eslint-disable no-proto */ -var isObject = __webpack_require__("../../../../core-js/modules/_is-object.js"); -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var check = function (O, proto) { - anObject(O); - if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); -}; -module.exports = { - set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line - function (test, buggy, set) { - try { - set = __webpack_require__("../../../../core-js/modules/_ctx.js")(Function.call, __webpack_require__("../../../../core-js/modules/_object-gopd.js").f(Object.prototype, '__proto__').set, 2); - set(test, []); - buggy = !(test instanceof Array); - } catch (e) { buggy = true; } - return function setPrototypeOf(O, proto) { - check(O, proto); - if (buggy) O.__proto__ = proto; - else set(O, proto); - return O; - }; - }({}, false) : undefined), - check: check -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_set-species.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var global = __webpack_require__("../../../../core-js/modules/_global.js"); -var dP = __webpack_require__("../../../../core-js/modules/_object-dp.js"); -var DESCRIPTORS = __webpack_require__("../../../../core-js/modules/_descriptors.js"); -var SPECIES = __webpack_require__("../../../../core-js/modules/_wks.js")('species'); - -module.exports = function (KEY) { - var C = global[KEY]; - if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { - configurable: true, - get: function () { return this; } - }); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_set-to-string-tag.js": -/***/ (function(module, exports, __webpack_require__) { - -var def = __webpack_require__("../../../../core-js/modules/_object-dp.js").f; -var has = __webpack_require__("../../../../core-js/modules/_has.js"); -var TAG = __webpack_require__("../../../../core-js/modules/_wks.js")('toStringTag'); - -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_shared-key.js": -/***/ (function(module, exports, __webpack_require__) { - -var shared = __webpack_require__("../../../../core-js/modules/_shared.js")('keys'); -var uid = __webpack_require__("../../../../core-js/modules/_uid.js"); -module.exports = function (key) { - return shared[key] || (shared[key] = uid(key)); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_shared.js": -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__("../../../../core-js/modules/_global.js"); -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); -module.exports = function (key) { - return store[key] || (store[key] = {}); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_to-absolute-index.js": -/***/ (function(module, exports, __webpack_require__) { - -var toInteger = __webpack_require__("../../../../core-js/modules/_to-integer.js"); -var max = Math.max; -var min = Math.min; -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_to-integer.js": -/***/ (function(module, exports) { - -// 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_to-iobject.js": -/***/ (function(module, exports, __webpack_require__) { - -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__("../../../../core-js/modules/_iobject.js"); -var defined = __webpack_require__("../../../../core-js/modules/_defined.js"); -module.exports = function (it) { - return IObject(defined(it)); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_to-length.js": -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.15 ToLength -var toInteger = __webpack_require__("../../../../core-js/modules/_to-integer.js"); -var min = Math.min; -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_to-object.js": -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.13 ToObject(argument) -var defined = __webpack_require__("../../../../core-js/modules/_defined.js"); -module.exports = function (it) { - return Object(defined(it)); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_to-primitive.js": -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__("../../../../core-js/modules/_is-object.js"); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_uid.js": -/***/ (function(module, exports) { - -var id = 0; -var px = Math.random(); -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_validate-collection.js": -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__("../../../../core-js/modules/_is-object.js"); -module.exports = function (it, TYPE) { - if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); - return it; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/_wks.js": -/***/ (function(module, exports, __webpack_require__) { - -var store = __webpack_require__("../../../../core-js/modules/_shared.js")('wks'); -var uid = __webpack_require__("../../../../core-js/modules/_uid.js"); -var Symbol = __webpack_require__("../../../../core-js/modules/_global.js").Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; - -$exports.store = store; - - -/***/ }), - -/***/ "../../../../core-js/modules/core.get-iterator-method.js": -/***/ (function(module, exports, __webpack_require__) { - -var classof = __webpack_require__("../../../../core-js/modules/_classof.js"); -var ITERATOR = __webpack_require__("../../../../core-js/modules/_wks.js")('iterator'); -var Iterators = __webpack_require__("../../../../core-js/modules/_iterators.js"); -module.exports = __webpack_require__("../../../../core-js/modules/_core.js").getIteratorMethod = function (it) { - if (it != undefined) return it[ITERATOR] - || it['@@iterator'] - || Iterators[classof(it)]; -}; - - -/***/ }), - -/***/ "../../../../core-js/modules/es6.map.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var strong = __webpack_require__("../../../../core-js/modules/_collection-strong.js"); -var validate = __webpack_require__("../../../../core-js/modules/_validate-collection.js"); -var MAP = 'Map'; - -// 23.1 Map Objects -module.exports = __webpack_require__("../../../../core-js/modules/_collection.js")(MAP, function (get) { - return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; -}, { - // 23.1.3.6 Map.prototype.get(key) - get: function get(key) { - var entry = strong.getEntry(validate(this, MAP), key); - return entry && entry.v; - }, - // 23.1.3.9 Map.prototype.set(key, value) - set: function set(key, value) { - return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); - } -}, strong, true); - - -/***/ }), - -/***/ "../../../../core-js/modules/es6.set.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var strong = __webpack_require__("../../../../core-js/modules/_collection-strong.js"); -var validate = __webpack_require__("../../../../core-js/modules/_validate-collection.js"); -var SET = 'Set'; - -// 23.2 Set Objects -module.exports = __webpack_require__("../../../../core-js/modules/_collection.js")(SET, function (get) { - return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; -}, { - // 23.2.3.1 Set.prototype.add(value) - add: function add(value) { - return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); - } -}, strong); - - -/***/ }), - -/***/ "../../../../core-js/modules/es6.weak-map.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var each = __webpack_require__("../../../../core-js/modules/_array-methods.js")(0); -var redefine = __webpack_require__("../../../../core-js/modules/_redefine.js"); -var meta = __webpack_require__("../../../../core-js/modules/_meta.js"); -var assign = __webpack_require__("../../../../core-js/modules/_object-assign.js"); -var weak = __webpack_require__("../../../../core-js/modules/_collection-weak.js"); -var isObject = __webpack_require__("../../../../core-js/modules/_is-object.js"); -var fails = __webpack_require__("../../../../core-js/modules/_fails.js"); -var validate = __webpack_require__("../../../../core-js/modules/_validate-collection.js"); -var WEAK_MAP = 'WeakMap'; -var getWeak = meta.getWeak; -var isExtensible = Object.isExtensible; -var uncaughtFrozenStore = weak.ufstore; -var tmp = {}; -var InternalMap; - -var wrapper = function (get) { - return function WeakMap() { - return get(this, arguments.length > 0 ? arguments[0] : undefined); - }; -}; - -var methods = { - // 23.3.3.3 WeakMap.prototype.get(key) - get: function get(key) { - if (isObject(key)) { - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); - return data ? data[this._i] : undefined; - } - }, - // 23.3.3.5 WeakMap.prototype.set(key, value) - set: function set(key, value) { - return weak.def(validate(this, WEAK_MAP), key, value); - } -}; - -// 23.3 WeakMap Objects -var $WeakMap = module.exports = __webpack_require__("../../../../core-js/modules/_collection.js")(WEAK_MAP, wrapper, methods, weak, true, true); - -// IE11 WeakMap frozen keys fix -if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) { - InternalMap = weak.getConstructor(wrapper, WEAK_MAP); - assign(InternalMap.prototype, methods); - meta.NEED = true; - each(['delete', 'has', 'get', 'set'], function (key) { - var proto = $WeakMap.prototype; - var method = proto[key]; - redefine(proto, key, function (a, b) { - // store frozen objects on internal weakmap shim - if (isObject(a) && !isExtensible(a)) { - if (!this._f) this._f = new InternalMap(); - var result = this._f[key](a, b); - return key == 'set' ? this : result; - // store all the rest on native weakmap - } return method.call(this, a, b); - }); - }); -} - - -/***/ }), - -/***/ "../../../../core-js/modules/es7.reflect.define-metadata.js": -/***/ (function(module, exports, __webpack_require__) { - -var metadata = __webpack_require__("../../../../core-js/modules/_metadata.js"); -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var toMetaKey = metadata.key; -var ordinaryDefineOwnMetadata = metadata.set; - -metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { - ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); -} }); - - -/***/ }), - -/***/ "../../../../core-js/modules/es7.reflect.delete-metadata.js": -/***/ (function(module, exports, __webpack_require__) { - -var metadata = __webpack_require__("../../../../core-js/modules/_metadata.js"); -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var toMetaKey = metadata.key; -var getOrCreateMetadataMap = metadata.map; -var store = metadata.store; - -metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { - var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); - var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); - if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; - if (metadataMap.size) return true; - var targetMetadata = store.get(target); - targetMetadata['delete'](targetKey); - return !!targetMetadata.size || store['delete'](target); -} }); - - -/***/ }), - -/***/ "../../../../core-js/modules/es7.reflect.get-metadata-keys.js": -/***/ (function(module, exports, __webpack_require__) { - -var Set = __webpack_require__("../../../../core-js/modules/es6.set.js"); -var from = __webpack_require__("../../../../core-js/modules/_array-from-iterable.js"); -var metadata = __webpack_require__("../../../../core-js/modules/_metadata.js"); -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var getPrototypeOf = __webpack_require__("../../../../core-js/modules/_object-gpo.js"); -var ordinaryOwnMetadataKeys = metadata.keys; -var toMetaKey = metadata.key; - -var ordinaryMetadataKeys = function (O, P) { - var oKeys = ordinaryOwnMetadataKeys(O, P); - var parent = getPrototypeOf(O); - if (parent === null) return oKeys; - var pKeys = ordinaryMetadataKeys(parent, P); - return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; -}; - -metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { - return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); -} }); - - -/***/ }), - -/***/ "../../../../core-js/modules/es7.reflect.get-metadata.js": -/***/ (function(module, exports, __webpack_require__) { - -var metadata = __webpack_require__("../../../../core-js/modules/_metadata.js"); -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var getPrototypeOf = __webpack_require__("../../../../core-js/modules/_object-gpo.js"); -var ordinaryHasOwnMetadata = metadata.has; -var ordinaryGetOwnMetadata = metadata.get; -var toMetaKey = metadata.key; - -var ordinaryGetMetadata = function (MetadataKey, O, P) { - var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); - if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); - var parent = getPrototypeOf(O); - return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; -}; - -metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { - return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); -} }); - - -/***/ }), - -/***/ "../../../../core-js/modules/es7.reflect.get-own-metadata-keys.js": -/***/ (function(module, exports, __webpack_require__) { - -var metadata = __webpack_require__("../../../../core-js/modules/_metadata.js"); -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var ordinaryOwnMetadataKeys = metadata.keys; -var toMetaKey = metadata.key; - -metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { - return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); -} }); - - -/***/ }), - -/***/ "../../../../core-js/modules/es7.reflect.get-own-metadata.js": -/***/ (function(module, exports, __webpack_require__) { - -var metadata = __webpack_require__("../../../../core-js/modules/_metadata.js"); -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var ordinaryGetOwnMetadata = metadata.get; -var toMetaKey = metadata.key; - -metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { - return ordinaryGetOwnMetadata(metadataKey, anObject(target) - , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); -} }); - - -/***/ }), - -/***/ "../../../../core-js/modules/es7.reflect.has-metadata.js": -/***/ (function(module, exports, __webpack_require__) { - -var metadata = __webpack_require__("../../../../core-js/modules/_metadata.js"); -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var getPrototypeOf = __webpack_require__("../../../../core-js/modules/_object-gpo.js"); -var ordinaryHasOwnMetadata = metadata.has; -var toMetaKey = metadata.key; - -var ordinaryHasMetadata = function (MetadataKey, O, P) { - var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); - if (hasOwn) return true; - var parent = getPrototypeOf(O); - return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; -}; - -metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { - return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); -} }); - - -/***/ }), - -/***/ "../../../../core-js/modules/es7.reflect.has-own-metadata.js": -/***/ (function(module, exports, __webpack_require__) { - -var metadata = __webpack_require__("../../../../core-js/modules/_metadata.js"); -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var ordinaryHasOwnMetadata = metadata.has; -var toMetaKey = metadata.key; - -metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { - return ordinaryHasOwnMetadata(metadataKey, anObject(target) - , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); -} }); - - -/***/ }), - -/***/ "../../../../core-js/modules/es7.reflect.metadata.js": -/***/ (function(module, exports, __webpack_require__) { - -var $metadata = __webpack_require__("../../../../core-js/modules/_metadata.js"); -var anObject = __webpack_require__("../../../../core-js/modules/_an-object.js"); -var aFunction = __webpack_require__("../../../../core-js/modules/_a-function.js"); -var toMetaKey = $metadata.key; -var ordinaryDefineOwnMetadata = $metadata.set; - -$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) { - return function decorator(target, targetKey) { - ordinaryDefineOwnMetadata( - metadataKey, metadataValue, - (targetKey !== undefined ? anObject : aFunction)(target), - toMetaKey(targetKey) - ); - }; -} }); - - -/***/ }), - -/***/ "../../../../webpack/buildin/global.js": -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), - -/***/ "../../../../zone.js/dist/zone.js": -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(global) {/** -* @license -* Copyright Google Inc. All Rights Reserved. -* -* Use of this source code is governed by an MIT-style license that can be -* found in the LICENSE file at https://angular.io/license -*/ -(function (global, factory) { - true ? factory() : - typeof define === 'function' && define.amd ? define(factory) : - (factory()); -}(this, (function () { 'use strict'; - -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var Zone$1 = (function (global) { - var FUNCTION = 'function'; - var performance = global['performance']; - function mark(name) { - performance && performance['mark'] && performance['mark'](name); - } - function performanceMeasure(name, label) { - performance && performance['measure'] && performance['measure'](name, label); - } - mark('Zone'); - if (global['Zone']) { - throw new Error('Zone already loaded.'); - } - var Zone = /** @class */ (function () { - function Zone(parent, zoneSpec) { - this._properties = null; - this._parent = parent; - this._name = zoneSpec ? zoneSpec.name || 'unnamed' : ''; - this._properties = zoneSpec && zoneSpec.properties || {}; - this._zoneDelegate = - new ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec); - } - Zone.assertZonePatched = function () { - if (global['Promise'] !== patches['ZoneAwarePromise']) { - throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' + - 'has been overwritten.\n' + - 'Most likely cause is that a Promise polyfill has been loaded ' + - 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' + - 'If you must load one, do so before loading zone.js.)'); - } - }; - Object.defineProperty(Zone, "root", { - get: function () { - var zone = Zone.current; - while (zone.parent) { - zone = zone.parent; - } - return zone; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Zone, "current", { - get: function () { - return _currentZoneFrame.zone; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Zone, "currentTask", { - get: function () { - return _currentTask; - }, - enumerable: true, - configurable: true - }); - Zone.__load_patch = function (name, fn) { - if (patches.hasOwnProperty(name)) { - throw Error('Already loaded patch: ' + name); - } - else if (!global['__Zone_disable_' + name]) { - var perfName = 'Zone:' + name; - mark(perfName); - patches[name] = fn(global, Zone, _api); - performanceMeasure(perfName, perfName); - } - }; - Object.defineProperty(Zone.prototype, "parent", { - get: function () { - return this._parent; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Zone.prototype, "name", { - get: function () { - return this._name; - }, - enumerable: true, - configurable: true - }); - Zone.prototype.get = function (key) { - var zone = this.getZoneWith(key); - if (zone) - return zone._properties[key]; - }; - Zone.prototype.getZoneWith = function (key) { - var current = this; - while (current) { - if (current._properties.hasOwnProperty(key)) { - return current; - } - current = current._parent; - } - return null; - }; - Zone.prototype.fork = function (zoneSpec) { - if (!zoneSpec) - throw new Error('ZoneSpec required!'); - return this._zoneDelegate.fork(this, zoneSpec); - }; - Zone.prototype.wrap = function (callback, source) { - if (typeof callback !== FUNCTION) { - throw new Error('Expecting function got: ' + callback); - } - var _callback = this._zoneDelegate.intercept(this, callback, source); - var zone = this; - return function () { - return zone.runGuarded(_callback, this, arguments, source); - }; - }; - Zone.prototype.run = function (callback, applyThis, applyArgs, source) { - if (applyThis === void 0) { applyThis = undefined; } - if (applyArgs === void 0) { applyArgs = null; } - if (source === void 0) { source = null; } - _currentZoneFrame = { parent: _currentZoneFrame, zone: this }; - try { - return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source); - } - finally { - _currentZoneFrame = _currentZoneFrame.parent; - } - }; - Zone.prototype.runGuarded = function (callback, applyThis, applyArgs, source) { - if (applyThis === void 0) { applyThis = null; } - if (applyArgs === void 0) { applyArgs = null; } - if (source === void 0) { source = null; } - _currentZoneFrame = { parent: _currentZoneFrame, zone: this }; - try { - try { - return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source); - } - catch (error) { - if (this._zoneDelegate.handleError(this, error)) { - throw error; - } - } - } - finally { - _currentZoneFrame = _currentZoneFrame.parent; - } - }; - Zone.prototype.runTask = function (task, applyThis, applyArgs) { - if (task.zone != this) { - throw new Error('A task can only be run in the zone of creation! (Creation: ' + - (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')'); - } - // https://github.com/angular/zone.js/issues/778, sometimes eventTask - // will run in notScheduled(canceled) state, we should not try to - // run such kind of task but just return - // we have to define an variable here, if not - // typescript compiler will complain below - var isNotScheduled = task.state === notScheduled; - if (isNotScheduled && task.type === eventTask) { - return; - } - var reEntryGuard = task.state != running; - reEntryGuard && task._transitionTo(running, scheduled); - task.runCount++; - var previousTask = _currentTask; - _currentTask = task; - _currentZoneFrame = { parent: _currentZoneFrame, zone: this }; - try { - if (task.type == macroTask && task.data && !task.data.isPeriodic) { - task.cancelFn = null; - } - try { - return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs); - } - catch (error) { - if (this._zoneDelegate.handleError(this, error)) { - throw error; - } - } - } - finally { - // if the task's state is notScheduled or unknown, then it has already been cancelled - // we should not reset the state to scheduled - if (task.state !== notScheduled && task.state !== unknown) { - if (task.type == eventTask || (task.data && task.data.isPeriodic)) { - reEntryGuard && task._transitionTo(scheduled, running); - } - else { - task.runCount = 0; - this._updateTaskCount(task, -1); - reEntryGuard && - task._transitionTo(notScheduled, running, notScheduled); - } - } - _currentZoneFrame = _currentZoneFrame.parent; - _currentTask = previousTask; - } - }; - Zone.prototype.scheduleTask = function (task) { - if (task.zone && task.zone !== this) { - // check if the task was rescheduled, the newZone - // should not be the children of the original zone - var newZone = this; - while (newZone) { - if (newZone === task.zone) { - throw Error("can not reschedule task to " + this - .name + " which is descendants of the original zone " + task.zone.name); - } - newZone = newZone.parent; - } - } - task._transitionTo(scheduling, notScheduled); - var zoneDelegates = []; - task._zoneDelegates = zoneDelegates; - task._zone = this; - try { - task = this._zoneDelegate.scheduleTask(this, task); - } - catch (err) { - // should set task's state to unknown when scheduleTask throw error - // because the err may from reschedule, so the fromState maybe notScheduled - task._transitionTo(unknown, scheduling, notScheduled); - // TODO: @JiaLiPassion, should we check the result from handleError? - this._zoneDelegate.handleError(this, err); - throw err; - } - if (task._zoneDelegates === zoneDelegates) { - // we have to check because internally the delegate can reschedule the task. - this._updateTaskCount(task, 1); - } - if (task.state == scheduling) { - task._transitionTo(scheduled, scheduling); - } - return task; - }; - Zone.prototype.scheduleMicroTask = function (source, callback, data, customSchedule) { - return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, null)); - }; - Zone.prototype.scheduleMacroTask = function (source, callback, data, customSchedule, customCancel) { - return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel)); - }; - Zone.prototype.scheduleEventTask = function (source, callback, data, customSchedule, customCancel) { - return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel)); - }; - Zone.prototype.cancelTask = function (task) { - if (task.zone != this) - throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' + - (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')'); - task._transitionTo(canceling, scheduled, running); - try { - this._zoneDelegate.cancelTask(this, task); - } - catch (err) { - // if error occurs when cancelTask, transit the state to unknown - task._transitionTo(unknown, canceling); - this._zoneDelegate.handleError(this, err); - throw err; - } - this._updateTaskCount(task, -1); - task._transitionTo(notScheduled, canceling); - task.runCount = 0; - return task; - }; - Zone.prototype._updateTaskCount = function (task, count) { - var zoneDelegates = task._zoneDelegates; - if (count == -1) { - task._zoneDelegates = null; - } - for (var i = 0; i < zoneDelegates.length; i++) { - zoneDelegates[i]._updateTaskCount(task.type, count); - } - }; - Zone.__symbol__ = __symbol__; - return Zone; - }()); - var DELEGATE_ZS = { - name: '', - onHasTask: function (delegate, _, target, hasTaskState) { - return delegate.hasTask(target, hasTaskState); - }, - onScheduleTask: function (delegate, _, target, task) { - return delegate.scheduleTask(target, task); - }, - onInvokeTask: function (delegate, _, target, task, applyThis, applyArgs) { return delegate.invokeTask(target, task, applyThis, applyArgs); }, - onCancelTask: function (delegate, _, target, task) { - return delegate.cancelTask(target, task); - } - }; - var ZoneDelegate = /** @class */ (function () { - function ZoneDelegate(zone, parentDelegate, zoneSpec) { - this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 }; - this.zone = zone; - this._parentDelegate = parentDelegate; - this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS); - this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt); - this._forkCurrZone = zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate.zone); - this._interceptZS = - zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS); - this._interceptDlgt = - zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt); - this._interceptCurrZone = - zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate.zone); - this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS); - this._invokeDlgt = - zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt); - this._invokeCurrZone = zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate.zone); - this._handleErrorZS = - zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS); - this._handleErrorDlgt = - zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt); - this._handleErrorCurrZone = - zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate.zone); - this._scheduleTaskZS = - zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS); - this._scheduleTaskDlgt = - zoneSpec && (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt); - this._scheduleTaskCurrZone = - zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate.zone); - this._invokeTaskZS = - zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS); - this._invokeTaskDlgt = - zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt); - this._invokeTaskCurrZone = - zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate.zone); - this._cancelTaskZS = - zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS); - this._cancelTaskDlgt = - zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt); - this._cancelTaskCurrZone = - zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate.zone); - this._hasTaskZS = null; - this._hasTaskDlgt = null; - this._hasTaskDlgtOwner = null; - this._hasTaskCurrZone = null; - var zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask; - var parentHasTask = parentDelegate && parentDelegate._hasTaskZS; - if (zoneSpecHasTask || parentHasTask) { - // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such - // a case all task related interceptors must go through this ZD. We can't short circuit it. - this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS; - this._hasTaskDlgt = parentDelegate; - this._hasTaskDlgtOwner = this; - this._hasTaskCurrZone = zone; - if (!zoneSpec.onScheduleTask) { - this._scheduleTaskZS = DELEGATE_ZS; - this._scheduleTaskDlgt = parentDelegate; - this._scheduleTaskCurrZone = this.zone; - } - if (!zoneSpec.onInvokeTask) { - this._invokeTaskZS = DELEGATE_ZS; - this._invokeTaskDlgt = parentDelegate; - this._invokeTaskCurrZone = this.zone; - } - if (!zoneSpec.onCancelTask) { - this._cancelTaskZS = DELEGATE_ZS; - this._cancelTaskDlgt = parentDelegate; - this._cancelTaskCurrZone = this.zone; - } - } - } - ZoneDelegate.prototype.fork = function (targetZone, zoneSpec) { - return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) : - new Zone(targetZone, zoneSpec); - }; - ZoneDelegate.prototype.intercept = function (targetZone, callback, source) { - return this._interceptZS ? - this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) : - callback; - }; - ZoneDelegate.prototype.invoke = function (targetZone, callback, applyThis, applyArgs, source) { - return this._invokeZS ? - this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) : - callback.apply(applyThis, applyArgs); - }; - ZoneDelegate.prototype.handleError = function (targetZone, error) { - return this._handleErrorZS ? - this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) : - true; - }; - ZoneDelegate.prototype.scheduleTask = function (targetZone, task) { - var returnTask = task; - if (this._scheduleTaskZS) { - if (this._hasTaskZS) { - returnTask._zoneDelegates.push(this._hasTaskDlgtOwner); - } - returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task); - if (!returnTask) - returnTask = task; - } - else { - if (task.scheduleFn) { - task.scheduleFn(task); - } - else if (task.type == microTask) { - scheduleMicroTask(task); - } - else { - throw new Error('Task is missing scheduleFn.'); - } - } - return returnTask; - }; - ZoneDelegate.prototype.invokeTask = function (targetZone, task, applyThis, applyArgs) { - return this._invokeTaskZS ? - this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) : - task.callback.apply(applyThis, applyArgs); - }; - ZoneDelegate.prototype.cancelTask = function (targetZone, task) { - var value; - if (this._cancelTaskZS) { - value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task); - } - else { - if (!task.cancelFn) { - throw Error('Task is not cancelable'); - } - value = task.cancelFn(task); - } - return value; - }; - ZoneDelegate.prototype.hasTask = function (targetZone, isEmpty) { - // hasTask should not throw error so other ZoneDelegate - // can still trigger hasTask callback - try { - return this._hasTaskZS && - this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty); - } - catch (err) { - this.handleError(targetZone, err); - } - }; - ZoneDelegate.prototype._updateTaskCount = function (type, count) { - var counts = this._taskCounts; - var prev = counts[type]; - var next = counts[type] = prev + count; - if (next < 0) { - throw new Error('More tasks executed then were scheduled.'); - } - if (prev == 0 || next == 0) { - var isEmpty = { - microTask: counts['microTask'] > 0, - macroTask: counts['macroTask'] > 0, - eventTask: counts['eventTask'] > 0, - change: type - }; - this.hasTask(this.zone, isEmpty); - } - }; - return ZoneDelegate; - }()); - var ZoneTask = /** @class */ (function () { - function ZoneTask(type, source, callback, options, scheduleFn, cancelFn) { - this._zone = null; - this.runCount = 0; - this._zoneDelegates = null; - this._state = 'notScheduled'; - this.type = type; - this.source = source; - this.data = options; - this.scheduleFn = scheduleFn; - this.cancelFn = cancelFn; - this.callback = callback; - var self = this; - // TODO: @JiaLiPassion options should have interface - if (type === eventTask && options && options.useG) { - this.invoke = ZoneTask.invokeTask; - } - else { - this.invoke = function () { - return ZoneTask.invokeTask.call(global, self, this, arguments); - }; - } - } - ZoneTask.invokeTask = function (task, target, args) { - if (!task) { - task = this; - } - _numberOfNestedTaskFrames++; - try { - task.runCount++; - return task.zone.runTask(task, target, args); - } - finally { - if (_numberOfNestedTaskFrames == 1) { - drainMicroTaskQueue(); - } - _numberOfNestedTaskFrames--; - } - }; - Object.defineProperty(ZoneTask.prototype, "zone", { - get: function () { - return this._zone; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ZoneTask.prototype, "state", { - get: function () { - return this._state; - }, - enumerable: true, - configurable: true - }); - ZoneTask.prototype.cancelScheduleRequest = function () { - this._transitionTo(notScheduled, scheduling); - }; - ZoneTask.prototype._transitionTo = function (toState, fromState1, fromState2) { - if (this._state === fromState1 || this._state === fromState2) { - this._state = toState; - if (toState == notScheduled) { - this._zoneDelegates = null; - } - } - else { - throw new Error(this.type + " '" + this.source + "': can not transition to '" + toState + "', expecting state '" + fromState1 + "'" + (fromState2 ? - ' or \'' + fromState2 + '\'' : - '') + ", was '" + this._state + "'."); - } - }; - ZoneTask.prototype.toString = function () { - if (this.data && typeof this.data.handleId !== 'undefined') { - return this.data.handleId; - } - else { - return Object.prototype.toString.call(this); - } - }; - // add toJSON method to prevent cyclic error when - // call JSON.stringify(zoneTask) - ZoneTask.prototype.toJSON = function () { - return { - type: this.type, - state: this.state, - source: this.source, - zone: this.zone.name, - runCount: this.runCount - }; - }; - return ZoneTask; - }()); - ////////////////////////////////////////////////////// - ////////////////////////////////////////////////////// - /// MICROTASK QUEUE - ////////////////////////////////////////////////////// - ////////////////////////////////////////////////////// - var symbolSetTimeout = __symbol__('setTimeout'); - var symbolPromise = __symbol__('Promise'); - var symbolThen = __symbol__('then'); - var _microTaskQueue = []; - var _isDrainingMicrotaskQueue = false; - var nativeMicroTaskQueuePromise; - function scheduleMicroTask(task) { - // if we are not running in any task, and there has not been anything scheduled - // we must bootstrap the initial task creation by manually scheduling the drain - if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) { - // We are not running in Task, so we need to kickstart the microtask queue. - if (!nativeMicroTaskQueuePromise) { - if (global[symbolPromise]) { - nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0); - } - } - if (nativeMicroTaskQueuePromise) { - nativeMicroTaskQueuePromise[symbolThen](drainMicroTaskQueue); - } - else { - global[symbolSetTimeout](drainMicroTaskQueue, 0); - } - } - task && _microTaskQueue.push(task); - } - function drainMicroTaskQueue() { - if (!_isDrainingMicrotaskQueue) { - _isDrainingMicrotaskQueue = true; - while (_microTaskQueue.length) { - var queue = _microTaskQueue; - _microTaskQueue = []; - for (var i = 0; i < queue.length; i++) { - var task = queue[i]; - try { - task.zone.runTask(task, null, null); - } - catch (error) { - _api.onUnhandledError(error); - } - } - } - _api.microtaskDrainDone(); - _isDrainingMicrotaskQueue = false; - } - } - ////////////////////////////////////////////////////// - ////////////////////////////////////////////////////// - /// BOOTSTRAP - ////////////////////////////////////////////////////// - ////////////////////////////////////////////////////// - var NO_ZONE = { name: 'NO ZONE' }; - var notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown'; - var microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask'; - var patches = {}; - var _api = { - symbol: __symbol__, - currentZoneFrame: function () { return _currentZoneFrame; }, - onUnhandledError: noop, - microtaskDrainDone: noop, - scheduleMicroTask: scheduleMicroTask, - showUncaughtError: function () { return !Zone[__symbol__('ignoreConsoleErrorUncaughtError')]; }, - patchEventTarget: function () { return []; }, - patchOnProperties: noop, - patchMethod: function () { return noop; }, - bindArguments: function () { return null; }, - setNativePromise: function (NativePromise) { - // sometimes NativePromise.resolve static function - // is not ready yet, (such as core-js/es6.promise) - // so we need to check here. - if (NativePromise && typeof NativePromise.resolve === FUNCTION) { - nativeMicroTaskQueuePromise = NativePromise.resolve(0); - } - }, - }; - var _currentZoneFrame = { parent: null, zone: new Zone(null, null) }; - var _currentTask = null; - var _numberOfNestedTaskFrames = 0; - function noop() { } - function __symbol__(name) { - return '__zone_symbol__' + name; - } - performanceMeasure('Zone', 'Zone'); - return global['Zone'] = Zone; -})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global); - -Zone.__load_patch('ZoneAwarePromise', function (global, Zone, api) { - var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - var ObjectDefineProperty = Object.defineProperty; - function readableObjectToString(obj) { - if (obj && obj.toString === Object.prototype.toString) { - var className = obj.constructor && obj.constructor.name; - return (className ? className : '') + ': ' + JSON.stringify(obj); - } - return obj ? obj.toString() : Object.prototype.toString.call(obj); - } - var __symbol__ = api.symbol; - var _uncaughtPromiseErrors = []; - var symbolPromise = __symbol__('Promise'); - var symbolThen = __symbol__('then'); - var creationTrace = '__creationTrace__'; - api.onUnhandledError = function (e) { - if (api.showUncaughtError()) { - var rejection = e && e.rejection; - if (rejection) { - console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined); - } - else { - console.error(e); - } - } - }; - api.microtaskDrainDone = function () { - while (_uncaughtPromiseErrors.length) { - var _loop_1 = function () { - var uncaughtPromiseError = _uncaughtPromiseErrors.shift(); - try { - uncaughtPromiseError.zone.runGuarded(function () { - throw uncaughtPromiseError; - }); - } - catch (error) { - handleUnhandledRejection(error); - } - }; - while (_uncaughtPromiseErrors.length) { - _loop_1(); - } - } - }; - var UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler'); - function handleUnhandledRejection(e) { - api.onUnhandledError(e); - try { - var handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL]; - if (handler && typeof handler === 'function') { - handler.call(this, e); - } - } - catch (err) { - } - } - function isThenable(value) { - return value && value.then; - } - function forwardResolution(value) { - return value; - } - function forwardRejection(rejection) { - return ZoneAwarePromise.reject(rejection); - } - var symbolState = __symbol__('state'); - var symbolValue = __symbol__('value'); - var symbolFinally = __symbol__('finally'); - var symbolParentPromiseValue = __symbol__('parentPromiseValue'); - var symbolParentPromiseState = __symbol__('parentPromiseState'); - var source = 'Promise.then'; - var UNRESOLVED = null; - var RESOLVED = true; - var REJECTED = false; - var REJECTED_NO_CATCH = 0; - function makeResolver(promise, state) { - return function (v) { - try { - resolvePromise(promise, state, v); - } - catch (err) { - resolvePromise(promise, false, err); - } - // Do not return value or you will break the Promise spec. - }; - } - var once = function () { - var wasCalled = false; - return function wrapper(wrappedFunction) { - return function () { - if (wasCalled) { - return; - } - wasCalled = true; - wrappedFunction.apply(null, arguments); - }; - }; - }; - var TYPE_ERROR = 'Promise resolved with itself'; - var CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace'); - // Promise Resolution - function resolvePromise(promise, state, value) { - var onceWrapper = once(); - if (promise === value) { - throw new TypeError(TYPE_ERROR); - } - if (promise[symbolState] === UNRESOLVED) { - // should only get value.then once based on promise spec. - var then = null; - try { - if (typeof value === 'object' || typeof value === 'function') { - then = value && value.then; - } - } - catch (err) { - onceWrapper(function () { - resolvePromise(promise, false, err); - })(); - return promise; - } - // if (value instanceof ZoneAwarePromise) { - if (state !== REJECTED && value instanceof ZoneAwarePromise && - value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) && - value[symbolState] !== UNRESOLVED) { - clearRejectedNoCatch(value); - resolvePromise(promise, value[symbolState], value[symbolValue]); - } - else if (state !== REJECTED && typeof then === 'function') { - try { - then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false))); - } - catch (err) { - onceWrapper(function () { - resolvePromise(promise, false, err); - })(); - } - } - else { - promise[symbolState] = state; - var queue = promise[symbolValue]; - promise[symbolValue] = value; - if (promise[symbolFinally] === symbolFinally) { - // the promise is generated by Promise.prototype.finally - if (state === RESOLVED) { - // the state is resolved, should ignore the value - // and use parent promise value - promise[symbolState] = promise[symbolParentPromiseState]; - promise[symbolValue] = promise[symbolParentPromiseValue]; - } - } - // record task information in value when error occurs, so we can - // do some additional work such as render longStackTrace - if (state === REJECTED && value instanceof Error) { - // check if longStackTraceZone is here - var trace = Zone.currentTask && Zone.currentTask.data && - Zone.currentTask.data[creationTrace]; - if (trace) { - // only keep the long stack trace into error when in longStackTraceZone - ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace }); - } - } - for (var i = 0; i < queue.length;) { - scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]); - } - if (queue.length == 0 && state == REJECTED) { - promise[symbolState] = REJECTED_NO_CATCH; - try { - // try to print more readable error log - throw new Error('Uncaught (in promise): ' + readableObjectToString(value) + - (value && value.stack ? '\n' + value.stack : '')); - } - catch (err) { - var error_1 = err; - error_1.rejection = value; - error_1.promise = promise; - error_1.zone = Zone.current; - error_1.task = Zone.currentTask; - _uncaughtPromiseErrors.push(error_1); - api.scheduleMicroTask(); // to make sure that it is running - } - } - } - } - // Resolving an already resolved promise is a noop. - return promise; - } - var REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler'); - function clearRejectedNoCatch(promise) { - if (promise[symbolState] === REJECTED_NO_CATCH) { - // if the promise is rejected no catch status - // and queue.length > 0, means there is a error handler - // here to handle the rejected promise, we should trigger - // windows.rejectionhandled eventHandler or nodejs rejectionHandled - // eventHandler - try { - var handler = Zone[REJECTION_HANDLED_HANDLER]; - if (handler && typeof handler === 'function') { - handler.call(this, { rejection: promise[symbolValue], promise: promise }); - } - } - catch (err) { - } - promise[symbolState] = REJECTED; - for (var i = 0; i < _uncaughtPromiseErrors.length; i++) { - if (promise === _uncaughtPromiseErrors[i].promise) { - _uncaughtPromiseErrors.splice(i, 1); - } - } - } - } - function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) { - clearRejectedNoCatch(promise); - var promiseState = promise[symbolState]; - var delegate = promiseState ? - (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution : - (typeof onRejected === 'function') ? onRejected : forwardRejection; - zone.scheduleMicroTask(source, function () { - try { - var parentPromiseValue = promise[symbolValue]; - var isFinallyPromise = chainPromise && symbolFinally === chainPromise[symbolFinally]; - if (isFinallyPromise) { - // if the promise is generated from finally call, keep parent promise's state and value - chainPromise[symbolParentPromiseValue] = parentPromiseValue; - chainPromise[symbolParentPromiseState] = promiseState; - } - // should not pass value to finally callback - var value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ? [] : [parentPromiseValue]); - resolvePromise(chainPromise, true, value); - } - catch (error) { - // if error occurs, should always return this error - resolvePromise(chainPromise, false, error); - } - }, chainPromise); - } - var ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }'; - var ZoneAwarePromise = /** @class */ (function () { - function ZoneAwarePromise(executor) { - var promise = this; - if (!(promise instanceof ZoneAwarePromise)) { - throw new Error('Must be an instanceof Promise.'); - } - promise[symbolState] = UNRESOLVED; - promise[symbolValue] = []; // queue; - try { - executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED)); - } - catch (error) { - resolvePromise(promise, false, error); - } - } - ZoneAwarePromise.toString = function () { - return ZONE_AWARE_PROMISE_TO_STRING; - }; - ZoneAwarePromise.resolve = function (value) { - return resolvePromise(new this(null), RESOLVED, value); - }; - ZoneAwarePromise.reject = function (error) { - return resolvePromise(new this(null), REJECTED, error); - }; - ZoneAwarePromise.race = function (values) { - var resolve; - var reject; - var promise = new this(function (res, rej) { - resolve = res; - reject = rej; - }); - function onResolve(value) { - promise && (promise = null || resolve(value)); - } - function onReject(error) { - promise && (promise = null || reject(error)); - } - for (var _i = 0, values_1 = values; _i < values_1.length; _i++) { - var value = values_1[_i]; - if (!isThenable(value)) { - value = this.resolve(value); - } - value.then(onResolve, onReject); - } - return promise; - }; - ZoneAwarePromise.all = function (values) { - var resolve; - var reject; - var promise = new this(function (res, rej) { - resolve = res; - reject = rej; - }); - var count = 0; - var resolvedValues = []; - for (var _i = 0, values_2 = values; _i < values_2.length; _i++) { - var value = values_2[_i]; - if (!isThenable(value)) { - value = this.resolve(value); - } - value.then((function (index) { return function (value) { - resolvedValues[index] = value; - count--; - if (!count) { - resolve(resolvedValues); - } - }; })(count), reject); - count++; - } - if (!count) - resolve(resolvedValues); - return promise; - }; - ZoneAwarePromise.prototype.then = function (onFulfilled, onRejected) { - var chainPromise = new this.constructor(null); - var zone = Zone.current; - if (this[symbolState] == UNRESOLVED) { - this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected); - } - else { - scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected); - } - return chainPromise; - }; - ZoneAwarePromise.prototype.catch = function (onRejected) { - return this.then(null, onRejected); - }; - ZoneAwarePromise.prototype.finally = function (onFinally) { - var chainPromise = new this.constructor(null); - chainPromise[symbolFinally] = symbolFinally; - var zone = Zone.current; - if (this[symbolState] == UNRESOLVED) { - this[symbolValue].push(zone, chainPromise, onFinally, onFinally); - } - else { - scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally); - } - return chainPromise; - }; - return ZoneAwarePromise; - }()); - // Protect against aggressive optimizers dropping seemingly unused properties. - // E.g. Closure Compiler in advanced mode. - ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve; - ZoneAwarePromise['reject'] = ZoneAwarePromise.reject; - ZoneAwarePromise['race'] = ZoneAwarePromise.race; - ZoneAwarePromise['all'] = ZoneAwarePromise.all; - var NativePromise = global[symbolPromise] = global['Promise']; - var ZONE_AWARE_PROMISE = Zone.__symbol__('ZoneAwarePromise'); - var desc = ObjectGetOwnPropertyDescriptor(global, 'Promise'); - if (!desc || desc.configurable) { - desc && delete desc.writable; - desc && delete desc.value; - if (!desc) { - desc = { configurable: true, enumerable: true }; - } - desc.get = function () { - // if we already set ZoneAwarePromise, use patched one - // otherwise return native one. - return global[ZONE_AWARE_PROMISE] ? global[ZONE_AWARE_PROMISE] : global[symbolPromise]; - }; - desc.set = function (NewNativePromise) { - if (NewNativePromise === ZoneAwarePromise) { - // if the NewNativePromise is ZoneAwarePromise - // save to global - global[ZONE_AWARE_PROMISE] = NewNativePromise; - } - else { - // if the NewNativePromise is not ZoneAwarePromise - // for example: after load zone.js, some library just - // set es6-promise to global, if we set it to global - // directly, assertZonePatched will fail and angular - // will not loaded, so we just set the NewNativePromise - // to global[symbolPromise], so the result is just like - // we load ES6 Promise before zone.js - global[symbolPromise] = NewNativePromise; - if (!NewNativePromise.prototype[symbolThen]) { - patchThen(NewNativePromise); - } - api.setNativePromise(NewNativePromise); - } - }; - ObjectDefineProperty(global, 'Promise', desc); - } - global['Promise'] = ZoneAwarePromise; - var symbolThenPatched = __symbol__('thenPatched'); - function patchThen(Ctor) { - var proto = Ctor.prototype; - var prop = ObjectGetOwnPropertyDescriptor(proto, 'then'); - if (prop && (prop.writable === false || !prop.configurable)) { - // check Ctor.prototype.then propertyDescriptor is writable or not - // in meteor env, writable is false, we should ignore such case - return; - } - var originalThen = proto.then; - // Keep a reference to the original method. - proto[symbolThen] = originalThen; - Ctor.prototype.then = function (onResolve, onReject) { - var _this = this; - var wrapped = new ZoneAwarePromise(function (resolve, reject) { - originalThen.call(_this, resolve, reject); - }); - return wrapped.then(onResolve, onReject); - }; - Ctor[symbolThenPatched] = true; - } - function zoneify(fn) { - return function () { - var resultPromise = fn.apply(this, arguments); - if (resultPromise instanceof ZoneAwarePromise) { - return resultPromise; - } - var ctor = resultPromise.constructor; - if (!ctor[symbolThenPatched]) { - patchThen(ctor); - } - return resultPromise; - }; - } - if (NativePromise) { - patchThen(NativePromise); - var fetch_1 = global['fetch']; - if (typeof fetch_1 == 'function') { - global['fetch'] = zoneify(fetch_1); - } - } - // This is not part of public API, but it is useful for tests, so we expose it. - Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors; - return ZoneAwarePromise; -}); - -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * Suppress closure compiler errors about unknown 'Zone' variable - * @fileoverview - * @suppress {undefinedVars,globalThis,missingRequire} - */ -// issue #989, to reduce bundle size, use short name -/** Object.getOwnPropertyDescriptor */ -var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; -/** Object.defineProperty */ -var ObjectDefineProperty = Object.defineProperty; -/** Object.getPrototypeOf */ -var ObjectGetPrototypeOf = Object.getPrototypeOf; -/** Object.create */ -var ObjectCreate = Object.create; -/** Array.prototype.slice */ -var ArraySlice = Array.prototype.slice; -/** addEventListener string const */ -var ADD_EVENT_LISTENER_STR = 'addEventListener'; -/** removeEventListener string const */ -var REMOVE_EVENT_LISTENER_STR = 'removeEventListener'; -/** zoneSymbol addEventListener */ -var ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR); -/** zoneSymbol removeEventListener */ -var ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR); -/** true string const */ -var TRUE_STR = 'true'; -/** false string const */ -var FALSE_STR = 'false'; -/** __zone_symbol__ string const */ -var ZONE_SYMBOL_PREFIX = '__zone_symbol__'; -function wrapWithCurrentZone(callback, source) { - return Zone.current.wrap(callback, source); -} -function scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) { - return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel); -} -var zoneSymbol = Zone.__symbol__; -var isWindowExists = typeof window !== 'undefined'; -var internalWindow = isWindowExists ? window : undefined; -var _global = isWindowExists && internalWindow || typeof self === 'object' && self || global; -var REMOVE_ATTRIBUTE = 'removeAttribute'; -var NULL_ON_PROP_VALUE = [null]; -function bindArguments(args, source) { - for (var i = args.length - 1; i >= 0; i--) { - if (typeof args[i] === 'function') { - args[i] = wrapWithCurrentZone(args[i], source + '_' + i); - } - } - return args; -} -function patchPrototype(prototype, fnNames) { - var source = prototype.constructor['name']; - var _loop_1 = function (i) { - var name_1 = fnNames[i]; - var delegate = prototype[name_1]; - if (delegate) { - var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name_1); - if (!isPropertyWritable(prototypeDesc)) { - return "continue"; - } - prototype[name_1] = (function (delegate) { - var patched = function () { - return delegate.apply(this, bindArguments(arguments, source + '.' + name_1)); - }; - attachOriginToPatched(patched, delegate); - return patched; - })(delegate); - } - }; - for (var i = 0; i < fnNames.length; i++) { - _loop_1(i); - } -} -function isPropertyWritable(propertyDesc) { - if (!propertyDesc) { - return true; - } - if (propertyDesc.writable === false) { - return false; - } - return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined'); -} -var isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope); -// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify -// this code. -var isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' && - {}.toString.call(_global.process) === '[object process]'); -var isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']); -// we are in electron of nw, so we are both browser and nodejs -// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify -// this code. -var isMix = typeof _global.process !== 'undefined' && - {}.toString.call(_global.process) === '[object process]' && !isWebWorker && - !!(isWindowExists && internalWindow['HTMLElement']); -var zoneSymbolEventNames = {}; -var wrapFn = function (event) { - // https://github.com/angular/zone.js/issues/911, in IE, sometimes - // event will be undefined, so we need to use window.event - event = event || _global.event; - if (!event) { - return; - } - var eventNameSymbol = zoneSymbolEventNames[event.type]; - if (!eventNameSymbol) { - eventNameSymbol = zoneSymbolEventNames[event.type] = zoneSymbol('ON_PROPERTY' + event.type); - } - var target = this || event.target || _global; - var listener = target[eventNameSymbol]; - var result = listener && listener.apply(this, arguments); - if (result != undefined && !result) { - event.preventDefault(); - } - return result; -}; -function patchProperty(obj, prop, prototype) { - var desc = ObjectGetOwnPropertyDescriptor(obj, prop); - if (!desc && prototype) { - // when patch window object, use prototype to check prop exist or not - var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop); - if (prototypeDesc) { - desc = { enumerable: true, configurable: true }; - } - } - // if the descriptor not exists or is not configurable - // just return - if (!desc || !desc.configurable) { - return; - } - // A property descriptor cannot have getter/setter and be writable - // deleting the writable and value properties avoids this error: - // - // TypeError: property descriptors must not specify a value or be writable when a - // getter or setter has been specified - delete desc.writable; - delete desc.value; - var originalDescGet = desc.get; - var originalDescSet = desc.set; - // substr(2) cuz 'onclick' -> 'click', etc - var eventName = prop.substr(2); - var eventNameSymbol = zoneSymbolEventNames[eventName]; - if (!eventNameSymbol) { - eventNameSymbol = zoneSymbolEventNames[eventName] = zoneSymbol('ON_PROPERTY' + eventName); - } - desc.set = function (newValue) { - // in some of windows's onproperty callback, this is undefined - // so we need to check it - var target = this; - if (!target && obj === _global) { - target = _global; - } - if (!target) { - return; - } - var previousValue = target[eventNameSymbol]; - if (previousValue) { - target.removeEventListener(eventName, wrapFn); - } - // issue #978, when onload handler was added before loading zone.js - // we should remove it with originalDescSet - if (originalDescSet) { - originalDescSet.apply(target, NULL_ON_PROP_VALUE); - } - if (typeof newValue === 'function') { - target[eventNameSymbol] = newValue; - target.addEventListener(eventName, wrapFn, false); - } - else { - target[eventNameSymbol] = null; - } - }; - // The getter would return undefined for unassigned properties but the default value of an - // unassigned property is null - desc.get = function () { - // in some of windows's onproperty callback, this is undefined - // so we need to check it - var target = this; - if (!target && obj === _global) { - target = _global; - } - if (!target) { - return null; - } - var listener = target[eventNameSymbol]; - if (listener) { - return listener; - } - else if (originalDescGet) { - // result will be null when use inline event attribute, - // such as - // because the onclick function is internal raw uncompiled handler - // the onclick will be evaluated when first time event was triggered or - // the property is accessed, https://github.com/angular/zone.js/issues/525 - // so we should use original native get to retrieve the handler - var value = originalDescGet && originalDescGet.call(this); - if (value) { - desc.set.call(this, value); - if (typeof target[REMOVE_ATTRIBUTE] === 'function') { - target.removeAttribute(prop); - } - return value; - } - } - return null; - }; - ObjectDefineProperty(obj, prop, desc); -} -function patchOnProperties(obj, properties, prototype) { - if (properties) { - for (var i = 0; i < properties.length; i++) { - patchProperty(obj, 'on' + properties[i], prototype); - } - } - else { - var onProperties = []; - for (var prop in obj) { - if (prop.substr(0, 2) == 'on') { - onProperties.push(prop); - } - } - for (var j = 0; j < onProperties.length; j++) { - patchProperty(obj, onProperties[j], prototype); - } - } -} -var originalInstanceKey = zoneSymbol('originalInstance'); -// wrap some native API on `window` -function patchClass(className) { - var OriginalClass = _global[className]; - if (!OriginalClass) - return; - // keep original class in global - _global[zoneSymbol(className)] = OriginalClass; - _global[className] = function () { - var a = bindArguments(arguments, className); - switch (a.length) { - case 0: - this[originalInstanceKey] = new OriginalClass(); - break; - case 1: - this[originalInstanceKey] = new OriginalClass(a[0]); - break; - case 2: - this[originalInstanceKey] = new OriginalClass(a[0], a[1]); - break; - case 3: - this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]); - break; - case 4: - this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]); - break; - default: - throw new Error('Arg list too long.'); - } - }; - // attach original delegate to patched function - attachOriginToPatched(_global[className], OriginalClass); - var instance = new OriginalClass(function () { }); - var prop; - for (prop in instance) { - // https://bugs.webkit.org/show_bug.cgi?id=44721 - if (className === 'XMLHttpRequest' && prop === 'responseBlob') - continue; - (function (prop) { - if (typeof instance[prop] === 'function') { - _global[className].prototype[prop] = function () { - return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments); - }; - } - else { - ObjectDefineProperty(_global[className].prototype, prop, { - set: function (fn) { - if (typeof fn === 'function') { - this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop); - // keep callback in wrapped function so we can - // use it in Function.prototype.toString to return - // the native one. - attachOriginToPatched(this[originalInstanceKey][prop], fn); - } - else { - this[originalInstanceKey][prop] = fn; - } - }, - get: function () { - return this[originalInstanceKey][prop]; - } - }); - } - }(prop)); - } - for (prop in OriginalClass) { - if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) { - _global[className][prop] = OriginalClass[prop]; - } - } -} -function patchMethod(target, name, patchFn) { - var proto = target; - while (proto && !proto.hasOwnProperty(name)) { - proto = ObjectGetPrototypeOf(proto); - } - if (!proto && target[name]) { - // somehow we did not find it, but we can see it. This happens on IE for Window properties. - proto = target; - } - var delegateName = zoneSymbol(name); - var delegate; - if (proto && !(delegate = proto[delegateName])) { - delegate = proto[delegateName] = proto[name]; - // check whether proto[name] is writable - // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob - var desc = proto && ObjectGetOwnPropertyDescriptor(proto, name); - if (isPropertyWritable(desc)) { - var patchDelegate_1 = patchFn(delegate, delegateName, name); - proto[name] = function () { - return patchDelegate_1(this, arguments); - }; - attachOriginToPatched(proto[name], delegate); - } - } - return delegate; -} -// TODO: @JiaLiPassion, support cancel task later if necessary -function patchMacroTask(obj, funcName, metaCreator) { - var setNative = null; - function scheduleTask(task) { - var data = task.data; - data.args[data.cbIdx] = function () { - task.invoke.apply(this, arguments); - }; - setNative.apply(data.target, data.args); - return task; - } - setNative = patchMethod(obj, funcName, function (delegate) { return function (self, args) { - var meta = metaCreator(self, args); - if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') { - return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask, null); - } - else { - // cause an error by calling it directly. - return delegate.apply(self, args); - } - }; }); -} - -function attachOriginToPatched(patched, original) { - patched[zoneSymbol('OriginalDelegate')] = original; -} -var isDetectedIEOrEdge = false; -var ieOrEdge = false; -function isIEOrEdge() { - if (isDetectedIEOrEdge) { - return ieOrEdge; - } - isDetectedIEOrEdge = true; - try { - var ua = internalWindow.navigator.userAgent; - if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) { - ieOrEdge = true; - } - return ieOrEdge; - } - catch (error) { - } -} - -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -// override Function.prototype.toString to make zone.js patched function -// look like native function -Zone.__load_patch('toString', function (global) { - // patch Func.prototype.toString to let them look like native - var originalFunctionToString = Function.prototype.toString; - var ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate'); - var PROMISE_SYMBOL = zoneSymbol('Promise'); - var ERROR_SYMBOL = zoneSymbol('Error'); - var newFunctionToString = function toString() { - if (typeof this === 'function') { - var originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL]; - if (originalDelegate) { - if (typeof originalDelegate === 'function') { - return originalFunctionToString.apply(this[ORIGINAL_DELEGATE_SYMBOL], arguments); - } - else { - return Object.prototype.toString.call(originalDelegate); - } - } - if (this === Promise) { - var nativePromise = global[PROMISE_SYMBOL]; - if (nativePromise) { - return originalFunctionToString.apply(nativePromise, arguments); - } - } - if (this === Error) { - var nativeError = global[ERROR_SYMBOL]; - if (nativeError) { - return originalFunctionToString.apply(nativeError, arguments); - } - } - } - return originalFunctionToString.apply(this, arguments); - }; - newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString; - Function.prototype.toString = newFunctionToString; - // patch Object.prototype.toString to let them look like native - var originalObjectToString = Object.prototype.toString; - var PROMISE_OBJECT_TO_STRING = '[object Promise]'; - Object.prototype.toString = function () { - if (this instanceof Promise) { - return PROMISE_OBJECT_TO_STRING; - } - return originalObjectToString.apply(this, arguments); - }; -}); - -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * @fileoverview - * @suppress {missingRequire} - */ -// an identifier to tell ZoneTask do not create a new invoke closure -var OPTIMIZED_ZONE_EVENT_TASK_DATA = { - useG: true -}; -var zoneSymbolEventNames$1 = {}; -var globalSources = {}; -var EVENT_NAME_SYMBOL_REGX = /^__zone_symbol__(\w+)(true|false)$/; -var IMMEDIATE_PROPAGATION_SYMBOL = ('__zone_symbol__propagationStopped'); -function patchEventTarget(_global, apis, patchOptions) { - var ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR; - var REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR; - var LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners'; - var REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners'; - var zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER); - var ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':'; - var PREPEND_EVENT_LISTENER = 'prependListener'; - var PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':'; - var invokeTask = function (task, target, event) { - // for better performance, check isRemoved which is set - // by removeEventListener - if (task.isRemoved) { - return; - } - var delegate = task.callback; - if (typeof delegate === 'object' && delegate.handleEvent) { - // create the bind version of handleEvent when invoke - task.callback = function (event) { return delegate.handleEvent(event); }; - task.originalDelegate = delegate; - } - // invoke static task.invoke - task.invoke(task, target, [event]); - var options = task.options; - if (options && typeof options === 'object' && options.once) { - // if options.once is true, after invoke once remove listener here - // only browser need to do this, nodejs eventEmitter will cal removeListener - // inside EventEmitter.once - var delegate_1 = task.originalDelegate ? task.originalDelegate : task.callback; - target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate_1, options); - } - }; - // global shared zoneAwareCallback to handle all event callback with capture = false - var globalZoneAwareCallback = function (event) { - // https://github.com/angular/zone.js/issues/911, in IE, sometimes - // event will be undefined, so we need to use window.event - event = event || _global.event; - if (!event) { - return; - } - // event.target is needed for Samsung TV and SourceBuffer - // || global is needed https://github.com/angular/zone.js/issues/190 - var target = this || event.target || _global; - var tasks = target[zoneSymbolEventNames$1[event.type][FALSE_STR]]; - if (tasks) { - // invoke all tasks which attached to current target with given event.type and capture = false - // for performance concern, if task.length === 1, just invoke - if (tasks.length === 1) { - invokeTask(tasks[0], target, event); - } - else { - // https://github.com/angular/zone.js/issues/836 - // copy the tasks array before invoke, to avoid - // the callback will remove itself or other listener - var copyTasks = tasks.slice(); - for (var i = 0; i < copyTasks.length; i++) { - if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) { - break; - } - invokeTask(copyTasks[i], target, event); - } - } - } - }; - // global shared zoneAwareCallback to handle all event callback with capture = true - var globalZoneAwareCaptureCallback = function (event) { - // https://github.com/angular/zone.js/issues/911, in IE, sometimes - // event will be undefined, so we need to use window.event - event = event || _global.event; - if (!event) { - return; - } - // event.target is needed for Samsung TV and SourceBuffer - // || global is needed https://github.com/angular/zone.js/issues/190 - var target = this || event.target || _global; - var tasks = target[zoneSymbolEventNames$1[event.type][TRUE_STR]]; - if (tasks) { - // invoke all tasks which attached to current target with given event.type and capture = false - // for performance concern, if task.length === 1, just invoke - if (tasks.length === 1) { - invokeTask(tasks[0], target, event); - } - else { - // https://github.com/angular/zone.js/issues/836 - // copy the tasks array before invoke, to avoid - // the callback will remove itself or other listener - var copyTasks = tasks.slice(); - for (var i = 0; i < copyTasks.length; i++) { - if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) { - break; - } - invokeTask(copyTasks[i], target, event); - } - } - } - }; - function patchEventTargetMethods(obj, patchOptions) { - if (!obj) { - return false; - } - var useGlobalCallback = true; - if (patchOptions && patchOptions.useG !== undefined) { - useGlobalCallback = patchOptions.useG; - } - var validateHandler = patchOptions && patchOptions.vh; - var checkDuplicate = true; - if (patchOptions && patchOptions.chkDup !== undefined) { - checkDuplicate = patchOptions.chkDup; - } - var returnTarget = false; - if (patchOptions && patchOptions.rt !== undefined) { - returnTarget = patchOptions.rt; - } - var proto = obj; - while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) { - proto = ObjectGetPrototypeOf(proto); - } - if (!proto && obj[ADD_EVENT_LISTENER]) { - // somehow we did not find it, but we can see it. This happens on IE for Window properties. - proto = obj; - } - if (!proto) { - return false; - } - if (proto[zoneSymbolAddEventListener]) { - return false; - } - // a shared global taskData to pass data for scheduleEventTask - // so we do not need to create a new object just for pass some data - var taskData = {}; - var nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER]; - var nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] = - proto[REMOVE_EVENT_LISTENER]; - var nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] = - proto[LISTENERS_EVENT_LISTENER]; - var nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] = - proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER]; - var nativePrependEventListener; - if (patchOptions && patchOptions.prepend) { - nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] = - proto[patchOptions.prepend]; - } - var customScheduleGlobal = function () { - // if there is already a task for the eventName + capture, - // just return, because we use the shared globalZoneAwareCallback here. - if (taskData.isExisting) { - return; - } - return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options); - }; - var customCancelGlobal = function (task) { - // if task is not marked as isRemoved, this call is directly - // from Zone.prototype.cancelTask, we should remove the task - // from tasksList of target first - if (!task.isRemoved) { - var symbolEventNames = zoneSymbolEventNames$1[task.eventName]; - var symbolEventName = void 0; - if (symbolEventNames) { - symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR]; - } - var existingTasks = symbolEventName && task.target[symbolEventName]; - if (existingTasks) { - for (var i = 0; i < existingTasks.length; i++) { - var existingTask = existingTasks[i]; - if (existingTask === task) { - existingTasks.splice(i, 1); - // set isRemoved to data for faster invokeTask check - task.isRemoved = true; - if (existingTasks.length === 0) { - // all tasks for the eventName + capture have gone, - // remove globalZoneAwareCallback and remove the task cache from target - task.allRemoved = true; - task.target[symbolEventName] = null; - } - break; - } - } - } - } - // if all tasks for the eventName + capture have gone, - // we will really remove the global event callback, - // if not, return - if (!task.allRemoved) { - return; - } - return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options); - }; - var customScheduleNonGlobal = function (task) { - return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options); - }; - var customSchedulePrepend = function (task) { - return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options); - }; - var customCancelNonGlobal = function (task) { - return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options); - }; - var customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal; - var customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal; - var compareTaskCallbackVsDelegate = function (task, delegate) { - var typeOfDelegate = typeof delegate; - return (typeOfDelegate === 'function' && task.callback === delegate) || - (typeOfDelegate === 'object' && task.originalDelegate === delegate); - }; - var compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate; - var blackListedEvents = Zone[Zone.__symbol__('BLACK_LISTED_EVENTS')]; - var makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget, prepend) { - if (returnTarget === void 0) { returnTarget = false; } - if (prepend === void 0) { prepend = false; } - return function () { - var target = this || _global; - var delegate = arguments[1]; - if (!delegate) { - return nativeListener.apply(this, arguments); - } - // don't create the bind delegate function for handleEvent - // case here to improve addEventListener performance - // we will create the bind delegate when invoke - var isHandleEvent = false; - if (typeof delegate !== 'function') { - if (!delegate.handleEvent) { - return nativeListener.apply(this, arguments); - } - isHandleEvent = true; - } - if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) { - return; - } - var eventName = arguments[0]; - var options = arguments[2]; - if (blackListedEvents) { - // check black list - for (var i = 0; i < blackListedEvents.length; i++) { - if (eventName === blackListedEvents[i]) { - return nativeListener.apply(this, arguments); - } - } - } - var capture; - var once = false; - if (options === undefined) { - capture = false; - } - else if (options === true) { - capture = true; - } - else if (options === false) { - capture = false; - } - else { - capture = options ? !!options.capture : false; - once = options ? !!options.once : false; - } - var zone = Zone.current; - var symbolEventNames = zoneSymbolEventNames$1[eventName]; - var symbolEventName; - if (!symbolEventNames) { - // the code is duplicate, but I just want to get some better performance - var falseEventName = eventName + FALSE_STR; - var trueEventName = eventName + TRUE_STR; - var symbol = ZONE_SYMBOL_PREFIX + falseEventName; - var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName; - zoneSymbolEventNames$1[eventName] = {}; - zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol; - zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture; - symbolEventName = capture ? symbolCapture : symbol; - } - else { - symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR]; - } - var existingTasks = target[symbolEventName]; - var isExisting = false; - if (existingTasks) { - // already have task registered - isExisting = true; - if (checkDuplicate) { - for (var i = 0; i < existingTasks.length; i++) { - if (compare(existingTasks[i], delegate)) { - // same callback, same capture, same event name, just return - return; - } - } - } - } - else { - existingTasks = target[symbolEventName] = []; - } - var source; - var constructorName = target.constructor['name']; - var targetSource = globalSources[constructorName]; - if (targetSource) { - source = targetSource[eventName]; - } - if (!source) { - source = constructorName + addSource + eventName; - } - // do not create a new object as task.data to pass those things - // just use the global shared one - taskData.options = options; - if (once) { - // if addEventListener with once options, we don't pass it to - // native addEventListener, instead we keep the once setting - // and handle ourselves. - taskData.options.once = false; - } - taskData.target = target; - taskData.capture = capture; - taskData.eventName = eventName; - taskData.isExisting = isExisting; - var data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : null; - // keep taskData into data to allow onScheduleEventTask to access the task information - if (data) { - data.taskData = taskData; - } - var task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn); - // should clear taskData.target to avoid memory leak - // issue, https://github.com/angular/angular/issues/20442 - taskData.target = null; - // need to clear up taskData because it is a global object - if (data) { - data.taskData = null; - } - // have to save those information to task in case - // application may call task.zone.cancelTask() directly - if (once) { - options.once = true; - } - task.options = options; - task.target = target; - task.capture = capture; - task.eventName = eventName; - if (isHandleEvent) { - // save original delegate for compare to check duplicate - task.originalDelegate = delegate; - } - if (!prepend) { - existingTasks.push(task); - } - else { - existingTasks.unshift(task); - } - if (returnTarget) { - return target; - } - }; - }; - proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget); - if (nativePrependEventListener) { - proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true); - } - proto[REMOVE_EVENT_LISTENER] = function () { - var target = this || _global; - var eventName = arguments[0]; - var options = arguments[2]; - var capture; - if (options === undefined) { - capture = false; - } - else if (options === true) { - capture = true; - } - else if (options === false) { - capture = false; - } - else { - capture = options ? !!options.capture : false; - } - var delegate = arguments[1]; - if (!delegate) { - return nativeRemoveEventListener.apply(this, arguments); - } - if (validateHandler && - !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) { - return; - } - var symbolEventNames = zoneSymbolEventNames$1[eventName]; - var symbolEventName; - if (symbolEventNames) { - symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR]; - } - var existingTasks = symbolEventName && target[symbolEventName]; - if (existingTasks) { - for (var i = 0; i < existingTasks.length; i++) { - var existingTask = existingTasks[i]; - if (compare(existingTask, delegate)) { - existingTasks.splice(i, 1); - // set isRemoved to data for faster invokeTask check - existingTask.isRemoved = true; - if (existingTasks.length === 0) { - // all tasks for the eventName + capture have gone, - // remove globalZoneAwareCallback and remove the task cache from target - existingTask.allRemoved = true; - target[symbolEventName] = null; - } - existingTask.zone.cancelTask(existingTask); - if (returnTarget) { - return target; - } - return; - } - } - } - // issue 930, didn't find the event name or callback - // from zone kept existingTasks, the callback maybe - // added outside of zone, we need to call native removeEventListener - // to try to remove it. - return nativeRemoveEventListener.apply(this, arguments); - }; - proto[LISTENERS_EVENT_LISTENER] = function () { - var target = this || _global; - var eventName = arguments[0]; - var listeners = []; - var tasks = findEventTasks(target, eventName); - for (var i = 0; i < tasks.length; i++) { - var task = tasks[i]; - var delegate = task.originalDelegate ? task.originalDelegate : task.callback; - listeners.push(delegate); - } - return listeners; - }; - proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () { - var target = this || _global; - var eventName = arguments[0]; - if (!eventName) { - var keys = Object.keys(target); - for (var i = 0; i < keys.length; i++) { - var prop = keys[i]; - var match = EVENT_NAME_SYMBOL_REGX.exec(prop); - var evtName = match && match[1]; - // in nodejs EventEmitter, removeListener event is - // used for monitoring the removeListener call, - // so just keep removeListener eventListener until - // all other eventListeners are removed - if (evtName && evtName !== 'removeListener') { - this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName); - } - } - // remove removeListener listener finally - this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener'); - } - else { - var symbolEventNames = zoneSymbolEventNames$1[eventName]; - if (symbolEventNames) { - var symbolEventName = symbolEventNames[FALSE_STR]; - var symbolCaptureEventName = symbolEventNames[TRUE_STR]; - var tasks = target[symbolEventName]; - var captureTasks = target[symbolCaptureEventName]; - if (tasks) { - var removeTasks = tasks.slice(); - for (var i = 0; i < removeTasks.length; i++) { - var task = removeTasks[i]; - var delegate = task.originalDelegate ? task.originalDelegate : task.callback; - this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options); - } - } - if (captureTasks) { - var removeTasks = captureTasks.slice(); - for (var i = 0; i < removeTasks.length; i++) { - var task = removeTasks[i]; - var delegate = task.originalDelegate ? task.originalDelegate : task.callback; - this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options); - } - } - } - } - if (returnTarget) { - return this; - } - }; - // for native toString patch - attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener); - attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener); - if (nativeRemoveAllListeners) { - attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners); - } - if (nativeListeners) { - attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners); - } - return true; - } - var results = []; - for (var i = 0; i < apis.length; i++) { - results[i] = patchEventTargetMethods(apis[i], patchOptions); - } - return results; -} -function findEventTasks(target, eventName) { - var foundTasks = []; - for (var prop in target) { - var match = EVENT_NAME_SYMBOL_REGX.exec(prop); - var evtName = match && match[1]; - if (evtName && (!eventName || evtName === eventName)) { - var tasks = target[prop]; - if (tasks) { - for (var i = 0; i < tasks.length; i++) { - foundTasks.push(tasks[i]); - } - } - } - } - return foundTasks; -} -function patchEventPrototype(global, api) { - var Event = global['Event']; - if (Event && Event.prototype) { - api.patchMethod(Event.prototype, 'stopImmediatePropagation', function (delegate) { return function (self, args) { - self[IMMEDIATE_PROPAGATION_SYMBOL] = true; - // we need to call the native stopImmediatePropagation - // in case in some hybrid application, some part of - // application will be controlled by zone, some are not - delegate && delegate.apply(self, args); - }; }); - } -} - -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * @fileoverview - * @suppress {missingRequire} - */ -var taskSymbol = zoneSymbol('zoneTask'); -function patchTimer(window, setName, cancelName, nameSuffix) { - var setNative = null; - var clearNative = null; - setName += nameSuffix; - cancelName += nameSuffix; - var tasksByHandleId = {}; - function scheduleTask(task) { - var data = task.data; - function timer() { - try { - task.invoke.apply(this, arguments); - } - finally { - // issue-934, task will be cancelled - // even it is a periodic task such as - // setInterval - if (!(task.data && task.data.isPeriodic)) { - if (typeof data.handleId === 'number') { - // in non-nodejs env, we remove timerId - // from local cache - delete tasksByHandleId[data.handleId]; - } - else if (data.handleId) { - // Node returns complex objects as handleIds - // we remove task reference from timer object - data.handleId[taskSymbol] = null; - } - } - } - } - data.args[0] = timer; - data.handleId = setNative.apply(window, data.args); - return task; - } - function clearTask(task) { - return clearNative(task.data.handleId); - } - setNative = - patchMethod(window, setName, function (delegate) { return function (self, args) { - if (typeof args[0] === 'function') { - var options = { - handleId: null, - isPeriodic: nameSuffix === 'Interval', - delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 : null, - args: args - }; - var task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask); - if (!task) { - return task; - } - // Node.js must additionally support the ref and unref functions. - var handle = task.data.handleId; - if (typeof handle === 'number') { - // for non nodejs env, we save handleId: task - // mapping in local cache for clearTimeout - tasksByHandleId[handle] = task; - } - else if (handle) { - // for nodejs env, we save task - // reference in timerId Object for clearTimeout - handle[taskSymbol] = task; - } - // check whether handle is null, because some polyfill or browser - // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame - if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' && - typeof handle.unref === 'function') { - task.ref = handle.ref.bind(handle); - task.unref = handle.unref.bind(handle); - } - if (typeof handle === 'number' || handle) { - return handle; - } - return task; - } - else { - // cause an error by calling it directly. - return delegate.apply(window, args); - } - }; }); - clearNative = - patchMethod(window, cancelName, function (delegate) { return function (self, args) { - var id = args[0]; - var task; - if (typeof id === 'number') { - // non nodejs env. - task = tasksByHandleId[id]; - } - else { - // nodejs env. - task = id && id[taskSymbol]; - // other environments. - if (!task) { - task = id; - } - } - if (task && typeof task.type === 'string') { - if (task.state !== 'notScheduled' && - (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) { - if (typeof id === 'number') { - delete tasksByHandleId[id]; - } - else if (id) { - id[taskSymbol] = null; - } - // Do not cancel already canceled functions - task.zone.cancelTask(task); - } - } - else { - // cause an error by calling it directly. - delegate.apply(window, args); - } - }; }); -} - -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/* - * This is necessary for Chrome and Chrome mobile, to enable - * things like redefining `createdCallback` on an element. - */ -var _defineProperty = Object[zoneSymbol('defineProperty')] = Object.defineProperty; -var _getOwnPropertyDescriptor = Object[zoneSymbol('getOwnPropertyDescriptor')] = - Object.getOwnPropertyDescriptor; -var _create = Object.create; -var unconfigurablesKey = zoneSymbol('unconfigurables'); -function propertyPatch() { - Object.defineProperty = function (obj, prop, desc) { - if (isUnconfigurable(obj, prop)) { - throw new TypeError('Cannot assign to read only property \'' + prop + '\' of ' + obj); - } - var originalConfigurableFlag = desc.configurable; - if (prop !== 'prototype') { - desc = rewriteDescriptor(obj, prop, desc); - } - return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag); - }; - Object.defineProperties = function (obj, props) { - Object.keys(props).forEach(function (prop) { - Object.defineProperty(obj, prop, props[prop]); - }); - return obj; - }; - Object.create = function (obj, proto) { - if (typeof proto === 'object' && !Object.isFrozen(proto)) { - Object.keys(proto).forEach(function (prop) { - proto[prop] = rewriteDescriptor(obj, prop, proto[prop]); - }); - } - return _create(obj, proto); - }; - Object.getOwnPropertyDescriptor = function (obj, prop) { - var desc = _getOwnPropertyDescriptor(obj, prop); - if (isUnconfigurable(obj, prop)) { - desc.configurable = false; - } - return desc; - }; -} -function _redefineProperty(obj, prop, desc) { - var originalConfigurableFlag = desc.configurable; - desc = rewriteDescriptor(obj, prop, desc); - return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag); -} -function isUnconfigurable(obj, prop) { - return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop]; -} -function rewriteDescriptor(obj, prop, desc) { - // issue-927, if the desc is frozen, don't try to change the desc - if (!Object.isFrozen(desc)) { - desc.configurable = true; - } - if (!desc.configurable) { - // issue-927, if the obj is frozen, don't try to set the desc to obj - if (!obj[unconfigurablesKey] && !Object.isFrozen(obj)) { - _defineProperty(obj, unconfigurablesKey, { writable: true, value: {} }); - } - if (obj[unconfigurablesKey]) { - obj[unconfigurablesKey][prop] = true; - } - } - return desc; -} -function _tryDefineProperty(obj, prop, desc, originalConfigurableFlag) { - try { - return _defineProperty(obj, prop, desc); - } - catch (error) { - if (desc.configurable) { - // In case of errors, when the configurable flag was likely set by rewriteDescriptor(), let's - // retry with the original flag value - if (typeof originalConfigurableFlag == 'undefined') { - delete desc.configurable; - } - else { - desc.configurable = originalConfigurableFlag; - } - try { - return _defineProperty(obj, prop, desc); - } - catch (error) { - var descJson = null; - try { - descJson = JSON.stringify(desc); - } - catch (error) { - descJson = desc.toString(); - } - console.log("Attempting to configure '" + prop + "' with descriptor '" + descJson + "' on object '" + obj + "' and got error, giving up: " + error); - } - } - else { - throw error; - } - } -} - -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -// we have to patch the instance since the proto is non-configurable -function apply(api, _global) { - var WS = _global.WebSocket; - // On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener - // On older Chrome, no need since EventTarget was already patched - if (!_global.EventTarget) { - patchEventTarget(_global, [WS.prototype]); - } - _global.WebSocket = function (x, y) { - var socket = arguments.length > 1 ? new WS(x, y) : new WS(x); - var proxySocket; - var proxySocketProto; - // Safari 7.0 has non-configurable own 'onmessage' and friends properties on the socket instance - var onmessageDesc = ObjectGetOwnPropertyDescriptor(socket, 'onmessage'); - if (onmessageDesc && onmessageDesc.configurable === false) { - proxySocket = ObjectCreate(socket); - // socket have own property descriptor 'onopen', 'onmessage', 'onclose', 'onerror' - // but proxySocket not, so we will keep socket as prototype and pass it to - // patchOnProperties method - proxySocketProto = socket; - [ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR, 'send', 'close'].forEach(function (propName) { - proxySocket[propName] = function () { - var args = ArraySlice.call(arguments); - if (propName === ADD_EVENT_LISTENER_STR || propName === REMOVE_EVENT_LISTENER_STR) { - var eventName = args.length > 0 ? args[0] : undefined; - if (eventName) { - var propertySymbol = Zone.__symbol__('ON_PROPERTY' + eventName); - socket[propertySymbol] = proxySocket[propertySymbol]; - } - } - return socket[propName].apply(socket, args); - }; - }); - } - else { - // we can patch the real socket - proxySocket = socket; - } - patchOnProperties(proxySocket, ['close', 'error', 'message', 'open'], proxySocketProto); - return proxySocket; - }; - var globalWebSocket = _global['WebSocket']; - for (var prop in WS) { - globalWebSocket[prop] = WS[prop]; - } -} - -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * @fileoverview - * @suppress {globalThis} - */ -var globalEventHandlersEventNames = [ - 'abort', - 'animationcancel', - 'animationend', - 'animationiteration', - 'auxclick', - 'beforeinput', - 'blur', - 'cancel', - 'canplay', - 'canplaythrough', - 'change', - 'compositionstart', - 'compositionupdate', - 'compositionend', - 'cuechange', - 'click', - 'close', - 'contextmenu', - 'curechange', - 'dblclick', - 'drag', - 'dragend', - 'dragenter', - 'dragexit', - 'dragleave', - 'dragover', - 'drop', - 'durationchange', - 'emptied', - 'ended', - 'error', - 'focus', - 'focusin', - 'focusout', - 'gotpointercapture', - 'input', - 'invalid', - 'keydown', - 'keypress', - 'keyup', - 'load', - 'loadstart', - 'loadeddata', - 'loadedmetadata', - 'lostpointercapture', - 'mousedown', - 'mouseenter', - 'mouseleave', - 'mousemove', - 'mouseout', - 'mouseover', - 'mouseup', - 'mousewheel', - 'orientationchange', - 'pause', - 'play', - 'playing', - 'pointercancel', - 'pointerdown', - 'pointerenter', - 'pointerleave', - 'pointerlockchange', - 'mozpointerlockchange', - 'webkitpointerlockerchange', - 'pointerlockerror', - 'mozpointerlockerror', - 'webkitpointerlockerror', - 'pointermove', - 'pointout', - 'pointerover', - 'pointerup', - 'progress', - 'ratechange', - 'reset', - 'resize', - 'scroll', - 'seeked', - 'seeking', - 'select', - 'selectionchange', - 'selectstart', - 'show', - 'sort', - 'stalled', - 'submit', - 'suspend', - 'timeupdate', - 'volumechange', - 'touchcancel', - 'touchmove', - 'touchstart', - 'touchend', - 'transitioncancel', - 'transitionend', - 'waiting', - 'wheel' -]; -var documentEventNames = [ - 'afterscriptexecute', 'beforescriptexecute', 'DOMContentLoaded', 'fullscreenchange', - 'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange', 'fullscreenerror', - 'mozfullscreenerror', 'webkitfullscreenerror', 'msfullscreenerror', 'readystatechange', - 'visibilitychange' -]; -var windowEventNames = [ - 'absolutedeviceorientation', - 'afterinput', - 'afterprint', - 'appinstalled', - 'beforeinstallprompt', - 'beforeprint', - 'beforeunload', - 'devicelight', - 'devicemotion', - 'deviceorientation', - 'deviceorientationabsolute', - 'deviceproximity', - 'hashchange', - 'languagechange', - 'message', - 'mozbeforepaint', - 'offline', - 'online', - 'paint', - 'pageshow', - 'pagehide', - 'popstate', - 'rejectionhandled', - 'storage', - 'unhandledrejection', - 'unload', - 'userproximity', - 'vrdisplyconnected', - 'vrdisplaydisconnected', - 'vrdisplaypresentchange' -]; -var htmlElementEventNames = [ - 'beforecopy', 'beforecut', 'beforepaste', 'copy', 'cut', 'paste', 'dragstart', 'loadend', - 'animationstart', 'search', 'transitionrun', 'transitionstart', 'webkitanimationend', - 'webkitanimationiteration', 'webkitanimationstart', 'webkittransitionend' -]; -var mediaElementEventNames = ['encrypted', 'waitingforkey', 'msneedkey', 'mozinterruptbegin', 'mozinterruptend']; -var ieElementEventNames = [ - 'activate', - 'afterupdate', - 'ariarequest', - 'beforeactivate', - 'beforedeactivate', - 'beforeeditfocus', - 'beforeupdate', - 'cellchange', - 'controlselect', - 'dataavailable', - 'datasetchanged', - 'datasetcomplete', - 'errorupdate', - 'filterchange', - 'layoutcomplete', - 'losecapture', - 'move', - 'moveend', - 'movestart', - 'propertychange', - 'resizeend', - 'resizestart', - 'rowenter', - 'rowexit', - 'rowsdelete', - 'rowsinserted', - 'command', - 'compassneedscalibration', - 'deactivate', - 'help', - 'mscontentzoom', - 'msmanipulationstatechanged', - 'msgesturechange', - 'msgesturedoubletap', - 'msgestureend', - 'msgesturehold', - 'msgesturestart', - 'msgesturetap', - 'msgotpointercapture', - 'msinertiastart', - 'mslostpointercapture', - 'mspointercancel', - 'mspointerdown', - 'mspointerenter', - 'mspointerhover', - 'mspointerleave', - 'mspointermove', - 'mspointerout', - 'mspointerover', - 'mspointerup', - 'pointerout', - 'mssitemodejumplistitemremoved', - 'msthumbnailclick', - 'stop', - 'storagecommit' -]; -var webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror']; -var formEventNames = ['autocomplete', 'autocompleteerror']; -var detailEventNames = ['toggle']; -var frameEventNames = ['load']; -var frameSetEventNames = ['blur', 'error', 'focus', 'load', 'resize', 'scroll', 'messageerror']; -var marqueeEventNames = ['bounce', 'finish', 'start']; -var XMLHttpRequestEventNames = [ - 'loadstart', 'progress', 'abort', 'error', 'load', 'progress', 'timeout', 'loadend', - 'readystatechange' -]; -var IDBIndexEventNames = ['upgradeneeded', 'complete', 'abort', 'success', 'error', 'blocked', 'versionchange', 'close']; -var websocketEventNames = ['close', 'error', 'open', 'message']; -var workerEventNames = ['error', 'message']; -var eventNames = globalEventHandlersEventNames.concat(webglEventNames, formEventNames, detailEventNames, documentEventNames, windowEventNames, htmlElementEventNames, ieElementEventNames); -function filterProperties(target, onProperties, ignoreProperties) { - if (!ignoreProperties) { - return onProperties; - } - var tip = ignoreProperties.filter(function (ip) { return ip.target === target; }); - if (!tip || tip.length === 0) { - return onProperties; - } - var targetIgnoreProperties = tip[0].ignoreProperties; - return onProperties.filter(function (op) { return targetIgnoreProperties.indexOf(op) === -1; }); -} -function patchFilteredProperties(target, onProperties, ignoreProperties, prototype) { - // check whether target is available, sometimes target will be undefined - // because different browser or some 3rd party plugin. - if (!target) { - return; - } - var filteredProperties = filterProperties(target, onProperties, ignoreProperties); - patchOnProperties(target, filteredProperties, prototype); -} -function propertyDescriptorPatch(api, _global) { - if (isNode && !isMix) { - return; - } - var supportsWebSocket = typeof WebSocket !== 'undefined'; - if (canPatchViaPropertyDescriptor()) { - var ignoreProperties = _global.__Zone_ignore_on_properties; - // for browsers that we can patch the descriptor: Chrome & Firefox - if (isBrowser) { - var internalWindow = window; - // in IE/Edge, onProp not exist in window object, but in WindowPrototype - // so we need to pass WindowPrototype to check onProp exist or not - patchFilteredProperties(internalWindow, eventNames.concat(['messageerror']), ignoreProperties, ObjectGetPrototypeOf(internalWindow)); - patchFilteredProperties(Document.prototype, eventNames, ignoreProperties); - if (typeof internalWindow['SVGElement'] !== 'undefined') { - patchFilteredProperties(internalWindow['SVGElement'].prototype, eventNames, ignoreProperties); - } - patchFilteredProperties(Element.prototype, eventNames, ignoreProperties); - patchFilteredProperties(HTMLElement.prototype, eventNames, ignoreProperties); - patchFilteredProperties(HTMLMediaElement.prototype, mediaElementEventNames, ignoreProperties); - patchFilteredProperties(HTMLFrameSetElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties); - patchFilteredProperties(HTMLBodyElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties); - patchFilteredProperties(HTMLFrameElement.prototype, frameEventNames, ignoreProperties); - patchFilteredProperties(HTMLIFrameElement.prototype, frameEventNames, ignoreProperties); - var HTMLMarqueeElement_1 = internalWindow['HTMLMarqueeElement']; - if (HTMLMarqueeElement_1) { - patchFilteredProperties(HTMLMarqueeElement_1.prototype, marqueeEventNames, ignoreProperties); - } - var Worker_1 = internalWindow['Worker']; - if (Worker_1) { - patchFilteredProperties(Worker_1.prototype, workerEventNames, ignoreProperties); - } - } - patchFilteredProperties(XMLHttpRequest.prototype, XMLHttpRequestEventNames, ignoreProperties); - var XMLHttpRequestEventTarget = _global['XMLHttpRequestEventTarget']; - if (XMLHttpRequestEventTarget) { - patchFilteredProperties(XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype, XMLHttpRequestEventNames, ignoreProperties); - } - if (typeof IDBIndex !== 'undefined') { - patchFilteredProperties(IDBIndex.prototype, IDBIndexEventNames, ignoreProperties); - patchFilteredProperties(IDBRequest.prototype, IDBIndexEventNames, ignoreProperties); - patchFilteredProperties(IDBOpenDBRequest.prototype, IDBIndexEventNames, ignoreProperties); - patchFilteredProperties(IDBDatabase.prototype, IDBIndexEventNames, ignoreProperties); - patchFilteredProperties(IDBTransaction.prototype, IDBIndexEventNames, ignoreProperties); - patchFilteredProperties(IDBCursor.prototype, IDBIndexEventNames, ignoreProperties); - } - if (supportsWebSocket) { - patchFilteredProperties(WebSocket.prototype, websocketEventNames, ignoreProperties); - } - } - else { - // Safari, Android browsers (Jelly Bean) - patchViaCapturingAllTheEvents(); - patchClass('XMLHttpRequest'); - if (supportsWebSocket) { - apply(api, _global); - } - } -} -function canPatchViaPropertyDescriptor() { - if ((isBrowser || isMix) && !ObjectGetOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') && - typeof Element !== 'undefined') { - // WebKit https://bugs.webkit.org/show_bug.cgi?id=134364 - // IDL interface attributes are not configurable - var desc = ObjectGetOwnPropertyDescriptor(Element.prototype, 'onclick'); - if (desc && !desc.configurable) - return false; - } - var ON_READY_STATE_CHANGE = 'onreadystatechange'; - var XMLHttpRequestPrototype = XMLHttpRequest.prototype; - var xhrDesc = ObjectGetOwnPropertyDescriptor(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE); - // add enumerable and configurable here because in opera - // by default XMLHttpRequest.prototype.onreadystatechange is undefined - // without adding enumerable and configurable will cause onreadystatechange - // non-configurable - // and if XMLHttpRequest.prototype.onreadystatechange is undefined, - // we should set a real desc instead a fake one - if (xhrDesc) { - ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, { - enumerable: true, - configurable: true, - get: function () { - return true; - } - }); - var req = new XMLHttpRequest(); - var result = !!req.onreadystatechange; - // restore original desc - ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, xhrDesc || {}); - return result; - } - else { - var SYMBOL_FAKE_ONREADYSTATECHANGE_1 = zoneSymbol('fake'); - ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, { - enumerable: true, - configurable: true, - get: function () { - return this[SYMBOL_FAKE_ONREADYSTATECHANGE_1]; - }, - set: function (value) { - this[SYMBOL_FAKE_ONREADYSTATECHANGE_1] = value; - } - }); - var req = new XMLHttpRequest(); - var detectFunc = function () { }; - req.onreadystatechange = detectFunc; - var result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc; - req.onreadystatechange = null; - return result; - } -} -var unboundKey = zoneSymbol('unbound'); -// Whenever any eventListener fires, we check the eventListener target and all parents -// for `onwhatever` properties and replace them with zone-bound functions -// - Chrome (for now) -function patchViaCapturingAllTheEvents() { - var _loop_1 = function (i) { - var property = eventNames[i]; - var onproperty = 'on' + property; - self.addEventListener(property, function (event) { - var elt = event.target, bound, source; - if (elt) { - source = elt.constructor['name'] + '.' + onproperty; - } - else { - source = 'unknown.' + onproperty; - } - while (elt) { - if (elt[onproperty] && !elt[onproperty][unboundKey]) { - bound = wrapWithCurrentZone(elt[onproperty], source); - bound[unboundKey] = elt[onproperty]; - elt[onproperty] = bound; - } - elt = elt.parentElement; - } - }, true); - }; - for (var i = 0; i < eventNames.length; i++) { - _loop_1(i); - } -} - -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function eventTargetPatch(_global, api) { - var WTF_ISSUE_555 = 'Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video'; - var NO_EVENT_TARGET = 'ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket' - .split(','); - var EVENT_TARGET = 'EventTarget'; - var apis = []; - var isWtf = _global['wtf']; - var WTF_ISSUE_555_ARRAY = WTF_ISSUE_555.split(','); - if (isWtf) { - // Workaround for: https://github.com/google/tracing-framework/issues/555 - apis = WTF_ISSUE_555_ARRAY.map(function (v) { return 'HTML' + v + 'Element'; }).concat(NO_EVENT_TARGET); - } - else if (_global[EVENT_TARGET]) { - apis.push(EVENT_TARGET); - } - else { - // Note: EventTarget is not available in all browsers, - // if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget - apis = NO_EVENT_TARGET; - } - var isDisableIECheck = _global['__Zone_disable_IE_check'] || false; - var isEnableCrossContextCheck = _global['__Zone_enable_cross_context_check'] || false; - var ieOrEdge = isIEOrEdge(); - var ADD_EVENT_LISTENER_SOURCE = '.addEventListener:'; - var FUNCTION_WRAPPER = '[object FunctionWrapper]'; - var BROWSER_TOOLS = 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }'; - // predefine all __zone_symbol__ + eventName + true/false string - for (var i = 0; i < eventNames.length; i++) { - var eventName = eventNames[i]; - var falseEventName = eventName + FALSE_STR; - var trueEventName = eventName + TRUE_STR; - var symbol = ZONE_SYMBOL_PREFIX + falseEventName; - var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName; - zoneSymbolEventNames$1[eventName] = {}; - zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol; - zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture; - } - // predefine all task.source string - for (var i = 0; i < WTF_ISSUE_555.length; i++) { - var target = WTF_ISSUE_555_ARRAY[i]; - var targets = globalSources[target] = {}; - for (var j = 0; j < eventNames.length; j++) { - var eventName = eventNames[j]; - targets[eventName] = target + ADD_EVENT_LISTENER_SOURCE + eventName; - } - } - var checkIEAndCrossContext = function (nativeDelegate, delegate, target, args) { - if (!isDisableIECheck && ieOrEdge) { - if (isEnableCrossContextCheck) { - try { - var testString = delegate.toString(); - if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) { - nativeDelegate.apply(target, args); - return false; - } - } - catch (error) { - nativeDelegate.apply(target, args); - return false; - } - } - else { - var testString = delegate.toString(); - if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) { - nativeDelegate.apply(target, args); - return false; - } - } - } - else if (isEnableCrossContextCheck) { - try { - delegate.toString(); - } - catch (error) { - nativeDelegate.apply(target, args); - return false; - } - } - return true; - }; - var apiTypes = []; - for (var i = 0; i < apis.length; i++) { - var type = _global[apis[i]]; - apiTypes.push(type && type.prototype); - } - // vh is validateHandler to check event handler - // is valid or not(for security check) - patchEventTarget(_global, apiTypes, { vh: checkIEAndCrossContext }); - api.patchEventTarget = patchEventTarget; - return true; -} -function patchEvent(global, api) { - patchEventPrototype(global, api); -} - -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function registerElementPatch(_global) { - if ((!isBrowser && !isMix) || !('registerElement' in _global.document)) { - return; - } - var _registerElement = document.registerElement; - var callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback']; - document.registerElement = function (name, opts) { - if (opts && opts.prototype) { - callbacks.forEach(function (callback) { - var source = 'Document.registerElement::' + callback; - var prototype = opts.prototype; - if (prototype.hasOwnProperty(callback)) { - var descriptor = ObjectGetOwnPropertyDescriptor(prototype, callback); - if (descriptor && descriptor.value) { - descriptor.value = wrapWithCurrentZone(descriptor.value, source); - _redefineProperty(opts.prototype, callback, descriptor); - } - else { - prototype[callback] = wrapWithCurrentZone(prototype[callback], source); - } - } - else if (prototype[callback]) { - prototype[callback] = wrapWithCurrentZone(prototype[callback], source); - } - }); - } - return _registerElement.call(document, name, opts); - }; - attachOriginToPatched(document.registerElement, _registerElement); -} - -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * @fileoverview - * @suppress {missingRequire} - */ -Zone.__load_patch('util', function (global, Zone, api) { - api.patchOnProperties = patchOnProperties; - api.patchMethod = patchMethod; - api.bindArguments = bindArguments; -}); -Zone.__load_patch('timers', function (global) { - var set = 'set'; - var clear = 'clear'; - patchTimer(global, set, clear, 'Timeout'); - patchTimer(global, set, clear, 'Interval'); - patchTimer(global, set, clear, 'Immediate'); -}); -Zone.__load_patch('requestAnimationFrame', function (global) { - patchTimer(global, 'request', 'cancel', 'AnimationFrame'); - patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame'); - patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame'); -}); -Zone.__load_patch('blocking', function (global, Zone) { - var blockingMethods = ['alert', 'prompt', 'confirm']; - for (var i = 0; i < blockingMethods.length; i++) { - var name_1 = blockingMethods[i]; - patchMethod(global, name_1, function (delegate, symbol, name) { - return function (s, args) { - return Zone.current.run(delegate, global, args, name); - }; - }); - } -}); -Zone.__load_patch('EventTarget', function (global, Zone, api) { - // load blackListEvents from global - var SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS'); - if (global[SYMBOL_BLACK_LISTED_EVENTS]) { - Zone[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_BLACK_LISTED_EVENTS]; - } - patchEvent(global, api); - eventTargetPatch(global, api); - // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener - var XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget']; - if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) { - api.patchEventTarget(global, [XMLHttpRequestEventTarget.prototype]); - } - patchClass('MutationObserver'); - patchClass('WebKitMutationObserver'); - patchClass('IntersectionObserver'); - patchClass('FileReader'); -}); -Zone.__load_patch('on_property', function (global, Zone, api) { - propertyDescriptorPatch(api, global); - propertyPatch(); - registerElementPatch(global); -}); -Zone.__load_patch('canvas', function (global) { - var HTMLCanvasElement = global['HTMLCanvasElement']; - if (typeof HTMLCanvasElement !== 'undefined' && HTMLCanvasElement.prototype && - HTMLCanvasElement.prototype.toBlob) { - patchMacroTask(HTMLCanvasElement.prototype, 'toBlob', function (self, args) { - return { name: 'HTMLCanvasElement.toBlob', target: self, cbIdx: 0, args: args }; - }); - } -}); -Zone.__load_patch('XHR', function (global, Zone) { - // Treat XMLHttpRequest as a macrotask. - patchXHR(global); - var XHR_TASK = zoneSymbol('xhrTask'); - var XHR_SYNC = zoneSymbol('xhrSync'); - var XHR_LISTENER = zoneSymbol('xhrListener'); - var XHR_SCHEDULED = zoneSymbol('xhrScheduled'); - var XHR_URL = zoneSymbol('xhrURL'); - function patchXHR(window) { - var XMLHttpRequestPrototype = XMLHttpRequest.prototype; - function findPendingTask(target) { - return target[XHR_TASK]; - } - var oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER]; - var oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]; - if (!oriAddListener) { - var XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget']; - if (XMLHttpRequestEventTarget) { - var XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype; - oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER]; - oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]; - } - } - var READY_STATE_CHANGE = 'readystatechange'; - var SCHEDULED = 'scheduled'; - function scheduleTask(task) { - XMLHttpRequest[XHR_SCHEDULED] = false; - var data = task.data; - var target = data.target; - // remove existing event listener - var listener = target[XHR_LISTENER]; - if (!oriAddListener) { - oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER]; - oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]; - } - if (listener) { - oriRemoveListener.call(target, READY_STATE_CHANGE, listener); - } - var newListener = target[XHR_LISTENER] = function () { - if (target.readyState === target.DONE) { - // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with - // readyState=4 multiple times, so we need to check task state here - if (!data.aborted && XMLHttpRequest[XHR_SCHEDULED] && task.state === SCHEDULED) { - task.invoke(); - } - } - }; - oriAddListener.call(target, READY_STATE_CHANGE, newListener); - var storedTask = target[XHR_TASK]; - if (!storedTask) { - target[XHR_TASK] = task; - } - sendNative.apply(target, data.args); - XMLHttpRequest[XHR_SCHEDULED] = true; - return task; - } - function placeholderCallback() { } - function clearTask(task) { - var data = task.data; - // Note - ideally, we would call data.target.removeEventListener here, but it's too late - // to prevent it from firing. So instead, we store info for the event listener. - data.aborted = true; - return abortNative.apply(data.target, data.args); - } - var openNative = patchMethod(XMLHttpRequestPrototype, 'open', function () { return function (self, args) { - self[XHR_SYNC] = args[2] == false; - self[XHR_URL] = args[1]; - return openNative.apply(self, args); - }; }); - var XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send'; - var sendNative = patchMethod(XMLHttpRequestPrototype, 'send', function () { return function (self, args) { - if (self[XHR_SYNC]) { - // if the XHR is sync there is no task to schedule, just execute the code. - return sendNative.apply(self, args); - } - else { - var options = { - target: self, - url: self[XHR_URL], - isPeriodic: false, - delay: null, - args: args, - aborted: false - }; - return scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask); - } - }; }); - var abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', function () { return function (self) { - var task = findPendingTask(self); - if (task && typeof task.type == 'string') { - // If the XHR has already completed, do nothing. - // If the XHR has already been aborted, do nothing. - // Fix #569, call abort multiple times before done will cause - // macroTask task count be negative number - if (task.cancelFn == null || (task.data && task.data.aborted)) { - return; - } - task.zone.cancelTask(task); - } - // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no - // task - // to cancel. Do nothing. - }; }); - } -}); -Zone.__load_patch('geolocation', function (global) { - /// GEO_LOCATION - if (global['navigator'] && global['navigator'].geolocation) { - patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']); - } -}); -Zone.__load_patch('PromiseRejectionEvent', function (global, Zone) { - // handle unhandled promise rejection - function findPromiseRejectionHandler(evtName) { - return function (e) { - var eventTasks = findEventTasks(global, evtName); - eventTasks.forEach(function (eventTask) { - // windows has added unhandledrejection event listener - // trigger the event listener - var PromiseRejectionEvent = global['PromiseRejectionEvent']; - if (PromiseRejectionEvent) { - var evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection }); - eventTask.invoke(evt); - } - }); - }; - } - if (global['PromiseRejectionEvent']) { - Zone[zoneSymbol('unhandledPromiseRejectionHandler')] = - findPromiseRejectionHandler('unhandledrejection'); - Zone[zoneSymbol('rejectionHandledHandler')] = - findPromiseRejectionHandler('rejectionhandled'); - } -}); - -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -}))); - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("../../../../webpack/buildin/global.js"))) - -/***/ }), - -/***/ 1: -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__("../../../../../src/polyfills.ts"); - - -/***/ }) - -},[1]); -//# sourceMappingURL=polyfills.bundle.js.map \ No newline at end of file diff --git a/web-carolapp/site/polyfills.bundle.js.map b/web-carolapp/site/polyfills.bundle.js.map deleted file mode 100644 index 065b106..0000000 --- a/web-carolapp/site/polyfills.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/polyfills.ts","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/es7/reflect.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_a-function.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_an-instance.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_an-object.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_array-from-iterable.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_array-includes.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_array-methods.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_array-species-constructor.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_array-species-create.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_classof.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_cof.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_collection-strong.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_collection-weak.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_collection.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_core.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_ctx.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_defined.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_descriptors.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_dom-create.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_enum-bug-keys.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_export.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_fails.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_for-of.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_global.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_has.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_hide.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_html.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_ie8-dom-define.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_inherit-if-required.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iobject.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_is-array-iter.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_is-array.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_is-object.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iter-call.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iter-create.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iter-define.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iter-detect.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iter-step.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iterators.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_library.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_meta.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_metadata.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-assign.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-create.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-dp.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-dps.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-gopd.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-gops.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-gpo.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-keys-internal.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-keys.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-pie.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_property-desc.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_redefine-all.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_redefine.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_set-proto.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_set-species.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_set-to-string-tag.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_shared-key.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_shared.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_to-absolute-index.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_to-integer.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_to-iobject.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_to-length.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_to-object.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_to-primitive.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_uid.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_validate-collection.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_wks.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/core.get-iterator-method.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es6.map.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es6.set.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es6.weak-map.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.define-metadata.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.delete-metadata.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.get-metadata.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.get-own-metadata.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.has-metadata.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.has-own-metadata.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.metadata.js","(webpack)/buildin/global.js","/Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/zone.js/dist/zone.js"],"names":[],"mappings":";;;;;;;;;AAAA;AAAA;AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AAEH,mEAAmE;AACnE,+BAA+B;AAC/B,+BAA+B;AAC/B,iCAAiC;AACjC,kCAAkC;AAClC,oCAAoC;AACpC,+BAA+B;AAC/B,6BAA6B;AAC7B,+BAA+B;AAC/B,6BAA6B;AAC7B,8BAA8B;AAC9B,+BAA+B;AAC/B,4BAA4B;AAC5B,iCAAiC;AACjC,4BAA4B;AAE5B,+EAA+E;AAC/E,oEAAoE;AAEpE,gEAAgE;AAChE,gCAAgC;AAGhC,yCAAyC;AACzC,kGAAkG;AACrE;AAG7B;;;IAGI;AACJ,8EAA8E;AAI9E;;GAEG;AACwB,CAAE,6BAA6B;AAI1D;;GAEG;;;;;;;;ACjEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;;;;;;;;ACHA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,YAAY,eAAe;AAChC;AACA,KAAK;AACL;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA;AACA,wCAAwC;AACxC;AACA,8BAA8B;AAC9B,6BAA6B;AAC7B,+BAA+B;AAC/B,mCAAmC;AACnC,SAAS,iCAAiC;AAC1C;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;ACfA;AACA;;AAEA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB,EAAE;;AAE/C;AACA;AACA;AACA;AACA,GAAG,YAAY;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA,iBAAiB;;AAEjB;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,6BAA6B;AAC7B,0BAA0B;AAC1B,0BAA0B;AAC1B,qBAAqB;AACrB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,8EAA8E,OAAO;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,qBAAqB;AACrB,0BAA0B;AAC1B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;;;;;;;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,0BAA0B;AAC1B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO,mCAAmC,gCAAgC,aAAa;AACvF,8BAA8B,mCAAmC,aAAa;AAC9E;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,qDAAqD;AACrD;AACA,kDAAkD,iBAAiB,EAAE;AACrE;AACA,wDAAwD,aAAa,EAAE,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;;;;;;;ACpFA,6BAA6B;AAC7B,uCAAuC;;;;;;;;ACDvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA,iCAAiC,QAAQ,mBAAmB,UAAU,EAAE,EAAE;AAC1E,CAAC;;;;;;;;ACHD;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,uBAAuB;AACzG,iEAAiE;AACjE,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,eAAe;AACf,eAAe;AACf,eAAe;AACf,gBAAgB;AAChB;;;;;;;;AC1CA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,iBAAiB,EAAE;AAC1D;AACA;AACA;AACA;AACA;AACA,mEAAmE,gBAAgB;AACnF;AACA;AACA,GAAG,4CAA4C,gCAAgC;AAC/E;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA,yCAAyC;;;;;;;;ACLzC,uBAAuB;AACvB;AACA;AACA;;;;;;;;ACHA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;;;;;;;ACPA;AACA;;;;;;;;ACDA;AACA,+GAAsE,mBAAmB,UAAU,EAAE,EAAE;AACvG,CAAC;;;;;;;;ACFD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;;AAEA;AACA,oKAAkF,aAAa,EAAE;;AAEjG;AACA,qDAAqD,4BAA4B;AACjF;AACA;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA,8BAA8B,aAAa;;AAE3C;AACA;AACA;AACA;AACA;AACA,yCAAyC,oCAAoC;AAC7E,6CAA6C,oCAAoC;AACjF,KAAK,4BAA4B,oCAAoC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA,kCAAkC,2BAA2B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;ACpEA;AACA;;AAEA;AACA;AACA,iCAAiC,qBAAqB;AACtD;AACA,iCAAiC,SAAS,EAAE;AAC5C,CAAC,YAAY;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,SAAS,qBAAqB;AAC3D,iCAAiC,aAAa;AAC9C;AACA,GAAG,YAAY;AACf;AACA;;;;;;;;ACrBA;AACA,UAAU;AACV;;;;;;;;ACFA;;;;;;;;ACAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD,CAAC;AACD;AACA,qBAAqB;AACrB;AACA,SAAS;AACT,GAAG,EAAE;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpDA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,gBAAgB,EAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,UAAU,EAAE;AAChD,mBAAmB,sCAAsC;AACzD,CAAC,qCAAqC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;ACjCD;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,YAAY;AACf;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG,YAAY;AACf;AACA;;;;;;;;ACfA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;ACZA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACNA,cAAc;;;;;;;;ACAd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;AACD;AACA,CAAC;;;;;;;;AC9BD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA,OAAO,YAAY,cAAc;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC,GAAG;AACH;;;;;;;;ACZA;AACA;AACA;;AAEA;AACA,oEAAoE,iCAAiC;AACrG;;;;;;;;ACNA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA,kDAAkD;AAClD;AACA,uCAAuC;AACvC;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;;;;;;;;ACLA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,mEAAmE;AAC5F,CAAC;AACD;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;AClBD;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,mEAAmE;AAC5F,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;ACbD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,uBAAuB,4EAA4E,EAAE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;;;;;;;;AC1DA;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA,CAAC,EAAE;;;;;;;;ACPH;AACA;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE;;;;;;;;ACdH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA,CAAC,EAAE;;;;;;;;AClBH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA,CAAC,EAAE;;;;;;;;AChBH;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA,CAAC,EAAE;;;;;;;;ACPH;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA;AACA,CAAC,EAAE;;;;;;;;ACRH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA,CAAC,EAAE;;;;;;;;ACfH;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA;AACA,CAAC,EAAE;;;;;;;;ACRH;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE;;;;;;;;ACdH;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qBAAqB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,uBAAuB;AAC9D,uCAAuC,kBAAkB;AACzD,oCAAoC,eAAe;AACnD,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD,uCAAuC,kBAAkB;AACzD,oCAAoC,eAAe;AACnD,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,kFAAkF,gEAAgE,EAAE;AACpJ;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,uCAAuC,0BAA0B,EAAE;AACnE;AACA;AACA;AACA,wCAAwC,6DAA6D,EAAE;AACvG,uCAAuC,WAAW,EAAE;AACpD;AACA,kCAAkC,aAAa,EAAE;AACjD,oCAAoC,aAAa,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,6BAA6B;AAC7B;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4HAA4H,wBAAwB,oCAAoC;AACxL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,sEAAsE;AACtJ;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,oDAAoD;AAC5F;AACA;AACA;AACA;AACA;AACA,2BAA2B,mCAAmC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,qEAAqE,gBAAgB;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,sBAAsB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,+CAA+C,sBAAsB;AACrE;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA,kBAAkB,EAAE;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,EAAE;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,EAAE;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oCAAoC;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,sBAAsB;AAChE,qCAAqC,iBAAiB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,8BAA8B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,0BAA0B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,wBAAwB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,wBAAwB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F;AAC1F;AACA;AACA;AACA;AACA;AACA,UAAU,EAAE;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,EAAE;AACZ;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,EAAE;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,0BAA0B,EAAE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,6BAA6B,EAAE;AACpF;AACA;AACA;AACA;AACA,8CAA8C,kDAAkD,EAAE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,0FAA0F;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,+BAA+B,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,gBAAgB;AACrF;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA,yCAAyC,6BAA6B;AACtE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA,UAAU,EAAE;AACZ;AACA,mFAAmF;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,EAAE;AACZ,qFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,EAAE;AACZ;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,0CAA0C;AAC5G;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC","file":"polyfills.bundle.js","sourcesContent":["/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfills to this file.\n *\n * This file is divided into 2 sections:\n * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\n * 2. Application imports. Files imported after ZoneJS that should be loaded before your main\n * file.\n *\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\n * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),\n * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.\n *\n * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html\n */\n\n/***************************************************************************************************\n * BROWSER POLYFILLS\n */\n\n/** IE9, IE10 and IE11 requires all of the following polyfills. **/\n// import 'core-js/es6/symbol';\n// import 'core-js/es6/object';\n// import 'core-js/es6/function';\n// import 'core-js/es6/parse-int';\n// import 'core-js/es6/parse-float';\n// import 'core-js/es6/number';\n// import 'core-js/es6/math';\n// import 'core-js/es6/string';\n// import 'core-js/es6/date';\n// import 'core-js/es6/array';\n// import 'core-js/es6/regexp';\n// import 'core-js/es6/map';\n// import 'core-js/es6/weak-map';\n// import 'core-js/es6/set';\n\n/** IE10 and IE11 requires the following for NgClass support on SVG elements */\n// import 'classlist.js'; // Run `npm install --save classlist.js`.\n\n/** IE10 and IE11 requires the following for the Reflect API. */\n// import 'core-js/es6/reflect';\n\n\n/** Evergreen browsers require these. **/\n// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.\nimport 'core-js/es7/reflect';\n\n\n/**\n * Required to support Web Animations `@angular/platform-browser/animations`.\n * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation\n **/\n// import 'web-animations-js'; // Run `npm install --save web-animations-js`.\n\n\n\n/***************************************************************************************************\n * Zone JS is required by default for Angular itself.\n */\nimport 'zone.js/dist/zone'; // Included with Angular CLI.\n\n\n\n/***************************************************************************************************\n * APPLICATION IMPORTS\n */\n\n\n\n// WEBPACK FOOTER //\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/src/polyfills.ts","require('../modules/es7.reflect.define-metadata');\nrequire('../modules/es7.reflect.delete-metadata');\nrequire('../modules/es7.reflect.get-metadata');\nrequire('../modules/es7.reflect.get-metadata-keys');\nrequire('../modules/es7.reflect.get-own-metadata');\nrequire('../modules/es7.reflect.get-own-metadata-keys');\nrequire('../modules/es7.reflect.has-metadata');\nrequire('../modules/es7.reflect.has-own-metadata');\nrequire('../modules/es7.reflect.metadata');\nmodule.exports = require('../modules/_core').Reflect;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/es7/reflect.js\n// module id = ../../../../core-js/es7/reflect.js\n// module chunks = polyfills","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_a-function.js\n// module id = ../../../../core-js/modules/_a-function.js\n// module chunks = polyfills","module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_an-instance.js\n// module id = ../../../../core-js/modules/_an-instance.js\n// module chunks = polyfills","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_an-object.js\n// module id = ../../../../core-js/modules/_an-object.js\n// module chunks = polyfills","var forOf = require('./_for-of');\n\nmodule.exports = function (iter, ITERATOR) {\n var result = [];\n forOf(iter, false, result.push, result, ITERATOR);\n return result;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_array-from-iterable.js\n// module id = ../../../../core-js/modules/_array-from-iterable.js\n// module chunks = polyfills","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_array-includes.js\n// module id = ../../../../core-js/modules/_array-includes.js\n// module chunks = polyfills","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./_ctx');\nvar IObject = require('./_iobject');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar asc = require('./_array-species-create');\nmodule.exports = function (TYPE, $create) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n var create = $create || asc;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IObject(O);\n var f = ctx(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var val, res;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n val = self[index];\n res = f(val, index, O);\n if (TYPE) {\n if (IS_MAP) result[index] = res; // map\n else if (res) switch (TYPE) {\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_array-methods.js\n// module id = ../../../../core-js/modules/_array-methods.js\n// module chunks = polyfills","var isObject = require('./_is-object');\nvar isArray = require('./_is-array');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_array-species-constructor.js\n// module id = ../../../../core-js/modules/_array-species-constructor.js\n// module chunks = polyfills","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_array-species-create.js\n// module id = ../../../../core-js/modules/_array-species-create.js\n// module chunks = polyfills","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_classof.js\n// module id = ../../../../core-js/modules/_classof.js\n// module chunks = polyfills","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_cof.js\n// module id = ../../../../core-js/modules/_cof.js\n// module chunks = polyfills","'use strict';\nvar dP = require('./_object-dp').f;\nvar create = require('./_object-create');\nvar redefineAll = require('./_redefine-all');\nvar ctx = require('./_ctx');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar $iterDefine = require('./_iter-define');\nvar step = require('./_iter-step');\nvar setSpecies = require('./_set-species');\nvar DESCRIPTORS = require('./_descriptors');\nvar fastKey = require('./_meta').fastKey;\nvar validate = require('./_validate-collection');\nvar SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function (that, key) {\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return that._i[index];\n // frozen object case\n for (entry = that._f; entry; entry = entry.n) {\n if (entry.k == key) return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {\n entry.r = true;\n if (entry.p) entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = validate(this, NAME);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.n;\n var prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if (prev) prev.n = next;\n if (next) next.p = prev;\n if (that._f == entry) that._f = next;\n if (that._l == entry) that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n validate(this, NAME);\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.n : this._f) {\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(validate(this, NAME), key);\n }\n });\n if (DESCRIPTORS) dP(C.prototype, 'size', {\n get: function () {\n return validate(this, NAME)[SIZE];\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var entry = getEntry(that, key);\n var prev, index;\n // change existing entry\n if (entry) {\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if (!that._f) that._f = entry;\n if (prev) prev.n = entry;\n that[SIZE]++;\n // add to index\n if (index !== 'F') that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function (C, NAME, IS_MAP) {\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function (iterated, kind) {\n this._t = validate(iterated, NAME); // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function () {\n var that = this;\n var kind = that._k;\n var entry = that._l;\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n // get next entry\n if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if (kind == 'keys') return step(0, entry.k);\n if (kind == 'values') return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_collection-strong.js\n// module id = ../../../../core-js/modules/_collection-strong.js\n// module chunks = polyfills","'use strict';\nvar redefineAll = require('./_redefine-all');\nvar getWeak = require('./_meta').getWeak;\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar createArrayMethod = require('./_array-methods');\nvar $has = require('./_has');\nvar validate = require('./_validate-collection');\nvar arrayFind = createArrayMethod(5);\nvar arrayFindIndex = createArrayMethod(6);\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (that) {\n return that._l || (that._l = new UncaughtFrozenStore());\n};\nvar UncaughtFrozenStore = function () {\n this.a = [];\n};\nvar findUncaughtFrozen = function (store, key) {\n return arrayFind(store.a, function (it) {\n return it[0] === key;\n });\n};\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.a.push([key, value]);\n },\n 'delete': function (key) {\n var index = arrayFindIndex(this.a, function (it) {\n return it[0] === key;\n });\n if (~index) this.a.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = id++; // collection id\n that._l = undefined; // leak store for uncaught frozen objects\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function (key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);\n return data && $has(data, this._i) && delete data[this._i];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has(key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);\n return data && $has(data, this._i);\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var data = getWeak(anObject(key), true);\n if (data === true) uncaughtFrozenStore(that).set(key, value);\n else data[that._i] = value;\n return that;\n },\n ufstore: uncaughtFrozenStore\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_collection-weak.js\n// module id = ../../../../core-js/modules/_collection-weak.js\n// module chunks = polyfills","'use strict';\nvar global = require('./_global');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar redefineAll = require('./_redefine-all');\nvar meta = require('./_meta');\nvar forOf = require('./_for-of');\nvar anInstance = require('./_an-instance');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar $iterDetect = require('./_iter-detect');\nvar setToStringTag = require('./_set-to-string-tag');\nvar inheritIfRequired = require('./_inherit-if-required');\n\nmodule.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {\n var Base = global[NAME];\n var C = Base;\n var ADDER = IS_MAP ? 'set' : 'add';\n var proto = C && C.prototype;\n var O = {};\n var fixMethod = function (KEY) {\n var fn = proto[KEY];\n redefine(proto, KEY,\n KEY == 'delete' ? function (a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a) {\n return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }\n : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }\n );\n };\n if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {\n new C().entries().next();\n }))) {\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n var instance = new C();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new C();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n if (!ACCEPT_ITERABLES) {\n C = wrapper(function (target, iterable) {\n anInstance(target, C, NAME);\n var that = inheritIfRequired(new Base(), target, C);\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n return that;\n });\n C.prototype = proto;\n proto.constructor = C;\n }\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n // weak collections should not contains .clear method\n if (IS_WEAK && proto.clear) delete proto.clear;\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F * (C != Base), O);\n\n if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_collection.js\n// module id = ../../../../core-js/modules/_collection.js\n// module chunks = polyfills","var core = module.exports = { version: '2.5.5' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_core.js\n// module id = ../../../../core-js/modules/_core.js\n// module chunks = polyfills","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_ctx.js\n// module id = ../../../../core-js/modules/_ctx.js\n// module chunks = polyfills","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_defined.js\n// module id = ../../../../core-js/modules/_defined.js\n// module chunks = polyfills","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_descriptors.js\n// module id = ../../../../core-js/modules/_descriptors.js\n// module chunks = polyfills","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_dom-create.js\n// module id = ../../../../core-js/modules/_dom-create.js\n// module chunks = polyfills","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_enum-bug-keys.js\n// module id = ../../../../core-js/modules/_enum-bug-keys.js\n// module chunks = polyfills","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_export.js\n// module id = ../../../../core-js/modules/_export.js\n// module chunks = polyfills","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_fails.js\n// module id = ../../../../core-js/modules/_fails.js\n// module chunks = polyfills","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_for-of.js\n// module id = ../../../../core-js/modules/_for-of.js\n// module chunks = polyfills","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_global.js\n// module id = ../../../../core-js/modules/_global.js\n// module chunks = polyfills","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_has.js\n// module id = ../../../../core-js/modules/_has.js\n// module chunks = polyfills","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_hide.js\n// module id = ../../../../core-js/modules/_hide.js\n// module chunks = polyfills","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_html.js\n// module id = ../../../../core-js/modules/_html.js\n// module chunks = polyfills","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_ie8-dom-define.js\n// module id = ../../../../core-js/modules/_ie8-dom-define.js\n// module chunks = polyfills","var isObject = require('./_is-object');\nvar setPrototypeOf = require('./_set-proto').set;\nmodule.exports = function (that, target, C) {\n var S = target.constructor;\n var P;\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n } return that;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_inherit-if-required.js\n// module id = ../../../../core-js/modules/_inherit-if-required.js\n// module chunks = polyfills","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iobject.js\n// module id = ../../../../core-js/modules/_iobject.js\n// module chunks = polyfills","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_is-array-iter.js\n// module id = ../../../../core-js/modules/_is-array-iter.js\n// module chunks = polyfills","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_is-array.js\n// module id = ../../../../core-js/modules/_is-array.js\n// module chunks = polyfills","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_is-object.js\n// module id = ../../../../core-js/modules/_is-object.js\n// module chunks = polyfills","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iter-call.js\n// module id = ../../../../core-js/modules/_iter-call.js\n// module chunks = polyfills","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iter-create.js\n// module id = ../../../../core-js/modules/_iter-create.js\n// module chunks = polyfills","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iter-define.js\n// module id = ../../../../core-js/modules/_iter-define.js\n// module chunks = polyfills","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iter-detect.js\n// module id = ../../../../core-js/modules/_iter-detect.js\n// module chunks = polyfills","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iter-step.js\n// module id = ../../../../core-js/modules/_iter-step.js\n// module chunks = polyfills","module.exports = {};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_iterators.js\n// module id = ../../../../core-js/modules/_iterators.js\n// module chunks = polyfills","module.exports = false;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_library.js\n// module id = ../../../../core-js/modules/_library.js\n// module chunks = polyfills","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_meta.js\n// module id = ../../../../core-js/modules/_meta.js\n// module chunks = polyfills","var Map = require('./es6.map');\nvar $export = require('./_export');\nvar shared = require('./_shared')('metadata');\nvar store = shared.store || (shared.store = new (require('./es6.weak-map'))());\n\nvar getOrCreateMetadataMap = function (target, targetKey, create) {\n var targetMetadata = store.get(target);\n if (!targetMetadata) {\n if (!create) return undefined;\n store.set(target, targetMetadata = new Map());\n }\n var keyMetadata = targetMetadata.get(targetKey);\n if (!keyMetadata) {\n if (!create) return undefined;\n targetMetadata.set(targetKey, keyMetadata = new Map());\n } return keyMetadata;\n};\nvar ordinaryHasOwnMetadata = function (MetadataKey, O, P) {\n var metadataMap = getOrCreateMetadataMap(O, P, false);\n return metadataMap === undefined ? false : metadataMap.has(MetadataKey);\n};\nvar ordinaryGetOwnMetadata = function (MetadataKey, O, P) {\n var metadataMap = getOrCreateMetadataMap(O, P, false);\n return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);\n};\nvar ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) {\n getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);\n};\nvar ordinaryOwnMetadataKeys = function (target, targetKey) {\n var metadataMap = getOrCreateMetadataMap(target, targetKey, false);\n var keys = [];\n if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); });\n return keys;\n};\nvar toMetaKey = function (it) {\n return it === undefined || typeof it == 'symbol' ? it : String(it);\n};\nvar exp = function (O) {\n $export($export.S, 'Reflect', O);\n};\n\nmodule.exports = {\n store: store,\n map: getOrCreateMetadataMap,\n has: ordinaryHasOwnMetadata,\n get: ordinaryGetOwnMetadata,\n set: ordinaryDefineOwnMetadata,\n keys: ordinaryOwnMetadataKeys,\n key: toMetaKey,\n exp: exp\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_metadata.js\n// module id = ../../../../core-js/modules/_metadata.js\n// module chunks = polyfills","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-assign.js\n// module id = ../../../../core-js/modules/_object-assign.js\n// module chunks = polyfills","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-create.js\n// module id = ../../../../core-js/modules/_object-create.js\n// module chunks = polyfills","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-dp.js\n// module id = ../../../../core-js/modules/_object-dp.js\n// module chunks = polyfills","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-dps.js\n// module id = ../../../../core-js/modules/_object-dps.js\n// module chunks = polyfills","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-gopd.js\n// module id = ../../../../core-js/modules/_object-gopd.js\n// module chunks = polyfills","exports.f = Object.getOwnPropertySymbols;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-gops.js\n// module id = ../../../../core-js/modules/_object-gops.js\n// module chunks = polyfills","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-gpo.js\n// module id = ../../../../core-js/modules/_object-gpo.js\n// module chunks = polyfills","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-keys-internal.js\n// module id = ../../../../core-js/modules/_object-keys-internal.js\n// module chunks = polyfills","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-keys.js\n// module id = ../../../../core-js/modules/_object-keys.js\n// module chunks = polyfills","exports.f = {}.propertyIsEnumerable;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_object-pie.js\n// module id = ../../../../core-js/modules/_object-pie.js\n// module chunks = polyfills","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_property-desc.js\n// module id = ../../../../core-js/modules/_property-desc.js\n// module chunks = polyfills","var redefine = require('./_redefine');\nmodule.exports = function (target, src, safe) {\n for (var key in src) redefine(target, key, src[key], safe);\n return target;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_redefine-all.js\n// module id = ../../../../core-js/modules/_redefine-all.js\n// module chunks = polyfills","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_redefine.js\n// module id = ../../../../core-js/modules/_redefine.js\n// module chunks = polyfills","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_set-proto.js\n// module id = ../../../../core-js/modules/_set-proto.js\n// module chunks = polyfills","'use strict';\nvar global = require('./_global');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n var C = global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_set-species.js\n// module id = ../../../../core-js/modules/_set-species.js\n// module chunks = polyfills","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_set-to-string-tag.js\n// module id = ../../../../core-js/modules/_set-to-string-tag.js\n// module chunks = polyfills","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_shared-key.js\n// module id = ../../../../core-js/modules/_shared-key.js\n// module chunks = polyfills","var global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_shared.js\n// module id = ../../../../core-js/modules/_shared.js\n// module chunks = polyfills","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_to-absolute-index.js\n// module id = ../../../../core-js/modules/_to-absolute-index.js\n// module chunks = polyfills","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_to-integer.js\n// module id = ../../../../core-js/modules/_to-integer.js\n// module chunks = polyfills","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_to-iobject.js\n// module id = ../../../../core-js/modules/_to-iobject.js\n// module chunks = polyfills","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_to-length.js\n// module id = ../../../../core-js/modules/_to-length.js\n// module chunks = polyfills","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_to-object.js\n// module id = ../../../../core-js/modules/_to-object.js\n// module chunks = polyfills","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_to-primitive.js\n// module id = ../../../../core-js/modules/_to-primitive.js\n// module chunks = polyfills","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_uid.js\n// module id = ../../../../core-js/modules/_uid.js\n// module chunks = polyfills","var isObject = require('./_is-object');\nmodule.exports = function (it, TYPE) {\n if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');\n return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_validate-collection.js\n// module id = ../../../../core-js/modules/_validate-collection.js\n// module chunks = polyfills","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/_wks.js\n// module id = ../../../../core-js/modules/_wks.js\n// module chunks = polyfills","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/core.get-iterator-method.js\n// module id = ../../../../core-js/modules/core.get-iterator-method.js\n// module chunks = polyfills","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar MAP = 'Map';\n\n// 23.1 Map Objects\nmodule.exports = require('./_collection')(MAP, function (get) {\n return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key) {\n var entry = strong.getEntry(validate(this, MAP), key);\n return entry && entry.v;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value) {\n return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);\n }\n}, strong, true);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es6.map.js\n// module id = ../../../../core-js/modules/es6.map.js\n// module chunks = polyfills","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar SET = 'Set';\n\n// 23.2 Set Objects\nmodule.exports = require('./_collection')(SET, function (get) {\n return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);\n }\n}, strong);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es6.set.js\n// module id = ../../../../core-js/modules/es6.set.js\n// module chunks = polyfills","'use strict';\nvar each = require('./_array-methods')(0);\nvar redefine = require('./_redefine');\nvar meta = require('./_meta');\nvar assign = require('./_object-assign');\nvar weak = require('./_collection-weak');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar validate = require('./_validate-collection');\nvar WEAK_MAP = 'WeakMap';\nvar getWeak = meta.getWeak;\nvar isExtensible = Object.isExtensible;\nvar uncaughtFrozenStore = weak.ufstore;\nvar tmp = {};\nvar InternalMap;\n\nvar wrapper = function (get) {\n return function WeakMap() {\n return get(this, arguments.length > 0 ? arguments[0] : undefined);\n };\n};\n\nvar methods = {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key) {\n if (isObject(key)) {\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);\n return data ? data[this._i] : undefined;\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value) {\n return weak.def(validate(this, WEAK_MAP), key, value);\n }\n};\n\n// 23.3 WeakMap Objects\nvar $WeakMap = module.exports = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true);\n\n// IE11 WeakMap frozen keys fix\nif (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {\n InternalMap = weak.getConstructor(wrapper, WEAK_MAP);\n assign(InternalMap.prototype, methods);\n meta.NEED = true;\n each(['delete', 'has', 'get', 'set'], function (key) {\n var proto = $WeakMap.prototype;\n var method = proto[key];\n redefine(proto, key, function (a, b) {\n // store frozen objects on internal weakmap shim\n if (isObject(a) && !isExtensible(a)) {\n if (!this._f) this._f = new InternalMap();\n var result = this._f[key](a, b);\n return key == 'set' ? this : result;\n // store all the rest on native weakmap\n } return method.call(this, a, b);\n });\n });\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es6.weak-map.js\n// module id = ../../../../core-js/modules/es6.weak-map.js\n// module chunks = polyfills","var metadata = require('./_metadata');\nvar anObject = require('./_an-object');\nvar toMetaKey = metadata.key;\nvar ordinaryDefineOwnMetadata = metadata.set;\n\nmetadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) {\n ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));\n} });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.define-metadata.js\n// module id = ../../../../core-js/modules/es7.reflect.define-metadata.js\n// module chunks = polyfills","var metadata = require('./_metadata');\nvar anObject = require('./_an-object');\nvar toMetaKey = metadata.key;\nvar getOrCreateMetadataMap = metadata.map;\nvar store = metadata.store;\n\nmetadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {\n var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]);\n var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);\n if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;\n if (metadataMap.size) return true;\n var targetMetadata = store.get(target);\n targetMetadata['delete'](targetKey);\n return !!targetMetadata.size || store['delete'](target);\n} });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.delete-metadata.js\n// module id = ../../../../core-js/modules/es7.reflect.delete-metadata.js\n// module chunks = polyfills","var Set = require('./es6.set');\nvar from = require('./_array-from-iterable');\nvar metadata = require('./_metadata');\nvar anObject = require('./_an-object');\nvar getPrototypeOf = require('./_object-gpo');\nvar ordinaryOwnMetadataKeys = metadata.keys;\nvar toMetaKey = metadata.key;\n\nvar ordinaryMetadataKeys = function (O, P) {\n var oKeys = ordinaryOwnMetadataKeys(O, P);\n var parent = getPrototypeOf(O);\n if (parent === null) return oKeys;\n var pKeys = ordinaryMetadataKeys(parent, P);\n return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;\n};\n\nmetadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {\n return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));\n} });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js\n// module id = ../../../../core-js/modules/es7.reflect.get-metadata-keys.js\n// module chunks = polyfills","var metadata = require('./_metadata');\nvar anObject = require('./_an-object');\nvar getPrototypeOf = require('./_object-gpo');\nvar ordinaryHasOwnMetadata = metadata.has;\nvar ordinaryGetOwnMetadata = metadata.get;\nvar toMetaKey = metadata.key;\n\nvar ordinaryGetMetadata = function (MetadataKey, O, P) {\n var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);\n if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);\n var parent = getPrototypeOf(O);\n return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;\n};\n\nmetadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {\n return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));\n} });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.get-metadata.js\n// module id = ../../../../core-js/modules/es7.reflect.get-metadata.js\n// module chunks = polyfills","var metadata = require('./_metadata');\nvar anObject = require('./_an-object');\nvar ordinaryOwnMetadataKeys = metadata.keys;\nvar toMetaKey = metadata.key;\n\nmetadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {\n return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));\n} });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js\n// module id = ../../../../core-js/modules/es7.reflect.get-own-metadata-keys.js\n// module chunks = polyfills","var metadata = require('./_metadata');\nvar anObject = require('./_an-object');\nvar ordinaryGetOwnMetadata = metadata.get;\nvar toMetaKey = metadata.key;\n\nmetadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {\n return ordinaryGetOwnMetadata(metadataKey, anObject(target)\n , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));\n} });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.get-own-metadata.js\n// module id = ../../../../core-js/modules/es7.reflect.get-own-metadata.js\n// module chunks = polyfills","var metadata = require('./_metadata');\nvar anObject = require('./_an-object');\nvar getPrototypeOf = require('./_object-gpo');\nvar ordinaryHasOwnMetadata = metadata.has;\nvar toMetaKey = metadata.key;\n\nvar ordinaryHasMetadata = function (MetadataKey, O, P) {\n var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);\n if (hasOwn) return true;\n var parent = getPrototypeOf(O);\n return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;\n};\n\nmetadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {\n return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));\n} });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.has-metadata.js\n// module id = ../../../../core-js/modules/es7.reflect.has-metadata.js\n// module chunks = polyfills","var metadata = require('./_metadata');\nvar anObject = require('./_an-object');\nvar ordinaryHasOwnMetadata = metadata.has;\nvar toMetaKey = metadata.key;\n\nmetadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {\n return ordinaryHasOwnMetadata(metadataKey, anObject(target)\n , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));\n} });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.has-own-metadata.js\n// module id = ../../../../core-js/modules/es7.reflect.has-own-metadata.js\n// module chunks = polyfills","var $metadata = require('./_metadata');\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar toMetaKey = $metadata.key;\nvar ordinaryDefineOwnMetadata = $metadata.set;\n\n$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {\n return function decorator(target, targetKey) {\n ordinaryDefineOwnMetadata(\n metadataKey, metadataValue,\n (targetKey !== undefined ? anObject : aFunction)(target),\n toMetaKey(targetKey)\n );\n };\n} });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/core-js/modules/es7.reflect.metadata.js\n// module id = ../../../../core-js/modules/es7.reflect.metadata.js\n// module chunks = polyfills","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = ../../../../webpack/buildin/global.js\n// module chunks = polyfills vendor","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(factory());\n}(this, (function () { 'use strict';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar Zone$1 = (function (global) {\n var FUNCTION = 'function';\n var performance = global['performance'];\n function mark(name) {\n performance && performance['mark'] && performance['mark'](name);\n }\n function performanceMeasure(name, label) {\n performance && performance['measure'] && performance['measure'](name, label);\n }\n mark('Zone');\n if (global['Zone']) {\n throw new Error('Zone already loaded.');\n }\n var Zone = /** @class */ (function () {\n function Zone(parent, zoneSpec) {\n this._properties = null;\n this._parent = parent;\n this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '';\n this._properties = zoneSpec && zoneSpec.properties || {};\n this._zoneDelegate =\n new ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);\n }\n Zone.assertZonePatched = function () {\n if (global['Promise'] !== patches['ZoneAwarePromise']) {\n throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +\n 'has been overwritten.\\n' +\n 'Most likely cause is that a Promise polyfill has been loaded ' +\n 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' +\n 'If you must load one, do so before loading zone.js.)');\n }\n };\n Object.defineProperty(Zone, \"root\", {\n get: function () {\n var zone = Zone.current;\n while (zone.parent) {\n zone = zone.parent;\n }\n return zone;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Zone, \"current\", {\n get: function () {\n return _currentZoneFrame.zone;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Zone, \"currentTask\", {\n get: function () {\n return _currentTask;\n },\n enumerable: true,\n configurable: true\n });\n Zone.__load_patch = function (name, fn) {\n if (patches.hasOwnProperty(name)) {\n throw Error('Already loaded patch: ' + name);\n }\n else if (!global['__Zone_disable_' + name]) {\n var perfName = 'Zone:' + name;\n mark(perfName);\n patches[name] = fn(global, Zone, _api);\n performanceMeasure(perfName, perfName);\n }\n };\n Object.defineProperty(Zone.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Zone.prototype, \"name\", {\n get: function () {\n return this._name;\n },\n enumerable: true,\n configurable: true\n });\n Zone.prototype.get = function (key) {\n var zone = this.getZoneWith(key);\n if (zone)\n return zone._properties[key];\n };\n Zone.prototype.getZoneWith = function (key) {\n var current = this;\n while (current) {\n if (current._properties.hasOwnProperty(key)) {\n return current;\n }\n current = current._parent;\n }\n return null;\n };\n Zone.prototype.fork = function (zoneSpec) {\n if (!zoneSpec)\n throw new Error('ZoneSpec required!');\n return this._zoneDelegate.fork(this, zoneSpec);\n };\n Zone.prototype.wrap = function (callback, source) {\n if (typeof callback !== FUNCTION) {\n throw new Error('Expecting function got: ' + callback);\n }\n var _callback = this._zoneDelegate.intercept(this, callback, source);\n var zone = this;\n return function () {\n return zone.runGuarded(_callback, this, arguments, source);\n };\n };\n Zone.prototype.run = function (callback, applyThis, applyArgs, source) {\n if (applyThis === void 0) { applyThis = undefined; }\n if (applyArgs === void 0) { applyArgs = null; }\n if (source === void 0) { source = null; }\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n };\n Zone.prototype.runGuarded = function (callback, applyThis, applyArgs, source) {\n if (applyThis === void 0) { applyThis = null; }\n if (applyArgs === void 0) { applyArgs = null; }\n if (source === void 0) { source = null; }\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n };\n Zone.prototype.runTask = function (task, applyThis, applyArgs) {\n if (task.zone != this) {\n throw new Error('A task can only be run in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n }\n // https://github.com/angular/zone.js/issues/778, sometimes eventTask\n // will run in notScheduled(canceled) state, we should not try to\n // run such kind of task but just return\n // we have to define an variable here, if not\n // typescript compiler will complain below\n var isNotScheduled = task.state === notScheduled;\n if (isNotScheduled && task.type === eventTask) {\n return;\n }\n var reEntryGuard = task.state != running;\n reEntryGuard && task._transitionTo(running, scheduled);\n task.runCount++;\n var previousTask = _currentTask;\n _currentTask = task;\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n if (task.type == macroTask && task.data && !task.data.isPeriodic) {\n task.cancelFn = null;\n }\n try {\n return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n // if the task's state is notScheduled or unknown, then it has already been cancelled\n // we should not reset the state to scheduled\n if (task.state !== notScheduled && task.state !== unknown) {\n if (task.type == eventTask || (task.data && task.data.isPeriodic)) {\n reEntryGuard && task._transitionTo(scheduled, running);\n }\n else {\n task.runCount = 0;\n this._updateTaskCount(task, -1);\n reEntryGuard &&\n task._transitionTo(notScheduled, running, notScheduled);\n }\n }\n _currentZoneFrame = _currentZoneFrame.parent;\n _currentTask = previousTask;\n }\n };\n Zone.prototype.scheduleTask = function (task) {\n if (task.zone && task.zone !== this) {\n // check if the task was rescheduled, the newZone\n // should not be the children of the original zone\n var newZone = this;\n while (newZone) {\n if (newZone === task.zone) {\n throw Error(\"can not reschedule task to \" + this\n .name + \" which is descendants of the original zone \" + task.zone.name);\n }\n newZone = newZone.parent;\n }\n }\n task._transitionTo(scheduling, notScheduled);\n var zoneDelegates = [];\n task._zoneDelegates = zoneDelegates;\n task._zone = this;\n try {\n task = this._zoneDelegate.scheduleTask(this, task);\n }\n catch (err) {\n // should set task's state to unknown when scheduleTask throw error\n // because the err may from reschedule, so the fromState maybe notScheduled\n task._transitionTo(unknown, scheduling, notScheduled);\n // TODO: @JiaLiPassion, should we check the result from handleError?\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n if (task._zoneDelegates === zoneDelegates) {\n // we have to check because internally the delegate can reschedule the task.\n this._updateTaskCount(task, 1);\n }\n if (task.state == scheduling) {\n task._transitionTo(scheduled, scheduling);\n }\n return task;\n };\n Zone.prototype.scheduleMicroTask = function (source, callback, data, customSchedule) {\n return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, null));\n };\n Zone.prototype.scheduleMacroTask = function (source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));\n };\n Zone.prototype.scheduleEventTask = function (source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));\n };\n Zone.prototype.cancelTask = function (task) {\n if (task.zone != this)\n throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n task._transitionTo(canceling, scheduled, running);\n try {\n this._zoneDelegate.cancelTask(this, task);\n }\n catch (err) {\n // if error occurs when cancelTask, transit the state to unknown\n task._transitionTo(unknown, canceling);\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n this._updateTaskCount(task, -1);\n task._transitionTo(notScheduled, canceling);\n task.runCount = 0;\n return task;\n };\n Zone.prototype._updateTaskCount = function (task, count) {\n var zoneDelegates = task._zoneDelegates;\n if (count == -1) {\n task._zoneDelegates = null;\n }\n for (var i = 0; i < zoneDelegates.length; i++) {\n zoneDelegates[i]._updateTaskCount(task.type, count);\n }\n };\n Zone.__symbol__ = __symbol__;\n return Zone;\n }());\n var DELEGATE_ZS = {\n name: '',\n onHasTask: function (delegate, _, target, hasTaskState) {\n return delegate.hasTask(target, hasTaskState);\n },\n onScheduleTask: function (delegate, _, target, task) {\n return delegate.scheduleTask(target, task);\n },\n onInvokeTask: function (delegate, _, target, task, applyThis, applyArgs) { return delegate.invokeTask(target, task, applyThis, applyArgs); },\n onCancelTask: function (delegate, _, target, task) {\n return delegate.cancelTask(target, task);\n }\n };\n var ZoneDelegate = /** @class */ (function () {\n function ZoneDelegate(zone, parentDelegate, zoneSpec) {\n this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 };\n this.zone = zone;\n this._parentDelegate = parentDelegate;\n this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);\n this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);\n this._forkCurrZone = zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate.zone);\n this._interceptZS =\n zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);\n this._interceptDlgt =\n zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);\n this._interceptCurrZone =\n zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate.zone);\n this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);\n this._invokeDlgt =\n zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);\n this._invokeCurrZone = zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate.zone);\n this._handleErrorZS =\n zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);\n this._handleErrorDlgt =\n zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);\n this._handleErrorCurrZone =\n zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate.zone);\n this._scheduleTaskZS =\n zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);\n this._scheduleTaskDlgt =\n zoneSpec && (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);\n this._scheduleTaskCurrZone =\n zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate.zone);\n this._invokeTaskZS =\n zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);\n this._invokeTaskDlgt =\n zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);\n this._invokeTaskCurrZone =\n zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate.zone);\n this._cancelTaskZS =\n zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);\n this._cancelTaskDlgt =\n zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);\n this._cancelTaskCurrZone =\n zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate.zone);\n this._hasTaskZS = null;\n this._hasTaskDlgt = null;\n this._hasTaskDlgtOwner = null;\n this._hasTaskCurrZone = null;\n var zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;\n var parentHasTask = parentDelegate && parentDelegate._hasTaskZS;\n if (zoneSpecHasTask || parentHasTask) {\n // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such\n // a case all task related interceptors must go through this ZD. We can't short circuit it.\n this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;\n this._hasTaskDlgt = parentDelegate;\n this._hasTaskDlgtOwner = this;\n this._hasTaskCurrZone = zone;\n if (!zoneSpec.onScheduleTask) {\n this._scheduleTaskZS = DELEGATE_ZS;\n this._scheduleTaskDlgt = parentDelegate;\n this._scheduleTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onInvokeTask) {\n this._invokeTaskZS = DELEGATE_ZS;\n this._invokeTaskDlgt = parentDelegate;\n this._invokeTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onCancelTask) {\n this._cancelTaskZS = DELEGATE_ZS;\n this._cancelTaskDlgt = parentDelegate;\n this._cancelTaskCurrZone = this.zone;\n }\n }\n }\n ZoneDelegate.prototype.fork = function (targetZone, zoneSpec) {\n return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) :\n new Zone(targetZone, zoneSpec);\n };\n ZoneDelegate.prototype.intercept = function (targetZone, callback, source) {\n return this._interceptZS ?\n this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) :\n callback;\n };\n ZoneDelegate.prototype.invoke = function (targetZone, callback, applyThis, applyArgs, source) {\n return this._invokeZS ?\n this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) :\n callback.apply(applyThis, applyArgs);\n };\n ZoneDelegate.prototype.handleError = function (targetZone, error) {\n return this._handleErrorZS ?\n this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) :\n true;\n };\n ZoneDelegate.prototype.scheduleTask = function (targetZone, task) {\n var returnTask = task;\n if (this._scheduleTaskZS) {\n if (this._hasTaskZS) {\n returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);\n }\n returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);\n if (!returnTask)\n returnTask = task;\n }\n else {\n if (task.scheduleFn) {\n task.scheduleFn(task);\n }\n else if (task.type == microTask) {\n scheduleMicroTask(task);\n }\n else {\n throw new Error('Task is missing scheduleFn.');\n }\n }\n return returnTask;\n };\n ZoneDelegate.prototype.invokeTask = function (targetZone, task, applyThis, applyArgs) {\n return this._invokeTaskZS ?\n this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :\n task.callback.apply(applyThis, applyArgs);\n };\n ZoneDelegate.prototype.cancelTask = function (targetZone, task) {\n var value;\n if (this._cancelTaskZS) {\n value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);\n }\n else {\n if (!task.cancelFn) {\n throw Error('Task is not cancelable');\n }\n value = task.cancelFn(task);\n }\n return value;\n };\n ZoneDelegate.prototype.hasTask = function (targetZone, isEmpty) {\n // hasTask should not throw error so other ZoneDelegate\n // can still trigger hasTask callback\n try {\n return this._hasTaskZS &&\n this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);\n }\n catch (err) {\n this.handleError(targetZone, err);\n }\n };\n ZoneDelegate.prototype._updateTaskCount = function (type, count) {\n var counts = this._taskCounts;\n var prev = counts[type];\n var next = counts[type] = prev + count;\n if (next < 0) {\n throw new Error('More tasks executed then were scheduled.');\n }\n if (prev == 0 || next == 0) {\n var isEmpty = {\n microTask: counts['microTask'] > 0,\n macroTask: counts['macroTask'] > 0,\n eventTask: counts['eventTask'] > 0,\n change: type\n };\n this.hasTask(this.zone, isEmpty);\n }\n };\n return ZoneDelegate;\n }());\n var ZoneTask = /** @class */ (function () {\n function ZoneTask(type, source, callback, options, scheduleFn, cancelFn) {\n this._zone = null;\n this.runCount = 0;\n this._zoneDelegates = null;\n this._state = 'notScheduled';\n this.type = type;\n this.source = source;\n this.data = options;\n this.scheduleFn = scheduleFn;\n this.cancelFn = cancelFn;\n this.callback = callback;\n var self = this;\n // TODO: @JiaLiPassion options should have interface\n if (type === eventTask && options && options.useG) {\n this.invoke = ZoneTask.invokeTask;\n }\n else {\n this.invoke = function () {\n return ZoneTask.invokeTask.call(global, self, this, arguments);\n };\n }\n }\n ZoneTask.invokeTask = function (task, target, args) {\n if (!task) {\n task = this;\n }\n _numberOfNestedTaskFrames++;\n try {\n task.runCount++;\n return task.zone.runTask(task, target, args);\n }\n finally {\n if (_numberOfNestedTaskFrames == 1) {\n drainMicroTaskQueue();\n }\n _numberOfNestedTaskFrames--;\n }\n };\n Object.defineProperty(ZoneTask.prototype, \"zone\", {\n get: function () {\n return this._zone;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ZoneTask.prototype, \"state\", {\n get: function () {\n return this._state;\n },\n enumerable: true,\n configurable: true\n });\n ZoneTask.prototype.cancelScheduleRequest = function () {\n this._transitionTo(notScheduled, scheduling);\n };\n ZoneTask.prototype._transitionTo = function (toState, fromState1, fromState2) {\n if (this._state === fromState1 || this._state === fromState2) {\n this._state = toState;\n if (toState == notScheduled) {\n this._zoneDelegates = null;\n }\n }\n else {\n throw new Error(this.type + \" '\" + this.source + \"': can not transition to '\" + toState + \"', expecting state '\" + fromState1 + \"'\" + (fromState2 ?\n ' or \\'' + fromState2 + '\\'' :\n '') + \", was '\" + this._state + \"'.\");\n }\n };\n ZoneTask.prototype.toString = function () {\n if (this.data && typeof this.data.handleId !== 'undefined') {\n return this.data.handleId;\n }\n else {\n return Object.prototype.toString.call(this);\n }\n };\n // add toJSON method to prevent cyclic error when\n // call JSON.stringify(zoneTask)\n ZoneTask.prototype.toJSON = function () {\n return {\n type: this.type,\n state: this.state,\n source: this.source,\n zone: this.zone.name,\n runCount: this.runCount\n };\n };\n return ZoneTask;\n }());\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// MICROTASK QUEUE\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n var symbolSetTimeout = __symbol__('setTimeout');\n var symbolPromise = __symbol__('Promise');\n var symbolThen = __symbol__('then');\n var _microTaskQueue = [];\n var _isDrainingMicrotaskQueue = false;\n var nativeMicroTaskQueuePromise;\n function scheduleMicroTask(task) {\n // if we are not running in any task, and there has not been anything scheduled\n // we must bootstrap the initial task creation by manually scheduling the drain\n if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {\n // We are not running in Task, so we need to kickstart the microtask queue.\n if (!nativeMicroTaskQueuePromise) {\n if (global[symbolPromise]) {\n nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);\n }\n }\n if (nativeMicroTaskQueuePromise) {\n nativeMicroTaskQueuePromise[symbolThen](drainMicroTaskQueue);\n }\n else {\n global[symbolSetTimeout](drainMicroTaskQueue, 0);\n }\n }\n task && _microTaskQueue.push(task);\n }\n function drainMicroTaskQueue() {\n if (!_isDrainingMicrotaskQueue) {\n _isDrainingMicrotaskQueue = true;\n while (_microTaskQueue.length) {\n var queue = _microTaskQueue;\n _microTaskQueue = [];\n for (var i = 0; i < queue.length; i++) {\n var task = queue[i];\n try {\n task.zone.runTask(task, null, null);\n }\n catch (error) {\n _api.onUnhandledError(error);\n }\n }\n }\n _api.microtaskDrainDone();\n _isDrainingMicrotaskQueue = false;\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// BOOTSTRAP\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n var NO_ZONE = { name: 'NO ZONE' };\n var notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown';\n var microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask';\n var patches = {};\n var _api = {\n symbol: __symbol__,\n currentZoneFrame: function () { return _currentZoneFrame; },\n onUnhandledError: noop,\n microtaskDrainDone: noop,\n scheduleMicroTask: scheduleMicroTask,\n showUncaughtError: function () { return !Zone[__symbol__('ignoreConsoleErrorUncaughtError')]; },\n patchEventTarget: function () { return []; },\n patchOnProperties: noop,\n patchMethod: function () { return noop; },\n bindArguments: function () { return null; },\n setNativePromise: function (NativePromise) {\n // sometimes NativePromise.resolve static function\n // is not ready yet, (such as core-js/es6.promise)\n // so we need to check here.\n if (NativePromise && typeof NativePromise.resolve === FUNCTION) {\n nativeMicroTaskQueuePromise = NativePromise.resolve(0);\n }\n },\n };\n var _currentZoneFrame = { parent: null, zone: new Zone(null, null) };\n var _currentTask = null;\n var _numberOfNestedTaskFrames = 0;\n function noop() { }\n function __symbol__(name) {\n return '__zone_symbol__' + name;\n }\n performanceMeasure('Zone', 'Zone');\n return global['Zone'] = Zone;\n})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);\n\nZone.__load_patch('ZoneAwarePromise', function (global, Zone, api) {\n var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var ObjectDefineProperty = Object.defineProperty;\n function readableObjectToString(obj) {\n if (obj && obj.toString === Object.prototype.toString) {\n var className = obj.constructor && obj.constructor.name;\n return (className ? className : '') + ': ' + JSON.stringify(obj);\n }\n return obj ? obj.toString() : Object.prototype.toString.call(obj);\n }\n var __symbol__ = api.symbol;\n var _uncaughtPromiseErrors = [];\n var symbolPromise = __symbol__('Promise');\n var symbolThen = __symbol__('then');\n var creationTrace = '__creationTrace__';\n api.onUnhandledError = function (e) {\n if (api.showUncaughtError()) {\n var rejection = e && e.rejection;\n if (rejection) {\n console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined);\n }\n else {\n console.error(e);\n }\n }\n };\n api.microtaskDrainDone = function () {\n while (_uncaughtPromiseErrors.length) {\n var _loop_1 = function () {\n var uncaughtPromiseError = _uncaughtPromiseErrors.shift();\n try {\n uncaughtPromiseError.zone.runGuarded(function () {\n throw uncaughtPromiseError;\n });\n }\n catch (error) {\n handleUnhandledRejection(error);\n }\n };\n while (_uncaughtPromiseErrors.length) {\n _loop_1();\n }\n }\n };\n var UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');\n function handleUnhandledRejection(e) {\n api.onUnhandledError(e);\n try {\n var handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];\n if (handler && typeof handler === 'function') {\n handler.call(this, e);\n }\n }\n catch (err) {\n }\n }\n function isThenable(value) {\n return value && value.then;\n }\n function forwardResolution(value) {\n return value;\n }\n function forwardRejection(rejection) {\n return ZoneAwarePromise.reject(rejection);\n }\n var symbolState = __symbol__('state');\n var symbolValue = __symbol__('value');\n var symbolFinally = __symbol__('finally');\n var symbolParentPromiseValue = __symbol__('parentPromiseValue');\n var symbolParentPromiseState = __symbol__('parentPromiseState');\n var source = 'Promise.then';\n var UNRESOLVED = null;\n var RESOLVED = true;\n var REJECTED = false;\n var REJECTED_NO_CATCH = 0;\n function makeResolver(promise, state) {\n return function (v) {\n try {\n resolvePromise(promise, state, v);\n }\n catch (err) {\n resolvePromise(promise, false, err);\n }\n // Do not return value or you will break the Promise spec.\n };\n }\n var once = function () {\n var wasCalled = false;\n return function wrapper(wrappedFunction) {\n return function () {\n if (wasCalled) {\n return;\n }\n wasCalled = true;\n wrappedFunction.apply(null, arguments);\n };\n };\n };\n var TYPE_ERROR = 'Promise resolved with itself';\n var CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');\n // Promise Resolution\n function resolvePromise(promise, state, value) {\n var onceWrapper = once();\n if (promise === value) {\n throw new TypeError(TYPE_ERROR);\n }\n if (promise[symbolState] === UNRESOLVED) {\n // should only get value.then once based on promise spec.\n var then = null;\n try {\n if (typeof value === 'object' || typeof value === 'function') {\n then = value && value.then;\n }\n }\n catch (err) {\n onceWrapper(function () {\n resolvePromise(promise, false, err);\n })();\n return promise;\n }\n // if (value instanceof ZoneAwarePromise) {\n if (state !== REJECTED && value instanceof ZoneAwarePromise &&\n value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) &&\n value[symbolState] !== UNRESOLVED) {\n clearRejectedNoCatch(value);\n resolvePromise(promise, value[symbolState], value[symbolValue]);\n }\n else if (state !== REJECTED && typeof then === 'function') {\n try {\n then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));\n }\n catch (err) {\n onceWrapper(function () {\n resolvePromise(promise, false, err);\n })();\n }\n }\n else {\n promise[symbolState] = state;\n var queue = promise[symbolValue];\n promise[symbolValue] = value;\n if (promise[symbolFinally] === symbolFinally) {\n // the promise is generated by Promise.prototype.finally \n if (state === RESOLVED) {\n // the state is resolved, should ignore the value\n // and use parent promise value\n promise[symbolState] = promise[symbolParentPromiseState];\n promise[symbolValue] = promise[symbolParentPromiseValue];\n }\n }\n // record task information in value when error occurs, so we can\n // do some additional work such as render longStackTrace\n if (state === REJECTED && value instanceof Error) {\n // check if longStackTraceZone is here\n var trace = Zone.currentTask && Zone.currentTask.data &&\n Zone.currentTask.data[creationTrace];\n if (trace) {\n // only keep the long stack trace into error when in longStackTraceZone\n ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });\n }\n }\n for (var i = 0; i < queue.length;) {\n scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);\n }\n if (queue.length == 0 && state == REJECTED) {\n promise[symbolState] = REJECTED_NO_CATCH;\n try {\n // try to print more readable error log\n throw new Error('Uncaught (in promise): ' + readableObjectToString(value) +\n (value && value.stack ? '\\n' + value.stack : ''));\n }\n catch (err) {\n var error_1 = err;\n error_1.rejection = value;\n error_1.promise = promise;\n error_1.zone = Zone.current;\n error_1.task = Zone.currentTask;\n _uncaughtPromiseErrors.push(error_1);\n api.scheduleMicroTask(); // to make sure that it is running\n }\n }\n }\n }\n // Resolving an already resolved promise is a noop.\n return promise;\n }\n var REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');\n function clearRejectedNoCatch(promise) {\n if (promise[symbolState] === REJECTED_NO_CATCH) {\n // if the promise is rejected no catch status\n // and queue.length > 0, means there is a error handler\n // here to handle the rejected promise, we should trigger\n // windows.rejectionhandled eventHandler or nodejs rejectionHandled\n // eventHandler\n try {\n var handler = Zone[REJECTION_HANDLED_HANDLER];\n if (handler && typeof handler === 'function') {\n handler.call(this, { rejection: promise[symbolValue], promise: promise });\n }\n }\n catch (err) {\n }\n promise[symbolState] = REJECTED;\n for (var i = 0; i < _uncaughtPromiseErrors.length; i++) {\n if (promise === _uncaughtPromiseErrors[i].promise) {\n _uncaughtPromiseErrors.splice(i, 1);\n }\n }\n }\n }\n function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {\n clearRejectedNoCatch(promise);\n var promiseState = promise[symbolState];\n var delegate = promiseState ?\n (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution :\n (typeof onRejected === 'function') ? onRejected : forwardRejection;\n zone.scheduleMicroTask(source, function () {\n try {\n var parentPromiseValue = promise[symbolValue];\n var isFinallyPromise = chainPromise && symbolFinally === chainPromise[symbolFinally];\n if (isFinallyPromise) {\n // if the promise is generated from finally call, keep parent promise's state and value\n chainPromise[symbolParentPromiseValue] = parentPromiseValue;\n chainPromise[symbolParentPromiseState] = promiseState;\n }\n // should not pass value to finally callback\n var value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ? [] : [parentPromiseValue]);\n resolvePromise(chainPromise, true, value);\n }\n catch (error) {\n // if error occurs, should always return this error\n resolvePromise(chainPromise, false, error);\n }\n }, chainPromise);\n }\n var ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';\n var ZoneAwarePromise = /** @class */ (function () {\n function ZoneAwarePromise(executor) {\n var promise = this;\n if (!(promise instanceof ZoneAwarePromise)) {\n throw new Error('Must be an instanceof Promise.');\n }\n promise[symbolState] = UNRESOLVED;\n promise[symbolValue] = []; // queue;\n try {\n executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED));\n }\n catch (error) {\n resolvePromise(promise, false, error);\n }\n }\n ZoneAwarePromise.toString = function () {\n return ZONE_AWARE_PROMISE_TO_STRING;\n };\n ZoneAwarePromise.resolve = function (value) {\n return resolvePromise(new this(null), RESOLVED, value);\n };\n ZoneAwarePromise.reject = function (error) {\n return resolvePromise(new this(null), REJECTED, error);\n };\n ZoneAwarePromise.race = function (values) {\n var resolve;\n var reject;\n var promise = new this(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n function onResolve(value) {\n promise && (promise = null || resolve(value));\n }\n function onReject(error) {\n promise && (promise = null || reject(error));\n }\n for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {\n var value = values_1[_i];\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n value.then(onResolve, onReject);\n }\n return promise;\n };\n ZoneAwarePromise.all = function (values) {\n var resolve;\n var reject;\n var promise = new this(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n var count = 0;\n var resolvedValues = [];\n for (var _i = 0, values_2 = values; _i < values_2.length; _i++) {\n var value = values_2[_i];\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n value.then((function (index) { return function (value) {\n resolvedValues[index] = value;\n count--;\n if (!count) {\n resolve(resolvedValues);\n }\n }; })(count), reject);\n count++;\n }\n if (!count)\n resolve(resolvedValues);\n return promise;\n };\n ZoneAwarePromise.prototype.then = function (onFulfilled, onRejected) {\n var chainPromise = new this.constructor(null);\n var zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);\n }\n return chainPromise;\n };\n ZoneAwarePromise.prototype.catch = function (onRejected) {\n return this.then(null, onRejected);\n };\n ZoneAwarePromise.prototype.finally = function (onFinally) {\n var chainPromise = new this.constructor(null);\n chainPromise[symbolFinally] = symbolFinally;\n var zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFinally, onFinally);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);\n }\n return chainPromise;\n };\n return ZoneAwarePromise;\n }());\n // Protect against aggressive optimizers dropping seemingly unused properties.\n // E.g. Closure Compiler in advanced mode.\n ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;\n ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;\n ZoneAwarePromise['race'] = ZoneAwarePromise.race;\n ZoneAwarePromise['all'] = ZoneAwarePromise.all;\n var NativePromise = global[symbolPromise] = global['Promise'];\n var ZONE_AWARE_PROMISE = Zone.__symbol__('ZoneAwarePromise');\n var desc = ObjectGetOwnPropertyDescriptor(global, 'Promise');\n if (!desc || desc.configurable) {\n desc && delete desc.writable;\n desc && delete desc.value;\n if (!desc) {\n desc = { configurable: true, enumerable: true };\n }\n desc.get = function () {\n // if we already set ZoneAwarePromise, use patched one\n // otherwise return native one.\n return global[ZONE_AWARE_PROMISE] ? global[ZONE_AWARE_PROMISE] : global[symbolPromise];\n };\n desc.set = function (NewNativePromise) {\n if (NewNativePromise === ZoneAwarePromise) {\n // if the NewNativePromise is ZoneAwarePromise\n // save to global\n global[ZONE_AWARE_PROMISE] = NewNativePromise;\n }\n else {\n // if the NewNativePromise is not ZoneAwarePromise\n // for example: after load zone.js, some library just\n // set es6-promise to global, if we set it to global\n // directly, assertZonePatched will fail and angular\n // will not loaded, so we just set the NewNativePromise\n // to global[symbolPromise], so the result is just like\n // we load ES6 Promise before zone.js\n global[symbolPromise] = NewNativePromise;\n if (!NewNativePromise.prototype[symbolThen]) {\n patchThen(NewNativePromise);\n }\n api.setNativePromise(NewNativePromise);\n }\n };\n ObjectDefineProperty(global, 'Promise', desc);\n }\n global['Promise'] = ZoneAwarePromise;\n var symbolThenPatched = __symbol__('thenPatched');\n function patchThen(Ctor) {\n var proto = Ctor.prototype;\n var prop = ObjectGetOwnPropertyDescriptor(proto, 'then');\n if (prop && (prop.writable === false || !prop.configurable)) {\n // check Ctor.prototype.then propertyDescriptor is writable or not\n // in meteor env, writable is false, we should ignore such case\n return;\n }\n var originalThen = proto.then;\n // Keep a reference to the original method.\n proto[symbolThen] = originalThen;\n Ctor.prototype.then = function (onResolve, onReject) {\n var _this = this;\n var wrapped = new ZoneAwarePromise(function (resolve, reject) {\n originalThen.call(_this, resolve, reject);\n });\n return wrapped.then(onResolve, onReject);\n };\n Ctor[symbolThenPatched] = true;\n }\n function zoneify(fn) {\n return function () {\n var resultPromise = fn.apply(this, arguments);\n if (resultPromise instanceof ZoneAwarePromise) {\n return resultPromise;\n }\n var ctor = resultPromise.constructor;\n if (!ctor[symbolThenPatched]) {\n patchThen(ctor);\n }\n return resultPromise;\n };\n }\n if (NativePromise) {\n patchThen(NativePromise);\n var fetch_1 = global['fetch'];\n if (typeof fetch_1 == 'function') {\n global['fetch'] = zoneify(fetch_1);\n }\n }\n // This is not part of public API, but it is useful for tests, so we expose it.\n Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;\n return ZoneAwarePromise;\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Suppress closure compiler errors about unknown 'Zone' variable\n * @fileoverview\n * @suppress {undefinedVars,globalThis,missingRequire}\n */\n// issue #989, to reduce bundle size, use short name\n/** Object.getOwnPropertyDescriptor */\nvar ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n/** Object.defineProperty */\nvar ObjectDefineProperty = Object.defineProperty;\n/** Object.getPrototypeOf */\nvar ObjectGetPrototypeOf = Object.getPrototypeOf;\n/** Object.create */\nvar ObjectCreate = Object.create;\n/** Array.prototype.slice */\nvar ArraySlice = Array.prototype.slice;\n/** addEventListener string const */\nvar ADD_EVENT_LISTENER_STR = 'addEventListener';\n/** removeEventListener string const */\nvar REMOVE_EVENT_LISTENER_STR = 'removeEventListener';\n/** zoneSymbol addEventListener */\nvar ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);\n/** zoneSymbol removeEventListener */\nvar ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);\n/** true string const */\nvar TRUE_STR = 'true';\n/** false string const */\nvar FALSE_STR = 'false';\n/** __zone_symbol__ string const */\nvar ZONE_SYMBOL_PREFIX = '__zone_symbol__';\nfunction wrapWithCurrentZone(callback, source) {\n return Zone.current.wrap(callback, source);\n}\nfunction scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {\n return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);\n}\nvar zoneSymbol = Zone.__symbol__;\nvar isWindowExists = typeof window !== 'undefined';\nvar internalWindow = isWindowExists ? window : undefined;\nvar _global = isWindowExists && internalWindow || typeof self === 'object' && self || global;\nvar REMOVE_ATTRIBUTE = 'removeAttribute';\nvar NULL_ON_PROP_VALUE = [null];\nfunction bindArguments(args, source) {\n for (var i = args.length - 1; i >= 0; i--) {\n if (typeof args[i] === 'function') {\n args[i] = wrapWithCurrentZone(args[i], source + '_' + i);\n }\n }\n return args;\n}\nfunction patchPrototype(prototype, fnNames) {\n var source = prototype.constructor['name'];\n var _loop_1 = function (i) {\n var name_1 = fnNames[i];\n var delegate = prototype[name_1];\n if (delegate) {\n var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name_1);\n if (!isPropertyWritable(prototypeDesc)) {\n return \"continue\";\n }\n prototype[name_1] = (function (delegate) {\n var patched = function () {\n return delegate.apply(this, bindArguments(arguments, source + '.' + name_1));\n };\n attachOriginToPatched(patched, delegate);\n return patched;\n })(delegate);\n }\n };\n for (var i = 0; i < fnNames.length; i++) {\n _loop_1(i);\n }\n}\nfunction isPropertyWritable(propertyDesc) {\n if (!propertyDesc) {\n return true;\n }\n if (propertyDesc.writable === false) {\n return false;\n }\n return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');\n}\nvar isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope);\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nvar isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]');\nvar isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);\n// we are in electron of nw, so we are both browser and nodejs\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nvar isMix = typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]' && !isWebWorker &&\n !!(isWindowExists && internalWindow['HTMLElement']);\nvar zoneSymbolEventNames = {};\nvar wrapFn = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n var eventNameSymbol = zoneSymbolEventNames[event.type];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames[event.type] = zoneSymbol('ON_PROPERTY' + event.type);\n }\n var target = this || event.target || _global;\n var listener = target[eventNameSymbol];\n var result = listener && listener.apply(this, arguments);\n if (result != undefined && !result) {\n event.preventDefault();\n }\n return result;\n};\nfunction patchProperty(obj, prop, prototype) {\n var desc = ObjectGetOwnPropertyDescriptor(obj, prop);\n if (!desc && prototype) {\n // when patch window object, use prototype to check prop exist or not\n var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);\n if (prototypeDesc) {\n desc = { enumerable: true, configurable: true };\n }\n }\n // if the descriptor not exists or is not configurable\n // just return\n if (!desc || !desc.configurable) {\n return;\n }\n // A property descriptor cannot have getter/setter and be writable\n // deleting the writable and value properties avoids this error:\n //\n // TypeError: property descriptors must not specify a value or be writable when a\n // getter or setter has been specified\n delete desc.writable;\n delete desc.value;\n var originalDescGet = desc.get;\n var originalDescSet = desc.set;\n // substr(2) cuz 'onclick' -> 'click', etc\n var eventName = prop.substr(2);\n var eventNameSymbol = zoneSymbolEventNames[eventName];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames[eventName] = zoneSymbol('ON_PROPERTY' + eventName);\n }\n desc.set = function (newValue) {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n var target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return;\n }\n var previousValue = target[eventNameSymbol];\n if (previousValue) {\n target.removeEventListener(eventName, wrapFn);\n }\n // issue #978, when onload handler was added before loading zone.js\n // we should remove it with originalDescSet\n if (originalDescSet) {\n originalDescSet.apply(target, NULL_ON_PROP_VALUE);\n }\n if (typeof newValue === 'function') {\n target[eventNameSymbol] = newValue;\n target.addEventListener(eventName, wrapFn, false);\n }\n else {\n target[eventNameSymbol] = null;\n }\n };\n // The getter would return undefined for unassigned properties but the default value of an\n // unassigned property is null\n desc.get = function () {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n var target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return null;\n }\n var listener = target[eventNameSymbol];\n if (listener) {\n return listener;\n }\n else if (originalDescGet) {\n // result will be null when use inline event attribute,\n // such as \n // because the onclick function is internal raw uncompiled handler\n // the onclick will be evaluated when first time event was triggered or\n // the property is accessed, https://github.com/angular/zone.js/issues/525\n // so we should use original native get to retrieve the handler\n var value = originalDescGet && originalDescGet.call(this);\n if (value) {\n desc.set.call(this, value);\n if (typeof target[REMOVE_ATTRIBUTE] === 'function') {\n target.removeAttribute(prop);\n }\n return value;\n }\n }\n return null;\n };\n ObjectDefineProperty(obj, prop, desc);\n}\nfunction patchOnProperties(obj, properties, prototype) {\n if (properties) {\n for (var i = 0; i < properties.length; i++) {\n patchProperty(obj, 'on' + properties[i], prototype);\n }\n }\n else {\n var onProperties = [];\n for (var prop in obj) {\n if (prop.substr(0, 2) == 'on') {\n onProperties.push(prop);\n }\n }\n for (var j = 0; j < onProperties.length; j++) {\n patchProperty(obj, onProperties[j], prototype);\n }\n }\n}\nvar originalInstanceKey = zoneSymbol('originalInstance');\n// wrap some native API on `window`\nfunction patchClass(className) {\n var OriginalClass = _global[className];\n if (!OriginalClass)\n return;\n // keep original class in global\n _global[zoneSymbol(className)] = OriginalClass;\n _global[className] = function () {\n var a = bindArguments(arguments, className);\n switch (a.length) {\n case 0:\n this[originalInstanceKey] = new OriginalClass();\n break;\n case 1:\n this[originalInstanceKey] = new OriginalClass(a[0]);\n break;\n case 2:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1]);\n break;\n case 3:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);\n break;\n case 4:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);\n break;\n default:\n throw new Error('Arg list too long.');\n }\n };\n // attach original delegate to patched function\n attachOriginToPatched(_global[className], OriginalClass);\n var instance = new OriginalClass(function () { });\n var prop;\n for (prop in instance) {\n // https://bugs.webkit.org/show_bug.cgi?id=44721\n if (className === 'XMLHttpRequest' && prop === 'responseBlob')\n continue;\n (function (prop) {\n if (typeof instance[prop] === 'function') {\n _global[className].prototype[prop] = function () {\n return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);\n };\n }\n else {\n ObjectDefineProperty(_global[className].prototype, prop, {\n set: function (fn) {\n if (typeof fn === 'function') {\n this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);\n // keep callback in wrapped function so we can\n // use it in Function.prototype.toString to return\n // the native one.\n attachOriginToPatched(this[originalInstanceKey][prop], fn);\n }\n else {\n this[originalInstanceKey][prop] = fn;\n }\n },\n get: function () {\n return this[originalInstanceKey][prop];\n }\n });\n }\n }(prop));\n }\n for (prop in OriginalClass) {\n if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {\n _global[className][prop] = OriginalClass[prop];\n }\n }\n}\nfunction patchMethod(target, name, patchFn) {\n var proto = target;\n while (proto && !proto.hasOwnProperty(name)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && target[name]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = target;\n }\n var delegateName = zoneSymbol(name);\n var delegate;\n if (proto && !(delegate = proto[delegateName])) {\n delegate = proto[delegateName] = proto[name];\n // check whether proto[name] is writable\n // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob\n var desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);\n if (isPropertyWritable(desc)) {\n var patchDelegate_1 = patchFn(delegate, delegateName, name);\n proto[name] = function () {\n return patchDelegate_1(this, arguments);\n };\n attachOriginToPatched(proto[name], delegate);\n }\n }\n return delegate;\n}\n// TODO: @JiaLiPassion, support cancel task later if necessary\nfunction patchMacroTask(obj, funcName, metaCreator) {\n var setNative = null;\n function scheduleTask(task) {\n var data = task.data;\n data.args[data.cbIdx] = function () {\n task.invoke.apply(this, arguments);\n };\n setNative.apply(data.target, data.args);\n return task;\n }\n setNative = patchMethod(obj, funcName, function (delegate) { return function (self, args) {\n var meta = metaCreator(self, args);\n if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {\n return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask, null);\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(self, args);\n }\n }; });\n}\n\nfunction attachOriginToPatched(patched, original) {\n patched[zoneSymbol('OriginalDelegate')] = original;\n}\nvar isDetectedIEOrEdge = false;\nvar ieOrEdge = false;\nfunction isIEOrEdge() {\n if (isDetectedIEOrEdge) {\n return ieOrEdge;\n }\n isDetectedIEOrEdge = true;\n try {\n var ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {\n ieOrEdge = true;\n }\n return ieOrEdge;\n }\n catch (error) {\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// override Function.prototype.toString to make zone.js patched function\n// look like native function\nZone.__load_patch('toString', function (global) {\n // patch Func.prototype.toString to let them look like native\n var originalFunctionToString = Function.prototype.toString;\n var ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');\n var PROMISE_SYMBOL = zoneSymbol('Promise');\n var ERROR_SYMBOL = zoneSymbol('Error');\n var newFunctionToString = function toString() {\n if (typeof this === 'function') {\n var originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];\n if (originalDelegate) {\n if (typeof originalDelegate === 'function') {\n return originalFunctionToString.apply(this[ORIGINAL_DELEGATE_SYMBOL], arguments);\n }\n else {\n return Object.prototype.toString.call(originalDelegate);\n }\n }\n if (this === Promise) {\n var nativePromise = global[PROMISE_SYMBOL];\n if (nativePromise) {\n return originalFunctionToString.apply(nativePromise, arguments);\n }\n }\n if (this === Error) {\n var nativeError = global[ERROR_SYMBOL];\n if (nativeError) {\n return originalFunctionToString.apply(nativeError, arguments);\n }\n }\n }\n return originalFunctionToString.apply(this, arguments);\n };\n newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;\n Function.prototype.toString = newFunctionToString;\n // patch Object.prototype.toString to let them look like native\n var originalObjectToString = Object.prototype.toString;\n var PROMISE_OBJECT_TO_STRING = '[object Promise]';\n Object.prototype.toString = function () {\n if (this instanceof Promise) {\n return PROMISE_OBJECT_TO_STRING;\n }\n return originalObjectToString.apply(this, arguments);\n };\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\n// an identifier to tell ZoneTask do not create a new invoke closure\nvar OPTIMIZED_ZONE_EVENT_TASK_DATA = {\n useG: true\n};\nvar zoneSymbolEventNames$1 = {};\nvar globalSources = {};\nvar EVENT_NAME_SYMBOL_REGX = /^__zone_symbol__(\\w+)(true|false)$/;\nvar IMMEDIATE_PROPAGATION_SYMBOL = ('__zone_symbol__propagationStopped');\nfunction patchEventTarget(_global, apis, patchOptions) {\n var ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;\n var REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;\n var LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners';\n var REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners';\n var zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);\n var ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';\n var PREPEND_EVENT_LISTENER = 'prependListener';\n var PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';\n var invokeTask = function (task, target, event) {\n // for better performance, check isRemoved which is set\n // by removeEventListener\n if (task.isRemoved) {\n return;\n }\n var delegate = task.callback;\n if (typeof delegate === 'object' && delegate.handleEvent) {\n // create the bind version of handleEvent when invoke\n task.callback = function (event) { return delegate.handleEvent(event); };\n task.originalDelegate = delegate;\n }\n // invoke static task.invoke\n task.invoke(task, target, [event]);\n var options = task.options;\n if (options && typeof options === 'object' && options.once) {\n // if options.once is true, after invoke once remove listener here\n // only browser need to do this, nodejs eventEmitter will cal removeListener\n // inside EventEmitter.once\n var delegate_1 = task.originalDelegate ? task.originalDelegate : task.callback;\n target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate_1, options);\n }\n };\n // global shared zoneAwareCallback to handle all event callback with capture = false\n var globalZoneAwareCallback = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n var target = this || event.target || _global;\n var tasks = target[zoneSymbolEventNames$1[event.type][FALSE_STR]];\n if (tasks) {\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n invokeTask(tasks[0], target, event);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n var copyTasks = tasks.slice();\n for (var i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n invokeTask(copyTasks[i], target, event);\n }\n }\n }\n };\n // global shared zoneAwareCallback to handle all event callback with capture = true\n var globalZoneAwareCaptureCallback = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n var target = this || event.target || _global;\n var tasks = target[zoneSymbolEventNames$1[event.type][TRUE_STR]];\n if (tasks) {\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n invokeTask(tasks[0], target, event);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n var copyTasks = tasks.slice();\n for (var i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n invokeTask(copyTasks[i], target, event);\n }\n }\n }\n };\n function patchEventTargetMethods(obj, patchOptions) {\n if (!obj) {\n return false;\n }\n var useGlobalCallback = true;\n if (patchOptions && patchOptions.useG !== undefined) {\n useGlobalCallback = patchOptions.useG;\n }\n var validateHandler = patchOptions && patchOptions.vh;\n var checkDuplicate = true;\n if (patchOptions && patchOptions.chkDup !== undefined) {\n checkDuplicate = patchOptions.chkDup;\n }\n var returnTarget = false;\n if (patchOptions && patchOptions.rt !== undefined) {\n returnTarget = patchOptions.rt;\n }\n var proto = obj;\n while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && obj[ADD_EVENT_LISTENER]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = obj;\n }\n if (!proto) {\n return false;\n }\n if (proto[zoneSymbolAddEventListener]) {\n return false;\n }\n // a shared global taskData to pass data for scheduleEventTask\n // so we do not need to create a new object just for pass some data\n var taskData = {};\n var nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];\n var nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] =\n proto[REMOVE_EVENT_LISTENER];\n var nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] =\n proto[LISTENERS_EVENT_LISTENER];\n var nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] =\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];\n var nativePrependEventListener;\n if (patchOptions && patchOptions.prepend) {\n nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] =\n proto[patchOptions.prepend];\n }\n var customScheduleGlobal = function () {\n // if there is already a task for the eventName + capture,\n // just return, because we use the shared globalZoneAwareCallback here.\n if (taskData.isExisting) {\n return;\n }\n return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);\n };\n var customCancelGlobal = function (task) {\n // if task is not marked as isRemoved, this call is directly\n // from Zone.prototype.cancelTask, we should remove the task\n // from tasksList of target first\n if (!task.isRemoved) {\n var symbolEventNames = zoneSymbolEventNames$1[task.eventName];\n var symbolEventName = void 0;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];\n }\n var existingTasks = symbolEventName && task.target[symbolEventName];\n if (existingTasks) {\n for (var i = 0; i < existingTasks.length; i++) {\n var existingTask = existingTasks[i];\n if (existingTask === task) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n task.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n task.allRemoved = true;\n task.target[symbolEventName] = null;\n }\n break;\n }\n }\n }\n }\n // if all tasks for the eventName + capture have gone,\n // we will really remove the global event callback,\n // if not, return\n if (!task.allRemoved) {\n return;\n }\n return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);\n };\n var customScheduleNonGlobal = function (task) {\n return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n var customSchedulePrepend = function (task) {\n return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n var customCancelNonGlobal = function (task) {\n return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);\n };\n var customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;\n var customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;\n var compareTaskCallbackVsDelegate = function (task, delegate) {\n var typeOfDelegate = typeof delegate;\n return (typeOfDelegate === 'function' && task.callback === delegate) ||\n (typeOfDelegate === 'object' && task.originalDelegate === delegate);\n };\n var compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate;\n var blackListedEvents = Zone[Zone.__symbol__('BLACK_LISTED_EVENTS')];\n var makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget, prepend) {\n if (returnTarget === void 0) { returnTarget = false; }\n if (prepend === void 0) { prepend = false; }\n return function () {\n var target = this || _global;\n var delegate = arguments[1];\n if (!delegate) {\n return nativeListener.apply(this, arguments);\n }\n // don't create the bind delegate function for handleEvent\n // case here to improve addEventListener performance\n // we will create the bind delegate when invoke\n var isHandleEvent = false;\n if (typeof delegate !== 'function') {\n if (!delegate.handleEvent) {\n return nativeListener.apply(this, arguments);\n }\n isHandleEvent = true;\n }\n if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {\n return;\n }\n var eventName = arguments[0];\n var options = arguments[2];\n if (blackListedEvents) {\n // check black list\n for (var i = 0; i < blackListedEvents.length; i++) {\n if (eventName === blackListedEvents[i]) {\n return nativeListener.apply(this, arguments);\n }\n }\n }\n var capture;\n var once = false;\n if (options === undefined) {\n capture = false;\n }\n else if (options === true) {\n capture = true;\n }\n else if (options === false) {\n capture = false;\n }\n else {\n capture = options ? !!options.capture : false;\n once = options ? !!options.once : false;\n }\n var zone = Zone.current;\n var symbolEventNames = zoneSymbolEventNames$1[eventName];\n var symbolEventName;\n if (!symbolEventNames) {\n // the code is duplicate, but I just want to get some better performance\n var falseEventName = eventName + FALSE_STR;\n var trueEventName = eventName + TRUE_STR;\n var symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames$1[eventName] = {};\n zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture;\n symbolEventName = capture ? symbolCapture : symbol;\n }\n else {\n symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n }\n var existingTasks = target[symbolEventName];\n var isExisting = false;\n if (existingTasks) {\n // already have task registered\n isExisting = true;\n if (checkDuplicate) {\n for (var i = 0; i < existingTasks.length; i++) {\n if (compare(existingTasks[i], delegate)) {\n // same callback, same capture, same event name, just return\n return;\n }\n }\n }\n }\n else {\n existingTasks = target[symbolEventName] = [];\n }\n var source;\n var constructorName = target.constructor['name'];\n var targetSource = globalSources[constructorName];\n if (targetSource) {\n source = targetSource[eventName];\n }\n if (!source) {\n source = constructorName + addSource + eventName;\n }\n // do not create a new object as task.data to pass those things\n // just use the global shared one\n taskData.options = options;\n if (once) {\n // if addEventListener with once options, we don't pass it to\n // native addEventListener, instead we keep the once setting\n // and handle ourselves.\n taskData.options.once = false;\n }\n taskData.target = target;\n taskData.capture = capture;\n taskData.eventName = eventName;\n taskData.isExisting = isExisting;\n var data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : null;\n // keep taskData into data to allow onScheduleEventTask to access the task information\n if (data) {\n data.taskData = taskData;\n }\n var task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);\n // should clear taskData.target to avoid memory leak\n // issue, https://github.com/angular/angular/issues/20442\n taskData.target = null;\n // need to clear up taskData because it is a global object\n if (data) {\n data.taskData = null;\n }\n // have to save those information to task in case\n // application may call task.zone.cancelTask() directly\n if (once) {\n options.once = true;\n }\n task.options = options;\n task.target = target;\n task.capture = capture;\n task.eventName = eventName;\n if (isHandleEvent) {\n // save original delegate for compare to check duplicate\n task.originalDelegate = delegate;\n }\n if (!prepend) {\n existingTasks.push(task);\n }\n else {\n existingTasks.unshift(task);\n }\n if (returnTarget) {\n return target;\n }\n };\n };\n proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);\n if (nativePrependEventListener) {\n proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);\n }\n proto[REMOVE_EVENT_LISTENER] = function () {\n var target = this || _global;\n var eventName = arguments[0];\n var options = arguments[2];\n var capture;\n if (options === undefined) {\n capture = false;\n }\n else if (options === true) {\n capture = true;\n }\n else if (options === false) {\n capture = false;\n }\n else {\n capture = options ? !!options.capture : false;\n }\n var delegate = arguments[1];\n if (!delegate) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n if (validateHandler &&\n !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {\n return;\n }\n var symbolEventNames = zoneSymbolEventNames$1[eventName];\n var symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n }\n var existingTasks = symbolEventName && target[symbolEventName];\n if (existingTasks) {\n for (var i = 0; i < existingTasks.length; i++) {\n var existingTask = existingTasks[i];\n if (compare(existingTask, delegate)) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n existingTask.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n existingTask.allRemoved = true;\n target[symbolEventName] = null;\n }\n existingTask.zone.cancelTask(existingTask);\n if (returnTarget) {\n return target;\n }\n return;\n }\n }\n }\n // issue 930, didn't find the event name or callback\n // from zone kept existingTasks, the callback maybe\n // added outside of zone, we need to call native removeEventListener\n // to try to remove it.\n return nativeRemoveEventListener.apply(this, arguments);\n };\n proto[LISTENERS_EVENT_LISTENER] = function () {\n var target = this || _global;\n var eventName = arguments[0];\n var listeners = [];\n var tasks = findEventTasks(target, eventName);\n for (var i = 0; i < tasks.length; i++) {\n var task = tasks[i];\n var delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n listeners.push(delegate);\n }\n return listeners;\n };\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {\n var target = this || _global;\n var eventName = arguments[0];\n if (!eventName) {\n var keys = Object.keys(target);\n for (var i = 0; i < keys.length; i++) {\n var prop = keys[i];\n var match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n var evtName = match && match[1];\n // in nodejs EventEmitter, removeListener event is\n // used for monitoring the removeListener call,\n // so just keep removeListener eventListener until\n // all other eventListeners are removed\n if (evtName && evtName !== 'removeListener') {\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);\n }\n }\n // remove removeListener listener finally\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');\n }\n else {\n var symbolEventNames = zoneSymbolEventNames$1[eventName];\n if (symbolEventNames) {\n var symbolEventName = symbolEventNames[FALSE_STR];\n var symbolCaptureEventName = symbolEventNames[TRUE_STR];\n var tasks = target[symbolEventName];\n var captureTasks = target[symbolCaptureEventName];\n if (tasks) {\n var removeTasks = tasks.slice();\n for (var i = 0; i < removeTasks.length; i++) {\n var task = removeTasks[i];\n var delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n if (captureTasks) {\n var removeTasks = captureTasks.slice();\n for (var i = 0; i < removeTasks.length; i++) {\n var task = removeTasks[i];\n var delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n }\n }\n if (returnTarget) {\n return this;\n }\n };\n // for native toString patch\n attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);\n attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);\n if (nativeRemoveAllListeners) {\n attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);\n }\n if (nativeListeners) {\n attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);\n }\n return true;\n }\n var results = [];\n for (var i = 0; i < apis.length; i++) {\n results[i] = patchEventTargetMethods(apis[i], patchOptions);\n }\n return results;\n}\nfunction findEventTasks(target, eventName) {\n var foundTasks = [];\n for (var prop in target) {\n var match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n var evtName = match && match[1];\n if (evtName && (!eventName || evtName === eventName)) {\n var tasks = target[prop];\n if (tasks) {\n for (var i = 0; i < tasks.length; i++) {\n foundTasks.push(tasks[i]);\n }\n }\n }\n }\n return foundTasks;\n}\nfunction patchEventPrototype(global, api) {\n var Event = global['Event'];\n if (Event && Event.prototype) {\n api.patchMethod(Event.prototype, 'stopImmediatePropagation', function (delegate) { return function (self, args) {\n self[IMMEDIATE_PROPAGATION_SYMBOL] = true;\n // we need to call the native stopImmediatePropagation\n // in case in some hybrid application, some part of\n // application will be controlled by zone, some are not\n delegate && delegate.apply(self, args);\n }; });\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nvar taskSymbol = zoneSymbol('zoneTask');\nfunction patchTimer(window, setName, cancelName, nameSuffix) {\n var setNative = null;\n var clearNative = null;\n setName += nameSuffix;\n cancelName += nameSuffix;\n var tasksByHandleId = {};\n function scheduleTask(task) {\n var data = task.data;\n function timer() {\n try {\n task.invoke.apply(this, arguments);\n }\n finally {\n // issue-934, task will be cancelled\n // even it is a periodic task such as\n // setInterval\n if (!(task.data && task.data.isPeriodic)) {\n if (typeof data.handleId === 'number') {\n // in non-nodejs env, we remove timerId\n // from local cache\n delete tasksByHandleId[data.handleId];\n }\n else if (data.handleId) {\n // Node returns complex objects as handleIds\n // we remove task reference from timer object\n data.handleId[taskSymbol] = null;\n }\n }\n }\n }\n data.args[0] = timer;\n data.handleId = setNative.apply(window, data.args);\n return task;\n }\n function clearTask(task) {\n return clearNative(task.data.handleId);\n }\n setNative =\n patchMethod(window, setName, function (delegate) { return function (self, args) {\n if (typeof args[0] === 'function') {\n var options = {\n handleId: null,\n isPeriodic: nameSuffix === 'Interval',\n delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 : null,\n args: args\n };\n var task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);\n if (!task) {\n return task;\n }\n // Node.js must additionally support the ref and unref functions.\n var handle = task.data.handleId;\n if (typeof handle === 'number') {\n // for non nodejs env, we save handleId: task\n // mapping in local cache for clearTimeout\n tasksByHandleId[handle] = task;\n }\n else if (handle) {\n // for nodejs env, we save task\n // reference in timerId Object for clearTimeout\n handle[taskSymbol] = task;\n }\n // check whether handle is null, because some polyfill or browser\n // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame\n if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' &&\n typeof handle.unref === 'function') {\n task.ref = handle.ref.bind(handle);\n task.unref = handle.unref.bind(handle);\n }\n if (typeof handle === 'number' || handle) {\n return handle;\n }\n return task;\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(window, args);\n }\n }; });\n clearNative =\n patchMethod(window, cancelName, function (delegate) { return function (self, args) {\n var id = args[0];\n var task;\n if (typeof id === 'number') {\n // non nodejs env.\n task = tasksByHandleId[id];\n }\n else {\n // nodejs env.\n task = id && id[taskSymbol];\n // other environments.\n if (!task) {\n task = id;\n }\n }\n if (task && typeof task.type === 'string') {\n if (task.state !== 'notScheduled' &&\n (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {\n if (typeof id === 'number') {\n delete tasksByHandleId[id];\n }\n else if (id) {\n id[taskSymbol] = null;\n }\n // Do not cancel already canceled functions\n task.zone.cancelTask(task);\n }\n }\n else {\n // cause an error by calling it directly.\n delegate.apply(window, args);\n }\n }; });\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/*\n * This is necessary for Chrome and Chrome mobile, to enable\n * things like redefining `createdCallback` on an element.\n */\nvar _defineProperty = Object[zoneSymbol('defineProperty')] = Object.defineProperty;\nvar _getOwnPropertyDescriptor = Object[zoneSymbol('getOwnPropertyDescriptor')] =\n Object.getOwnPropertyDescriptor;\nvar _create = Object.create;\nvar unconfigurablesKey = zoneSymbol('unconfigurables');\nfunction propertyPatch() {\n Object.defineProperty = function (obj, prop, desc) {\n if (isUnconfigurable(obj, prop)) {\n throw new TypeError('Cannot assign to read only property \\'' + prop + '\\' of ' + obj);\n }\n var originalConfigurableFlag = desc.configurable;\n if (prop !== 'prototype') {\n desc = rewriteDescriptor(obj, prop, desc);\n }\n return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);\n };\n Object.defineProperties = function (obj, props) {\n Object.keys(props).forEach(function (prop) {\n Object.defineProperty(obj, prop, props[prop]);\n });\n return obj;\n };\n Object.create = function (obj, proto) {\n if (typeof proto === 'object' && !Object.isFrozen(proto)) {\n Object.keys(proto).forEach(function (prop) {\n proto[prop] = rewriteDescriptor(obj, prop, proto[prop]);\n });\n }\n return _create(obj, proto);\n };\n Object.getOwnPropertyDescriptor = function (obj, prop) {\n var desc = _getOwnPropertyDescriptor(obj, prop);\n if (isUnconfigurable(obj, prop)) {\n desc.configurable = false;\n }\n return desc;\n };\n}\nfunction _redefineProperty(obj, prop, desc) {\n var originalConfigurableFlag = desc.configurable;\n desc = rewriteDescriptor(obj, prop, desc);\n return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);\n}\nfunction isUnconfigurable(obj, prop) {\n return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop];\n}\nfunction rewriteDescriptor(obj, prop, desc) {\n // issue-927, if the desc is frozen, don't try to change the desc\n if (!Object.isFrozen(desc)) {\n desc.configurable = true;\n }\n if (!desc.configurable) {\n // issue-927, if the obj is frozen, don't try to set the desc to obj\n if (!obj[unconfigurablesKey] && !Object.isFrozen(obj)) {\n _defineProperty(obj, unconfigurablesKey, { writable: true, value: {} });\n }\n if (obj[unconfigurablesKey]) {\n obj[unconfigurablesKey][prop] = true;\n }\n }\n return desc;\n}\nfunction _tryDefineProperty(obj, prop, desc, originalConfigurableFlag) {\n try {\n return _defineProperty(obj, prop, desc);\n }\n catch (error) {\n if (desc.configurable) {\n // In case of errors, when the configurable flag was likely set by rewriteDescriptor(), let's\n // retry with the original flag value\n if (typeof originalConfigurableFlag == 'undefined') {\n delete desc.configurable;\n }\n else {\n desc.configurable = originalConfigurableFlag;\n }\n try {\n return _defineProperty(obj, prop, desc);\n }\n catch (error) {\n var descJson = null;\n try {\n descJson = JSON.stringify(desc);\n }\n catch (error) {\n descJson = desc.toString();\n }\n console.log(\"Attempting to configure '\" + prop + \"' with descriptor '\" + descJson + \"' on object '\" + obj + \"' and got error, giving up: \" + error);\n }\n }\n else {\n throw error;\n }\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// we have to patch the instance since the proto is non-configurable\nfunction apply(api, _global) {\n var WS = _global.WebSocket;\n // On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener\n // On older Chrome, no need since EventTarget was already patched\n if (!_global.EventTarget) {\n patchEventTarget(_global, [WS.prototype]);\n }\n _global.WebSocket = function (x, y) {\n var socket = arguments.length > 1 ? new WS(x, y) : new WS(x);\n var proxySocket;\n var proxySocketProto;\n // Safari 7.0 has non-configurable own 'onmessage' and friends properties on the socket instance\n var onmessageDesc = ObjectGetOwnPropertyDescriptor(socket, 'onmessage');\n if (onmessageDesc && onmessageDesc.configurable === false) {\n proxySocket = ObjectCreate(socket);\n // socket have own property descriptor 'onopen', 'onmessage', 'onclose', 'onerror'\n // but proxySocket not, so we will keep socket as prototype and pass it to\n // patchOnProperties method\n proxySocketProto = socket;\n [ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR, 'send', 'close'].forEach(function (propName) {\n proxySocket[propName] = function () {\n var args = ArraySlice.call(arguments);\n if (propName === ADD_EVENT_LISTENER_STR || propName === REMOVE_EVENT_LISTENER_STR) {\n var eventName = args.length > 0 ? args[0] : undefined;\n if (eventName) {\n var propertySymbol = Zone.__symbol__('ON_PROPERTY' + eventName);\n socket[propertySymbol] = proxySocket[propertySymbol];\n }\n }\n return socket[propName].apply(socket, args);\n };\n });\n }\n else {\n // we can patch the real socket\n proxySocket = socket;\n }\n patchOnProperties(proxySocket, ['close', 'error', 'message', 'open'], proxySocketProto);\n return proxySocket;\n };\n var globalWebSocket = _global['WebSocket'];\n for (var prop in WS) {\n globalWebSocket[prop] = WS[prop];\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @fileoverview\n * @suppress {globalThis}\n */\nvar globalEventHandlersEventNames = [\n 'abort',\n 'animationcancel',\n 'animationend',\n 'animationiteration',\n 'auxclick',\n 'beforeinput',\n 'blur',\n 'cancel',\n 'canplay',\n 'canplaythrough',\n 'change',\n 'compositionstart',\n 'compositionupdate',\n 'compositionend',\n 'cuechange',\n 'click',\n 'close',\n 'contextmenu',\n 'curechange',\n 'dblclick',\n 'drag',\n 'dragend',\n 'dragenter',\n 'dragexit',\n 'dragleave',\n 'dragover',\n 'drop',\n 'durationchange',\n 'emptied',\n 'ended',\n 'error',\n 'focus',\n 'focusin',\n 'focusout',\n 'gotpointercapture',\n 'input',\n 'invalid',\n 'keydown',\n 'keypress',\n 'keyup',\n 'load',\n 'loadstart',\n 'loadeddata',\n 'loadedmetadata',\n 'lostpointercapture',\n 'mousedown',\n 'mouseenter',\n 'mouseleave',\n 'mousemove',\n 'mouseout',\n 'mouseover',\n 'mouseup',\n 'mousewheel',\n 'orientationchange',\n 'pause',\n 'play',\n 'playing',\n 'pointercancel',\n 'pointerdown',\n 'pointerenter',\n 'pointerleave',\n 'pointerlockchange',\n 'mozpointerlockchange',\n 'webkitpointerlockerchange',\n 'pointerlockerror',\n 'mozpointerlockerror',\n 'webkitpointerlockerror',\n 'pointermove',\n 'pointout',\n 'pointerover',\n 'pointerup',\n 'progress',\n 'ratechange',\n 'reset',\n 'resize',\n 'scroll',\n 'seeked',\n 'seeking',\n 'select',\n 'selectionchange',\n 'selectstart',\n 'show',\n 'sort',\n 'stalled',\n 'submit',\n 'suspend',\n 'timeupdate',\n 'volumechange',\n 'touchcancel',\n 'touchmove',\n 'touchstart',\n 'touchend',\n 'transitioncancel',\n 'transitionend',\n 'waiting',\n 'wheel'\n];\nvar documentEventNames = [\n 'afterscriptexecute', 'beforescriptexecute', 'DOMContentLoaded', 'fullscreenchange',\n 'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange', 'fullscreenerror',\n 'mozfullscreenerror', 'webkitfullscreenerror', 'msfullscreenerror', 'readystatechange',\n 'visibilitychange'\n];\nvar windowEventNames = [\n 'absolutedeviceorientation',\n 'afterinput',\n 'afterprint',\n 'appinstalled',\n 'beforeinstallprompt',\n 'beforeprint',\n 'beforeunload',\n 'devicelight',\n 'devicemotion',\n 'deviceorientation',\n 'deviceorientationabsolute',\n 'deviceproximity',\n 'hashchange',\n 'languagechange',\n 'message',\n 'mozbeforepaint',\n 'offline',\n 'online',\n 'paint',\n 'pageshow',\n 'pagehide',\n 'popstate',\n 'rejectionhandled',\n 'storage',\n 'unhandledrejection',\n 'unload',\n 'userproximity',\n 'vrdisplyconnected',\n 'vrdisplaydisconnected',\n 'vrdisplaypresentchange'\n];\nvar htmlElementEventNames = [\n 'beforecopy', 'beforecut', 'beforepaste', 'copy', 'cut', 'paste', 'dragstart', 'loadend',\n 'animationstart', 'search', 'transitionrun', 'transitionstart', 'webkitanimationend',\n 'webkitanimationiteration', 'webkitanimationstart', 'webkittransitionend'\n];\nvar mediaElementEventNames = ['encrypted', 'waitingforkey', 'msneedkey', 'mozinterruptbegin', 'mozinterruptend'];\nvar ieElementEventNames = [\n 'activate',\n 'afterupdate',\n 'ariarequest',\n 'beforeactivate',\n 'beforedeactivate',\n 'beforeeditfocus',\n 'beforeupdate',\n 'cellchange',\n 'controlselect',\n 'dataavailable',\n 'datasetchanged',\n 'datasetcomplete',\n 'errorupdate',\n 'filterchange',\n 'layoutcomplete',\n 'losecapture',\n 'move',\n 'moveend',\n 'movestart',\n 'propertychange',\n 'resizeend',\n 'resizestart',\n 'rowenter',\n 'rowexit',\n 'rowsdelete',\n 'rowsinserted',\n 'command',\n 'compassneedscalibration',\n 'deactivate',\n 'help',\n 'mscontentzoom',\n 'msmanipulationstatechanged',\n 'msgesturechange',\n 'msgesturedoubletap',\n 'msgestureend',\n 'msgesturehold',\n 'msgesturestart',\n 'msgesturetap',\n 'msgotpointercapture',\n 'msinertiastart',\n 'mslostpointercapture',\n 'mspointercancel',\n 'mspointerdown',\n 'mspointerenter',\n 'mspointerhover',\n 'mspointerleave',\n 'mspointermove',\n 'mspointerout',\n 'mspointerover',\n 'mspointerup',\n 'pointerout',\n 'mssitemodejumplistitemremoved',\n 'msthumbnailclick',\n 'stop',\n 'storagecommit'\n];\nvar webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror'];\nvar formEventNames = ['autocomplete', 'autocompleteerror'];\nvar detailEventNames = ['toggle'];\nvar frameEventNames = ['load'];\nvar frameSetEventNames = ['blur', 'error', 'focus', 'load', 'resize', 'scroll', 'messageerror'];\nvar marqueeEventNames = ['bounce', 'finish', 'start'];\nvar XMLHttpRequestEventNames = [\n 'loadstart', 'progress', 'abort', 'error', 'load', 'progress', 'timeout', 'loadend',\n 'readystatechange'\n];\nvar IDBIndexEventNames = ['upgradeneeded', 'complete', 'abort', 'success', 'error', 'blocked', 'versionchange', 'close'];\nvar websocketEventNames = ['close', 'error', 'open', 'message'];\nvar workerEventNames = ['error', 'message'];\nvar eventNames = globalEventHandlersEventNames.concat(webglEventNames, formEventNames, detailEventNames, documentEventNames, windowEventNames, htmlElementEventNames, ieElementEventNames);\nfunction filterProperties(target, onProperties, ignoreProperties) {\n if (!ignoreProperties) {\n return onProperties;\n }\n var tip = ignoreProperties.filter(function (ip) { return ip.target === target; });\n if (!tip || tip.length === 0) {\n return onProperties;\n }\n var targetIgnoreProperties = tip[0].ignoreProperties;\n return onProperties.filter(function (op) { return targetIgnoreProperties.indexOf(op) === -1; });\n}\nfunction patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {\n // check whether target is available, sometimes target will be undefined\n // because different browser or some 3rd party plugin.\n if (!target) {\n return;\n }\n var filteredProperties = filterProperties(target, onProperties, ignoreProperties);\n patchOnProperties(target, filteredProperties, prototype);\n}\nfunction propertyDescriptorPatch(api, _global) {\n if (isNode && !isMix) {\n return;\n }\n var supportsWebSocket = typeof WebSocket !== 'undefined';\n if (canPatchViaPropertyDescriptor()) {\n var ignoreProperties = _global.__Zone_ignore_on_properties;\n // for browsers that we can patch the descriptor: Chrome & Firefox\n if (isBrowser) {\n var internalWindow = window;\n // in IE/Edge, onProp not exist in window object, but in WindowPrototype\n // so we need to pass WindowPrototype to check onProp exist or not\n patchFilteredProperties(internalWindow, eventNames.concat(['messageerror']), ignoreProperties, ObjectGetPrototypeOf(internalWindow));\n patchFilteredProperties(Document.prototype, eventNames, ignoreProperties);\n if (typeof internalWindow['SVGElement'] !== 'undefined') {\n patchFilteredProperties(internalWindow['SVGElement'].prototype, eventNames, ignoreProperties);\n }\n patchFilteredProperties(Element.prototype, eventNames, ignoreProperties);\n patchFilteredProperties(HTMLElement.prototype, eventNames, ignoreProperties);\n patchFilteredProperties(HTMLMediaElement.prototype, mediaElementEventNames, ignoreProperties);\n patchFilteredProperties(HTMLFrameSetElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);\n patchFilteredProperties(HTMLBodyElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);\n patchFilteredProperties(HTMLFrameElement.prototype, frameEventNames, ignoreProperties);\n patchFilteredProperties(HTMLIFrameElement.prototype, frameEventNames, ignoreProperties);\n var HTMLMarqueeElement_1 = internalWindow['HTMLMarqueeElement'];\n if (HTMLMarqueeElement_1) {\n patchFilteredProperties(HTMLMarqueeElement_1.prototype, marqueeEventNames, ignoreProperties);\n }\n var Worker_1 = internalWindow['Worker'];\n if (Worker_1) {\n patchFilteredProperties(Worker_1.prototype, workerEventNames, ignoreProperties);\n }\n }\n patchFilteredProperties(XMLHttpRequest.prototype, XMLHttpRequestEventNames, ignoreProperties);\n var XMLHttpRequestEventTarget = _global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget) {\n patchFilteredProperties(XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype, XMLHttpRequestEventNames, ignoreProperties);\n }\n if (typeof IDBIndex !== 'undefined') {\n patchFilteredProperties(IDBIndex.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBRequest.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBOpenDBRequest.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBDatabase.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBTransaction.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBCursor.prototype, IDBIndexEventNames, ignoreProperties);\n }\n if (supportsWebSocket) {\n patchFilteredProperties(WebSocket.prototype, websocketEventNames, ignoreProperties);\n }\n }\n else {\n // Safari, Android browsers (Jelly Bean)\n patchViaCapturingAllTheEvents();\n patchClass('XMLHttpRequest');\n if (supportsWebSocket) {\n apply(api, _global);\n }\n }\n}\nfunction canPatchViaPropertyDescriptor() {\n if ((isBrowser || isMix) && !ObjectGetOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') &&\n typeof Element !== 'undefined') {\n // WebKit https://bugs.webkit.org/show_bug.cgi?id=134364\n // IDL interface attributes are not configurable\n var desc = ObjectGetOwnPropertyDescriptor(Element.prototype, 'onclick');\n if (desc && !desc.configurable)\n return false;\n }\n var ON_READY_STATE_CHANGE = 'onreadystatechange';\n var XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n var xhrDesc = ObjectGetOwnPropertyDescriptor(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE);\n // add enumerable and configurable here because in opera\n // by default XMLHttpRequest.prototype.onreadystatechange is undefined\n // without adding enumerable and configurable will cause onreadystatechange\n // non-configurable\n // and if XMLHttpRequest.prototype.onreadystatechange is undefined,\n // we should set a real desc instead a fake one\n if (xhrDesc) {\n ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {\n enumerable: true,\n configurable: true,\n get: function () {\n return true;\n }\n });\n var req = new XMLHttpRequest();\n var result = !!req.onreadystatechange;\n // restore original desc\n ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, xhrDesc || {});\n return result;\n }\n else {\n var SYMBOL_FAKE_ONREADYSTATECHANGE_1 = zoneSymbol('fake');\n ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {\n enumerable: true,\n configurable: true,\n get: function () {\n return this[SYMBOL_FAKE_ONREADYSTATECHANGE_1];\n },\n set: function (value) {\n this[SYMBOL_FAKE_ONREADYSTATECHANGE_1] = value;\n }\n });\n var req = new XMLHttpRequest();\n var detectFunc = function () { };\n req.onreadystatechange = detectFunc;\n var result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc;\n req.onreadystatechange = null;\n return result;\n }\n}\nvar unboundKey = zoneSymbol('unbound');\n// Whenever any eventListener fires, we check the eventListener target and all parents\n// for `onwhatever` properties and replace them with zone-bound functions\n// - Chrome (for now)\nfunction patchViaCapturingAllTheEvents() {\n var _loop_1 = function (i) {\n var property = eventNames[i];\n var onproperty = 'on' + property;\n self.addEventListener(property, function (event) {\n var elt = event.target, bound, source;\n if (elt) {\n source = elt.constructor['name'] + '.' + onproperty;\n }\n else {\n source = 'unknown.' + onproperty;\n }\n while (elt) {\n if (elt[onproperty] && !elt[onproperty][unboundKey]) {\n bound = wrapWithCurrentZone(elt[onproperty], source);\n bound[unboundKey] = elt[onproperty];\n elt[onproperty] = bound;\n }\n elt = elt.parentElement;\n }\n }, true);\n };\n for (var i = 0; i < eventNames.length; i++) {\n _loop_1(i);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction eventTargetPatch(_global, api) {\n var WTF_ISSUE_555 = 'Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video';\n var NO_EVENT_TARGET = 'ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket'\n .split(',');\n var EVENT_TARGET = 'EventTarget';\n var apis = [];\n var isWtf = _global['wtf'];\n var WTF_ISSUE_555_ARRAY = WTF_ISSUE_555.split(',');\n if (isWtf) {\n // Workaround for: https://github.com/google/tracing-framework/issues/555\n apis = WTF_ISSUE_555_ARRAY.map(function (v) { return 'HTML' + v + 'Element'; }).concat(NO_EVENT_TARGET);\n }\n else if (_global[EVENT_TARGET]) {\n apis.push(EVENT_TARGET);\n }\n else {\n // Note: EventTarget is not available in all browsers,\n // if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget\n apis = NO_EVENT_TARGET;\n }\n var isDisableIECheck = _global['__Zone_disable_IE_check'] || false;\n var isEnableCrossContextCheck = _global['__Zone_enable_cross_context_check'] || false;\n var ieOrEdge = isIEOrEdge();\n var ADD_EVENT_LISTENER_SOURCE = '.addEventListener:';\n var FUNCTION_WRAPPER = '[object FunctionWrapper]';\n var BROWSER_TOOLS = 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }';\n // predefine all __zone_symbol__ + eventName + true/false string\n for (var i = 0; i < eventNames.length; i++) {\n var eventName = eventNames[i];\n var falseEventName = eventName + FALSE_STR;\n var trueEventName = eventName + TRUE_STR;\n var symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames$1[eventName] = {};\n zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture;\n }\n // predefine all task.source string\n for (var i = 0; i < WTF_ISSUE_555.length; i++) {\n var target = WTF_ISSUE_555_ARRAY[i];\n var targets = globalSources[target] = {};\n for (var j = 0; j < eventNames.length; j++) {\n var eventName = eventNames[j];\n targets[eventName] = target + ADD_EVENT_LISTENER_SOURCE + eventName;\n }\n }\n var checkIEAndCrossContext = function (nativeDelegate, delegate, target, args) {\n if (!isDisableIECheck && ieOrEdge) {\n if (isEnableCrossContextCheck) {\n try {\n var testString = delegate.toString();\n if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {\n nativeDelegate.apply(target, args);\n return false;\n }\n }\n catch (error) {\n nativeDelegate.apply(target, args);\n return false;\n }\n }\n else {\n var testString = delegate.toString();\n if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {\n nativeDelegate.apply(target, args);\n return false;\n }\n }\n }\n else if (isEnableCrossContextCheck) {\n try {\n delegate.toString();\n }\n catch (error) {\n nativeDelegate.apply(target, args);\n return false;\n }\n }\n return true;\n };\n var apiTypes = [];\n for (var i = 0; i < apis.length; i++) {\n var type = _global[apis[i]];\n apiTypes.push(type && type.prototype);\n }\n // vh is validateHandler to check event handler\n // is valid or not(for security check)\n patchEventTarget(_global, apiTypes, { vh: checkIEAndCrossContext });\n api.patchEventTarget = patchEventTarget;\n return true;\n}\nfunction patchEvent(global, api) {\n patchEventPrototype(global, api);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction registerElementPatch(_global) {\n if ((!isBrowser && !isMix) || !('registerElement' in _global.document)) {\n return;\n }\n var _registerElement = document.registerElement;\n var callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];\n document.registerElement = function (name, opts) {\n if (opts && opts.prototype) {\n callbacks.forEach(function (callback) {\n var source = 'Document.registerElement::' + callback;\n var prototype = opts.prototype;\n if (prototype.hasOwnProperty(callback)) {\n var descriptor = ObjectGetOwnPropertyDescriptor(prototype, callback);\n if (descriptor && descriptor.value) {\n descriptor.value = wrapWithCurrentZone(descriptor.value, source);\n _redefineProperty(opts.prototype, callback, descriptor);\n }\n else {\n prototype[callback] = wrapWithCurrentZone(prototype[callback], source);\n }\n }\n else if (prototype[callback]) {\n prototype[callback] = wrapWithCurrentZone(prototype[callback], source);\n }\n });\n }\n return _registerElement.call(document, name, opts);\n };\n attachOriginToPatched(document.registerElement, _registerElement);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nZone.__load_patch('util', function (global, Zone, api) {\n api.patchOnProperties = patchOnProperties;\n api.patchMethod = patchMethod;\n api.bindArguments = bindArguments;\n});\nZone.__load_patch('timers', function (global) {\n var set = 'set';\n var clear = 'clear';\n patchTimer(global, set, clear, 'Timeout');\n patchTimer(global, set, clear, 'Interval');\n patchTimer(global, set, clear, 'Immediate');\n});\nZone.__load_patch('requestAnimationFrame', function (global) {\n patchTimer(global, 'request', 'cancel', 'AnimationFrame');\n patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');\n patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');\n});\nZone.__load_patch('blocking', function (global, Zone) {\n var blockingMethods = ['alert', 'prompt', 'confirm'];\n for (var i = 0; i < blockingMethods.length; i++) {\n var name_1 = blockingMethods[i];\n patchMethod(global, name_1, function (delegate, symbol, name) {\n return function (s, args) {\n return Zone.current.run(delegate, global, args, name);\n };\n });\n }\n});\nZone.__load_patch('EventTarget', function (global, Zone, api) {\n // load blackListEvents from global\n var SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');\n if (global[SYMBOL_BLACK_LISTED_EVENTS]) {\n Zone[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_BLACK_LISTED_EVENTS];\n }\n patchEvent(global, api);\n eventTargetPatch(global, api);\n // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener\n var XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {\n api.patchEventTarget(global, [XMLHttpRequestEventTarget.prototype]);\n }\n patchClass('MutationObserver');\n patchClass('WebKitMutationObserver');\n patchClass('IntersectionObserver');\n patchClass('FileReader');\n});\nZone.__load_patch('on_property', function (global, Zone, api) {\n propertyDescriptorPatch(api, global);\n propertyPatch();\n registerElementPatch(global);\n});\nZone.__load_patch('canvas', function (global) {\n var HTMLCanvasElement = global['HTMLCanvasElement'];\n if (typeof HTMLCanvasElement !== 'undefined' && HTMLCanvasElement.prototype &&\n HTMLCanvasElement.prototype.toBlob) {\n patchMacroTask(HTMLCanvasElement.prototype, 'toBlob', function (self, args) {\n return { name: 'HTMLCanvasElement.toBlob', target: self, cbIdx: 0, args: args };\n });\n }\n});\nZone.__load_patch('XHR', function (global, Zone) {\n // Treat XMLHttpRequest as a macrotask.\n patchXHR(global);\n var XHR_TASK = zoneSymbol('xhrTask');\n var XHR_SYNC = zoneSymbol('xhrSync');\n var XHR_LISTENER = zoneSymbol('xhrListener');\n var XHR_SCHEDULED = zoneSymbol('xhrScheduled');\n var XHR_URL = zoneSymbol('xhrURL');\n function patchXHR(window) {\n var XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n function findPendingTask(target) {\n return target[XHR_TASK];\n }\n var oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n var oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n if (!oriAddListener) {\n var XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget) {\n var XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype;\n oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n }\n var READY_STATE_CHANGE = 'readystatechange';\n var SCHEDULED = 'scheduled';\n function scheduleTask(task) {\n XMLHttpRequest[XHR_SCHEDULED] = false;\n var data = task.data;\n var target = data.target;\n // remove existing event listener\n var listener = target[XHR_LISTENER];\n if (!oriAddListener) {\n oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n if (listener) {\n oriRemoveListener.call(target, READY_STATE_CHANGE, listener);\n }\n var newListener = target[XHR_LISTENER] = function () {\n if (target.readyState === target.DONE) {\n // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with\n // readyState=4 multiple times, so we need to check task state here\n if (!data.aborted && XMLHttpRequest[XHR_SCHEDULED] && task.state === SCHEDULED) {\n task.invoke();\n }\n }\n };\n oriAddListener.call(target, READY_STATE_CHANGE, newListener);\n var storedTask = target[XHR_TASK];\n if (!storedTask) {\n target[XHR_TASK] = task;\n }\n sendNative.apply(target, data.args);\n XMLHttpRequest[XHR_SCHEDULED] = true;\n return task;\n }\n function placeholderCallback() { }\n function clearTask(task) {\n var data = task.data;\n // Note - ideally, we would call data.target.removeEventListener here, but it's too late\n // to prevent it from firing. So instead, we store info for the event listener.\n data.aborted = true;\n return abortNative.apply(data.target, data.args);\n }\n var openNative = patchMethod(XMLHttpRequestPrototype, 'open', function () { return function (self, args) {\n self[XHR_SYNC] = args[2] == false;\n self[XHR_URL] = args[1];\n return openNative.apply(self, args);\n }; });\n var XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';\n var sendNative = patchMethod(XMLHttpRequestPrototype, 'send', function () { return function (self, args) {\n if (self[XHR_SYNC]) {\n // if the XHR is sync there is no task to schedule, just execute the code.\n return sendNative.apply(self, args);\n }\n else {\n var options = {\n target: self,\n url: self[XHR_URL],\n isPeriodic: false,\n delay: null,\n args: args,\n aborted: false\n };\n return scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);\n }\n }; });\n var abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', function () { return function (self) {\n var task = findPendingTask(self);\n if (task && typeof task.type == 'string') {\n // If the XHR has already completed, do nothing.\n // If the XHR has already been aborted, do nothing.\n // Fix #569, call abort multiple times before done will cause\n // macroTask task count be negative number\n if (task.cancelFn == null || (task.data && task.data.aborted)) {\n return;\n }\n task.zone.cancelTask(task);\n }\n // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no\n // task\n // to cancel. Do nothing.\n }; });\n }\n});\nZone.__load_patch('geolocation', function (global) {\n /// GEO_LOCATION\n if (global['navigator'] && global['navigator'].geolocation) {\n patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);\n }\n});\nZone.__load_patch('PromiseRejectionEvent', function (global, Zone) {\n // handle unhandled promise rejection\n function findPromiseRejectionHandler(evtName) {\n return function (e) {\n var eventTasks = findEventTasks(global, evtName);\n eventTasks.forEach(function (eventTask) {\n // windows has added unhandledrejection event listener\n // trigger the event listener\n var PromiseRejectionEvent = global['PromiseRejectionEvent'];\n if (PromiseRejectionEvent) {\n var evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection });\n eventTask.invoke(evt);\n }\n });\n };\n }\n if (global['PromiseRejectionEvent']) {\n Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =\n findPromiseRejectionHandler('unhandledrejection');\n Zone[zoneSymbol('rejectionHandledHandler')] =\n findPromiseRejectionHandler('rejectionhandled');\n }\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n})));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/poffo/Downloads/demos/demo-ai-2/app-source/src/main/webapp/site/node_modules/zone.js/dist/zone.js\n// module id = ../../../../zone.js/dist/zone.js\n// module chunks = polyfills"],"sourceRoot":"webpack:///"} \ No newline at end of file diff --git a/web-carolapp/site/scripts.bundle.js b/web-carolapp/site/scripts.bundle.js deleted file mode 100644 index 8d74b17..0000000 --- a/web-carolapp/site/scripts.bundle.js +++ /dev/null @@ -1,3 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n>>0,s=0;sDe(e)?(r=e+1,a=o-De(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(De(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),L("week",5),L("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=k(e)});I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),L("day",11),L("weekday",11),L("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=k(e)});var je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var $e=ae;var qe=ae;var Je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=de(o[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Qe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+U(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),H("hour","h"),L("hour",13),ue("a",Ke),ue("A",Ke),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=k(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=k(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i))});var et,tt=Te("Hours",!0),nt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:He,monthsShort:Re,week:{dow:0,doy:6},weekdays:je,weekdaysMin:ze,weekdaysShort:Ze,meridiemParse:/[ap]\.?m?\.?/i},st={},it={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function at(e){var t=null;if(!st[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=et._abbr,require("./locale/"+e),ot(t)}catch(e){}return st[e]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):ut(e,t))?et=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),et._abbr}function ut(e,t){if(null!==t){var n,s=nt;if(t.abbr=e,null!=st[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])s=st[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;s=n._config}return st[e]=new P(b(s,t)),it[e]&&it[e].forEach(function(e){ut(e.name,e.config)}),ot(e),st[e]}return delete st[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!o(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r=t&&a(i,n,!0)>=t-1)break;t--}r++}return et}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11Pe(n[me],n[_e])?ye:n[ge]<0||24Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ht(e._a[me],s[me]),(e._dayOfYear>De(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],gt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(g(e).iso=!0,t=0,n=yt.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Vt,ln.isUTC=Vt,ln.zoneAbbr=function(){return this._isUTC?"UTC":""},ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ln.dates=n("dates accessor is deprecated. Use date instead.",nn),ln.months=n("months accessor is deprecated. Use month instead",Fe),ln.years=n("years accessor is deprecated. Use year instead",Oe),ln.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),ln.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Yt(e))._a){var t=e._isUTC?y(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0>>0,s=0;sDe(e)?(r=e+1,a=o-De(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(De(e)-s+i)/7}I(\"w\",[\"ww\",2],\"wo\",\"week\"),I(\"W\",[\"WW\",2],\"Wo\",\"isoWeek\"),H(\"week\",\"w\"),H(\"isoWeek\",\"W\"),L(\"week\",5),L(\"isoWeek\",5),ue(\"w\",B),ue(\"ww\",B,z),ue(\"W\",B),ue(\"WW\",B,z),fe([\"w\",\"ww\",\"W\",\"WW\"],function(e,t,n,s){t[s.substr(0,1)]=k(e)});I(\"d\",0,\"do\",\"day\"),I(\"dd\",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I(\"ddd\",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I(\"dddd\",0,0,function(e){return this.localeData().weekdays(this,e)}),I(\"e\",0,0,\"weekday\"),I(\"E\",0,0,\"isoWeekday\"),H(\"day\",\"d\"),H(\"weekday\",\"e\"),H(\"isoWeekday\",\"E\"),L(\"day\",11),L(\"weekday\",11),L(\"isoWeekday\",11),ue(\"d\",B),ue(\"e\",B),ue(\"E\",B),ue(\"dd\",function(e,t){return t.weekdaysMinRegex(e)}),ue(\"ddd\",function(e,t){return t.weekdaysShortRegex(e)}),ue(\"dddd\",function(e,t){return t.weekdaysRegex(e)}),fe([\"dd\",\"ddd\",\"dddd\"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe([\"d\",\"e\",\"E\"],function(e,t,n,s){t[s]=k(e)});var je=\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\");var Ze=\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\");var ze=\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\");var $e=ae;var qe=ae;var Je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,\"\"),i=this.weekdaysShort(n,\"\"),r=this.weekdays(n,\"\"),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=de(o[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp(\"^(\"+l.join(\"|\")+\")\",\"i\"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp(\"^(\"+u.join(\"|\")+\")\",\"i\"),this._weekdaysShortStrictRegex=new RegExp(\"^(\"+o.join(\"|\")+\")\",\"i\"),this._weekdaysMinStrictRegex=new RegExp(\"^(\"+a.join(\"|\")+\")\",\"i\")}function Qe(){return this.hours()%12||12}function Xe(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}I(\"H\",[\"HH\",2],0,\"hour\"),I(\"h\",[\"hh\",2],0,Qe),I(\"k\",[\"kk\",2],0,function(){return this.hours()||24}),I(\"hmm\",0,0,function(){return\"\"+Qe.apply(this)+U(this.minutes(),2)}),I(\"hmmss\",0,0,function(){return\"\"+Qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),I(\"Hmm\",0,0,function(){return\"\"+this.hours()+U(this.minutes(),2)}),I(\"Hmmss\",0,0,function(){return\"\"+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Xe(\"a\",!0),Xe(\"A\",!1),H(\"hour\",\"h\"),L(\"hour\",13),ue(\"a\",Ke),ue(\"A\",Ke),ue(\"H\",B),ue(\"h\",B),ue(\"k\",B),ue(\"HH\",B,z),ue(\"hh\",B,z),ue(\"kk\",B,z),ue(\"hmm\",Q),ue(\"hmmss\",X),ue(\"Hmm\",Q),ue(\"Hmmss\",X),ce([\"H\",\"HH\"],ge),ce([\"k\",\"kk\"],function(e,t,n){var s=k(e);t[ge]=24===s?0:s}),ce([\"a\",\"A\"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce([\"h\",\"hh\"],function(e,t,n){t[ge]=k(e),g(n).bigHour=!0}),ce(\"hmm\",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s)),g(n).bigHour=!0}),ce(\"hmmss\",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i)),g(n).bigHour=!0}),ce(\"Hmm\",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s))}),ce(\"Hmmss\",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i))});var et,tt=Te(\"Hours\",!0),nt={calendar:{sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"},longDateFormat:{LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},invalidDate:\"Invalid date\",ordinal:\"%d\",dayOfMonthOrdinalParse:/\\d{1,2}/,relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",ss:\"%d seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},months:He,monthsShort:Re,week:{dow:0,doy:6},weekdays:je,weekdaysMin:ze,weekdaysShort:Ze,meridiemParse:/[ap]\\.?m?\\.?/i},st={},it={};function rt(e){return e?e.toLowerCase().replace(\"_\",\"-\"):e}function at(e){var t=null;if(!st[e]&&\"undefined\"!=typeof module&&module&&module.exports)try{t=et._abbr,require(\"./locale/\"+e),ot(t)}catch(e){}return st[e]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):ut(e,t))?et=n:\"undefined\"!=typeof console&&console.warn&&console.warn(\"Locale \"+e+\" not found. Did you forget to load it?\")),et._abbr}function ut(e,t){if(null!==t){var n,s=nt;if(t.abbr=e,null!=st[e])T(\"defineLocaleOverride\",\"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.\"),s=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])s=st[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;s=n._config}return st[e]=new P(b(s,t)),it[e]&&it[e].forEach(function(e){ut(e.name,e.config)}),ot(e),st[e]}return delete st[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!o(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r=t&&a(i,n,!0)>=t-1)break;t--}r++}return et}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11Pe(n[me],n[_e])?ye:n[ge]<0||24Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ht(e._a[me],s[me]),(e._dayOfYear>De(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var ft=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,mt=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,_t=/Z|[+-]\\d\\d(?::?\\d\\d)?/,yt=[[\"YYYYYY-MM-DD\",/[+-]\\d{6}-\\d\\d-\\d\\d/],[\"YYYY-MM-DD\",/\\d{4}-\\d\\d-\\d\\d/],[\"GGGG-[W]WW-E\",/\\d{4}-W\\d\\d-\\d/],[\"GGGG-[W]WW\",/\\d{4}-W\\d\\d/,!1],[\"YYYY-DDD\",/\\d{4}-\\d{3}/],[\"YYYY-MM\",/\\d{4}-\\d\\d/,!1],[\"YYYYYYMMDD\",/[+-]\\d{10}/],[\"YYYYMMDD\",/\\d{8}/],[\"GGGG[W]WWE\",/\\d{4}W\\d{3}/],[\"GGGG[W]WW\",/\\d{4}W\\d{2}/,!1],[\"YYYYDDD\",/\\d{7}/]],gt=[[\"HH:mm:ss.SSSS\",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],[\"HH:mm:ss,SSSS\",/\\d\\d:\\d\\d:\\d\\d,\\d+/],[\"HH:mm:ss\",/\\d\\d:\\d\\d:\\d\\d/],[\"HH:mm\",/\\d\\d:\\d\\d/],[\"HHmmss.SSSS\",/\\d\\d\\d\\d\\d\\d\\.\\d+/],[\"HHmmss,SSSS\",/\\d\\d\\d\\d\\d\\d,\\d+/],[\"HHmmss\",/\\d\\d\\d\\d\\d\\d/],[\"HHmm\",/\\d\\d\\d\\d/],[\"HH\",/\\d\\d/]],pt=/^\\/?Date\\((\\-?\\d+)/i;function vt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(g(e).iso=!0,t=0,n=yt.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Vt,ln.isUTC=Vt,ln.zoneAbbr=function(){return this._isUTC?\"UTC\":\"\"},ln.zoneName=function(){return this._isUTC?\"Coordinated Universal Time\":\"\"},ln.dates=n(\"dates accessor is deprecated. Use date instead.\",nn),ln.months=n(\"months accessor is deprecated. Use month instead\",Fe),ln.years=n(\"years accessor is deprecated. Use year instead\",Oe),ln.zone=n(\"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/\",function(e,t){return null!=e?(\"string\"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),ln.isDSTShifted=n(\"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information\",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Yt(e))._a){var t=e._isUTC?y(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0 tag - -// load the styles -var content = __webpack_require__("../../../../css-loader/index.js?{\"sourceMap\":false,\"import\":false}!../../../../postcss-loader/lib/index.js?{\"ident\":\"postcss\",\"sourceMap\":false}!../../../../../src/styles.css"); -if(typeof content === 'string') content = [[module.i, content, '']]; -// add the styles to the DOM -var update = __webpack_require__("../../../../style-loader/addStyles.js")(content, {}); -if(content.locals) module.exports = content.locals; -// Hot Module Replacement -if(false) { - // When the styles change, update the - * ``` - * ```ts - * _@Component({ - * selector: 'my-app', - * template: ` - *
- * Position mode: - * - * - *
- *
- * Append to - * - * - * - *
- *
- *
- *
- * - * - *
    - *
  • Item1
  • - *
  • Item2
  • - *
  • Item3
  • - *
- *
- * Bottom/Right - *
- * - *
    - *
  • Item1
  • - *
  • Item2
  • - *
  • Item3
  • - *
- *
- * Bottom/Right - *
- * - *
    - *
  • Item1
  • - *
  • Item2
  • - *
  • Item3
  • - *
- *
- *
- * ` - * }) - * class AppComponent { - * public checked: number = 3; - * public mode: string = 'absolute'; - * public show: boolean = true; - * } - * ``` - */ - this.positionMode = 'fixed'; - /** - * Specifies the absolute position of the element. The Popup opens next to that point. - * - * The Popup pivot point is defined by the `popupAlign` configuration option. - * The boundary detection is applied by using the window viewport. - * - * For more information, refer to the section on - * [aligning to specific absolute points]({% slug overview_popup %}#toc-align-to-absolute-points). - */ - this.offset = DEFAULT_OFFSET; - /** - * Fires when the anchor is scrolled outside the screen boundaries. - * - * For more information, refer to the section on - * [closing the Popup after leaving the viewport]({% slug overview_popup %}#toc-closing-after-leaving-the-viewport). - */ - this.anchorViewportLeave = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Fires after the component is closed. - */ - this.close = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Fires after the component is opened and the opening animation ends. - */ - this.open = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * @hidden - */ - this.direction = 'down'; - this.resolvedPromise = Promise.resolve(null); - this._renderer.addClass(container.nativeElement, ANIMATION_CONTAINER); - this.updateFixedClass(); - } - PopupComponent.prototype.ngOnInit = function () { - this.repositionCallback = this.reposition.bind(this); - this._resizeService.subscribe(this.repositionCallback); - this._scrollableService.forElement(this.anchor || this.container).subscribe(this.onScroll.bind(this)); - this.currentOffset = DEFAULT_OFFSET; - this.setZIndex(); - this.copyFontStyles(); - this.updateFixedClass(); - }; - PopupComponent.prototype.ngOnChanges = function (changes) { - if (changes.copyAnchorStyles) { - this.copyFontStyles(); - } - if (changes.positionMode) { - this.updateFixedClass(); - } - }; - PopupComponent.prototype.ngAfterViewInit = function () { - // positions the popup before the initial animation starts. - this.reposition(); - }; - PopupComponent.prototype.ngAfterViewChecked = function () { - var _this = this; - this._zone.runOutsideAngular(function () { - // workarounds https://github.com/angular/angular/issues/19094 - // uses promise because it is executed synchronously after the content is updated - // does not use onStable in case the current zone is not the angular one. - if (_this.repositionSubscription) { - _this.repositionSubscription.unsubscribe(); - } - _this.repositionSubscription = __WEBPACK_IMPORTED_MODULE_2_rxjs_Observable__["a" /* Observable */].fromPromise(_this.resolvedPromise) - .subscribe(_this.repositionCallback); - }); - }; - PopupComponent.prototype.ngOnDestroy = function () { - this.anchorViewportLeave.complete(); - this.close.emit(); - this.close.complete(); - this._resizeService.unsubscribe(); - this._scrollableService.unsubscribe(); - if (this.repositionSubscription) { - this.repositionSubscription.unsubscribe(); - } - }; - /** - * @hidden - */ - PopupComponent.prototype.triggerOpen = function (_event) { - this._renderer.addClass(this.container.nativeElement, 'k-animation-container-shown'); - this.open.emit(); - this.open.complete(); - }; - Object.defineProperty(PopupComponent.prototype, "currentOffset", { - get: function () { - return this._currentOffset; - }, - set: function (offset) { - if (!this._currentOffset || Object(__WEBPACK_IMPORTED_MODULE_8__util__["d" /* isDifferentOffset */])(this._currentOffset, offset)) { - this.setContainerStyle('left', offset.left + "px"); - this.setContainerStyle('top', offset.top + "px"); - this._currentOffset = offset; - } - }, - enumerable: true, - configurable: true - }); - PopupComponent.prototype.setZIndex = function () { - if (this.anchor) { - this.setContainerStyle('z-index', String(this._domService.zIndex(this.anchor, this.container))); - } - }; - PopupComponent.prototype.reposition = function () { - if (!Object(__WEBPACK_IMPORTED_MODULE_8__util__["e" /* isDocumentAvailable */])()) { - return; - } - var _a = this.position(), flipped = _a.flipped, offset = _a.offset; - var newDirection = this.getDirection(flipped); - this.currentOffset = offset; - if (this.direction !== newDirection) { - this.direction = newDirection; - this._cdr.detectChanges(); - } - }; - PopupComponent.prototype.position = function () { - var alignedOffset = this._alignService.alignElement({ - anchor: this.anchor, - anchorAlign: this.anchorAlign, - element: this.container, - elementAlign: this.popupAlign, - offset: this.offset, - positionMode: this.positionMode - }); - return this._positionService.positionElement({ - anchor: this.anchor, - anchorAlign: this.anchorAlign, - collisions: this.collision, - currentLocation: alignedOffset, - element: this.container, - elementAlign: this.popupAlign, - positionMode: this.positionMode - }); - }; - PopupComponent.prototype.getDirection = function (flipped) { - return this.animate ? (flipped ? 'up' : 'down') : 'none'; - }; - PopupComponent.prototype.onScroll = function (isInViewPort) { - var _this = this; - var hasObservers = this.anchorViewportLeave.observers.length; - if (isInViewPort || !hasObservers) { - this.reposition(); - } - else if (hasObservers) { - this._zone.run(function () { - _this.anchorViewportLeave.emit(); - }); - } - }; - PopupComponent.prototype.copyFontStyles = function () { - var _this = this; - if (!this.anchor || !this.copyAnchorStyles) { - return; - } - this._domService.getFontStyles(this.anchor) - .forEach(function (s) { return _this.setContainerStyle(s.key, s.value); }); - }; - PopupComponent.prototype.updateFixedClass = function () { - var action = this.positionMode === 'fixed' ? 'addClass' : 'removeClass'; - this._renderer[action](this.container.nativeElement, ANIMATION_CONTAINER_FIXED); - }; - PopupComponent.prototype.setContainerStyle = function (name, value) { - this._renderer.setStyle(this.container.nativeElement, name, value); - }; - return PopupComponent; -}()); - -PopupComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - animations: [ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_25" /* trigger */])('toggle', [ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_24" /* transition */])('void => down, up => down', [ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_23" /* style */])({ transform: 'translateY(-100%)' }), - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_15" /* animate */])('0.1s ease-in', Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_23" /* style */])({ transform: 'translateY(0)' })) - ]), - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_24" /* transition */])('down => void', [ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_23" /* style */])({ transform: 'translateY(0)' }), - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_15" /* animate */])('0.1s ease-in', Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_23" /* style */])({ transform: 'translateY(-100%)' })) - ]), - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_24" /* transition */])('void => up, down => up', [ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_23" /* style */])({ transform: 'translateY(100%)' }), - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_15" /* animate */])('0.1s ease-in', Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_23" /* style */])({ transform: 'translateY(0)' })) - ]), - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_24" /* transition */])('up => void', [ - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_23" /* style */])({ transform: 'translateY(0)' }), - Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_15" /* animate */])('0.1s ease-in', Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_23" /* style */])({ transform: 'translateY(100%)' })) - ]) - ]) - ], - exportAs: 'kendo-popup', - providers: [__WEBPACK_IMPORTED_MODULE_3__services_align_service__["a" /* AlignService */], __WEBPACK_IMPORTED_MODULE_4__services_dom_service__["a" /* DOMService */], __WEBPACK_IMPORTED_MODULE_5__services_position_service__["a" /* PositionService */], __WEBPACK_IMPORTED_MODULE_6__services_resize_service__["a" /* ResizeService */], __WEBPACK_IMPORTED_MODULE_7__services_scrollable_service__["a" /* ScrollableService */]], - selector: 'kendo-popup', - template: "\n
\n \n \n
\n " - },] }, -]; -/** @nocollapse */ -PopupComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_3__services_align_service__["a" /* AlignService */], }, - { type: __WEBPACK_IMPORTED_MODULE_4__services_dom_service__["a" /* DOMService */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["k" /* ChangeDetectorRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_5__services_position_service__["a" /* PositionService */], }, - { type: __WEBPACK_IMPORTED_MODULE_6__services_resize_service__["a" /* ResizeService */], }, - { type: __WEBPACK_IMPORTED_MODULE_7__services_scrollable_service__["a" /* ScrollableService */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["X" /* Renderer2 */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["O" /* NgZone */], }, -]; }; -PopupComponent.propDecorators = { - 'animate': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - 'anchor': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - 'anchorAlign': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - 'collision': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - 'popupAlign': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - 'copyAnchorStyles': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - 'popupClass': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - 'positionMode': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - 'offset': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - 'anchorViewportLeave': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */] },], - 'close': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */] },], - 'open': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */] },], -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-angular-popup/dist/es/popup.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PopupModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__popup_component__ = __webpack_require__("../../../../@progress/kendo-angular-popup/dist/es/popup.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__popup_service__ = __webpack_require__("../../../../@progress/kendo-angular-popup/dist/es/popup.service.js"); - - - - -var POPUP_DIRECTIVES = [__WEBPACK_IMPORTED_MODULE_2__popup_component__["a" /* PopupComponent */]]; -/** - * Represents the [NgModule](https://angular.io/docs/ts/latest/guide/ngmodule.html) - * definition for the Popup component. - * - * @example - * - * ```ts-no-run - * // Import the Popup module - * import { PopupModule } from '@progress/kendo-angular-popup'; - * - * // The browser platform with a compiler - * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - * - * import { NgModule } from '@angular/core'; - * - * // Import the app component - * import { AppComponent } from './app.component'; - * - * // Define the app module - * _@NgModule({ - * declarations: [AppComponent], // declare app component - * imports: [BrowserModule, PopupModule], // import Popup module - * bootstrap: [AppComponent] - * }) - * export class AppModule {} - * - * // Compile and launch the module - * platformBrowserDynamic().bootstrapModule(AppModule); - * - * ``` - */ -var PopupModule = (function () { - function PopupModule() { - } - return PopupModule; -}()); - -PopupModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - declarations: [POPUP_DIRECTIVES], - entryComponents: [POPUP_DIRECTIVES], - exports: [POPUP_DIRECTIVES], - imports: [__WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */]], - providers: [__WEBPACK_IMPORTED_MODULE_3__popup_service__["b" /* PopupService */]] - },] }, -]; -/** @nocollapse */ -PopupModule.ctorParameters = function () { return []; }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-angular-popup/dist/es/popup.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return POPUP_CONTAINER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return PopupService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__popup_component__ = __webpack_require__("../../../../@progress/kendo-angular-popup/dist/es/popup.component.js"); - - -/** - * Used to inject the Popup container. If not provided, the first root component of - * the application is used. - * - * > The POPUP_CONTAINER can be used only with the [PopupService]({% slug service_popup %}) class. - * - * @example - * - * ```ts-no-run - * // Import the Popup module - * import { PopupModule, POPUP_CONTAINER } from '@progress/kendo-angular-popup'; - * - * // The browser platform with a compiler - * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - * - * import { ElementRef, NgModule } from '@angular/core'; - * - * // Import the app component - * import { AppComponent } from './app.component'; - * - * // Define the app module - * _@NgModule({ - * declarations: [AppComponent], // declare app component - * imports: [BrowserModule, PopupModule], // import Popup module - * bootstrap: [AppComponent], - * providers: [{ - * provide: POPUP_CONTAINER, - * useFactory: () => { - * //return the container ElementRef, where the popup will be injected - * return { nativeElement: document.body } as ElementRef; - * } - * }] - * }) - * export class AppModule {} - * - * // Compile and launch the module - * platformBrowserDynamic().bootstrapModule(AppModule); - * ``` - */ -var POPUP_CONTAINER = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["C" /* InjectionToken */]('Popup Container'); -/** - * A service for opening Popup components dynamically. - * - * For more information on how to use this class, refer to the article on - * the [Popup service]({% slug service_popup %}). - * - * @export - * @class PopupService - */ -var PopupService = (function () { - function PopupService(applicationRef, componentFactoryResolver, injector, container) { - this.applicationRef = applicationRef; - this.componentFactoryResolver = componentFactoryResolver; - this.injector = injector; - this.container = container; - } - Object.defineProperty(PopupService.prototype, "rootViewContainer", { - /** - * Gets the root view container into which the component will be injected. - * - * @returns {ComponentRef} - */ - get: function () { - // https://github.com/angular/angular/blob/4.0.x/packages/core/src/application_ref.ts#L571 - var rootComponents = this.applicationRef.components || []; - if (rootComponents[0]) { - return rootComponents[0]; - } - throw new Error("\n View Container not found! Inject the POPUP_CONTAINER or define a specific ViewContainerRef via the appendTo option.\n See http://www.telerik.com/kendo-angular-ui/components/popup/api/POPUP_CONTAINER/ for more details.\n "); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(PopupService.prototype, "rootViewContainerNode", { - /** - * Sets or gets the HTML element of the root component container. - * - * @returns {HTMLElement} - */ - get: function () { - return this.container ? this.container.nativeElement : this.getComponentRootNode(this.rootViewContainer); - }, - enumerable: true, - configurable: true - }); - /** - * Opens a Popup component. - * - * Created Popups are mounted in the DOM directly in the root application component. - * - * @param {PopupSettings} options - The options which define the Popup. - * @returns {ComponentRef} - A reference to the Popup object. - * - * @example - * - * ```ts-no-run - * _@Component({ - * selector: 'my-app', - * template: ` - * - * Popup content - * - * - * ` - * }) - * export class AppComponent { - * public popupRef: PopupRef; - * - * constructor( private popupService: PopupService ) {} - * - * public open(anchor: ElementRef, template: TemplateRef): void { - * if (this.popupRef) { - * this.popupRef.close(); - * this.popupRef = null; - * return; - * } - * - * this.popupRef = this.popupService.open({ - * anchor: anchor, - * content: template - * }); - * } - * } - * ``` - */ - PopupService.prototype.open = function (options) { - if (options === void 0) { options = {}; } - var _a = this.contentFrom(options.content), component = _a.component, nodes = _a.nodes; - var popupComponentRef = this.appendPopup(nodes, options.appendTo); - var popupInstance = popupComponentRef.instance; - this.projectComponentInputs(popupComponentRef, options); - popupComponentRef.changeDetectorRef.detectChanges(); - if (component) { - component.changeDetectorRef.detectChanges(); - } - return { - close: function () { - // XXX: Destroy is required due to this bug: - // https://github.com/angular/angular/issues/15578 - // - if (component) { - component.destroy(); - } - else { - popupComponentRef.instance.content = null; - popupComponentRef.changeDetectorRef.detectChanges(); - } - popupComponentRef.destroy(); - }, - content: component, - popup: popupComponentRef, - popupAnchorViewportLeave: popupInstance.anchorViewportLeave, - popupClose: popupInstance.close, - popupElement: this.getComponentRootNode(popupComponentRef), - popupOpen: popupInstance.open - }; - }; - PopupService.prototype.appendPopup = function (nodes, container) { - var popupComponentRef = this.createComponent(__WEBPACK_IMPORTED_MODULE_1__popup_component__["a" /* PopupComponent */], nodes, container); - if (!container) { - this.rootViewContainerNode.appendChild(this.getComponentRootNode(popupComponentRef)); - } - return popupComponentRef; - }; - /** - * Gets the HTML element for a component reference. - * - * @param {ComponentRef} componentRef - * @returns {HTMLElement} - */ - PopupService.prototype.getComponentRootNode = function (componentRef) { - return componentRef.hostView.rootNodes[0]; - }; - /** - * Gets the `ComponentFactory` instance by its type. - * - * @param {*} componentClass - * @param {*} nodes - * @returns {ComponentRef} - */ - PopupService.prototype.getComponentFactory = function (componentClass) { - return this.componentFactoryResolver.resolveComponentFactory(componentClass); - }; - /** - * Creates a component reference from a `Component` type class. - * - * @param {*} componentClass - * @param {*} nodes - * @returns {ComponentRef} - */ - PopupService.prototype.createComponent = function (componentClass, nodes, container) { - var factory = this.getComponentFactory(componentClass); - if (container) { - return container.createComponent(factory, undefined, this.injector, nodes); - } - else { - var component = factory.create(this.injector, nodes); - this.applicationRef.attachView(component.hostView); - return component; - } - }; - /** - * Projects the inputs on the component. - * - * @param {ComponentRef} component - * @param {*} options - * @returns {ComponentRef} - */ - PopupService.prototype.projectComponentInputs = function (component, options) { - Object.getOwnPropertyNames(options) - .filter(function (prop) { return prop !== 'content' || options.content instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_7" /* TemplateRef */]; }) - .map(function (prop) { - component.instance[prop] = options[prop]; - }); - return component; - }; - /** - * Gets the component and the nodes to append from the `content` option. - * - * @param {*} content - * @returns {any} - */ - PopupService.prototype.contentFrom = function (content) { - if (!content || content instanceof __WEBPACK_IMPORTED_MODULE_0__angular_core__["_7" /* TemplateRef */]) { - return { component: null, nodes: [[]] }; - } - var component = this.createComponent(content); - var nodes = component ? [component.location.nativeElement] : []; - return { - component: component, - nodes: [ - nodes // - ] - }; - }; - return PopupService; -}()); - -PopupService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, -]; -/** @nocollapse */ -PopupService.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["g" /* ApplicationRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["p" /* ComponentFactoryResolver */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["D" /* Injector */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["A" /* Inject */], args: [POPUP_CONTAINER,] }, { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["P" /* Optional */] },] }, -]; }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-angular-popup/dist/es/services/align.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AlignService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__dom_service__ = __webpack_require__("../../../../@progress/kendo-angular-popup/dist/es/services/dom.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("../../../../@progress/kendo-angular-popup/dist/es/util.js"); - - - -/** - * @hidden - */ -var AlignService = (function () { - function AlignService(_dom) { - this._dom = _dom; - } - AlignService.prototype.alignElement = function (settings) { - var anchor = settings.anchor, element = settings.element, anchorAlign = settings.anchorAlign, elementAlign = settings.elementAlign, offset = settings.offset, positionMode = settings.positionMode; - var fixedMode = positionMode === 'fixed' || !this._dom.hasOffsetParent(element); - var anchorRect = fixedMode ? this.absoluteRect(anchor, element, offset) : this.relativeRect(anchor, element, offset); - return this._dom.align({ - anchorAlign: anchorAlign, - anchorRect: anchorRect, - elementAlign: elementAlign, - elementRect: this._dom.offset(element) - }); - }; - AlignService.prototype.absoluteRect = function (anchor, element, offset) { - return this._dom.removeScroll(this._dom.addScroll(Object(__WEBPACK_IMPORTED_MODULE_2__util__["g" /* removeStackingOffset */])(Object(__WEBPACK_IMPORTED_MODULE_2__util__["c" /* eitherRect */])(this._dom.offset(anchor), offset), this._dom.stackingElementOffset(element)), this._dom.stackingElementScroll(element)), this.elementScrollPosition(anchor, element)); - }; - AlignService.prototype.elementScrollPosition = function (anchor, element) { - return anchor ? { x: 0, y: 0 } : this._dom.scrollPosition(element); - }; - AlignService.prototype.relativeRect = function (anchor, element, offset) { - return Object(__WEBPACK_IMPORTED_MODULE_2__util__["c" /* eitherRect */])(this._dom.position(anchor, element), offset); - }; - return AlignService; -}()); - -AlignService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, -]; -/** @nocollapse */ -AlignService.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__dom_service__["a" /* DOMService */], }, -]; }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-angular-popup/dist/es/services/dom.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DOMService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("../../../../@progress/kendo-angular-popup/dist/es/util.js"); - - - -var STYLES = [ - 'font-size', - 'font-family', - 'font-stretch', - 'font-style', - 'font-weight', - 'line-height' -]; -/** - * @hidden - */ -var DOMService = (function () { - function DOMService() { - } - DOMService.prototype.addOffset = function (current, addition) { - return { - left: current.left + addition.left, - top: current.top + addition.top - }; - }; - DOMService.prototype.align = function (settings) { - return Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["b" /* align */])(settings); - }; - DOMService.prototype.boundingOffset = function (el) { - return Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["d" /* boundingOffset */])(this.nativeElement(el)); - }; - DOMService.prototype.getFontStyles = function (el) { - var window = this.getWindow(); - if (!window || !el) { - return []; - } - var computedStyles = window.getComputedStyle(this.nativeElement(el)); - return STYLES.map(function (font) { return ({ key: font, value: computedStyles[font] }); }); - }; - DOMService.prototype.getWindow = function () { - return Object(__WEBPACK_IMPORTED_MODULE_2__util__["f" /* isWindowAvailable */])() ? window : null; - }; - DOMService.prototype.isBodyOffset = function (el) { - return Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["f" /* isBodyOffset */])(this.nativeElement(el)); - }; - DOMService.prototype.hasOffsetParent = function (el) { - if (!el) { - return false; - } - return !!this.nativeElement(el).offsetParent; - }; - DOMService.prototype.offset = function (el) { - if (!el) { - return null; - } - return Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["g" /* offset */])(this.nativeElement(el)); - }; - DOMService.prototype.staticOffset = function (el) { - if (!el) { - return null; - } - var element = this.nativeElement(el); - var _a = element.style, left = _a.left, top = _a.top; - element.style.left = '0px'; - element.style.top = '0px'; - var currentOffset = Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["g" /* offset */])(element); - element.style.left = left; - element.style.top = top; - return currentOffset; - }; - DOMService.prototype.nativeElement = function (el) { - if (!el) { - return null; - } - return el.nativeElement || el; - }; - DOMService.prototype.position = function (element, popup) { - if (!element || !popup) { - return null; - } - var nativeEl = this.nativeElement(element); - var parentSibling = Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["m" /* siblingContainer */])(nativeEl, this.nativeElement(popup)); - return Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["i" /* positionWithScroll */])(nativeEl, parentSibling); - }; - DOMService.prototype.relativeOffset = function (el, currentLocation) { - return Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["c" /* applyLocationOffset */])(this.offset(el), currentLocation, this.isBodyOffset(el)); - }; - DOMService.prototype.addScroll = function (rect, scroll) { - return Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["a" /* addScroll */])(rect, scroll); - }; - DOMService.prototype.removeScroll = function (rect, scroll) { - return Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["j" /* removeScroll */])(rect, scroll); - }; - DOMService.prototype.restrictToView = function (settings) { - return Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["k" /* restrictToView */])(settings); - }; - DOMService.prototype.scrollPosition = function (el) { - return Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["l" /* scrollPosition */])(this.nativeElement(el)); - }; - DOMService.prototype.scrollableParents = function (el) { - return Object(__WEBPACK_IMPORTED_MODULE_2__util__["i" /* scrollableParents */])(this.nativeElement(el)); - }; - DOMService.prototype.stackingElementOffset = function (el) { - var relativeContextElement = this.getRelativeContextElement(el); - if (!relativeContextElement) { - return null; - } - return Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["g" /* offset */])(relativeContextElement); - }; - DOMService.prototype.stackingElementScroll = function (el) { - var relativeContextElement = this.getRelativeContextElement(el); - if (!relativeContextElement) { - return { x: 0, y: 0 }; - } - return { - x: relativeContextElement.scrollLeft, - y: relativeContextElement.scrollTop - }; - }; - DOMService.prototype.stackingElementViewPort = function (el) { - var relativeContextElement = this.getRelativeContextElement(el); - if (!relativeContextElement) { - return null; - } - return { - height: relativeContextElement.scrollHeight, - width: relativeContextElement.scrollWidth - }; - }; - DOMService.prototype.getRelativeContextElement = function (el) { - if (!el || !__WEBPACK_IMPORTED_MODULE_2__util__["b" /* HAS_RELATIVE_STACKING_CONTEXT */]) { - return null; - } - var parent = this.nativeElement(el).parentElement; - while (parent) { - if (window.getComputedStyle(parent).transform !== 'none') { - return parent; - } - parent = parent.parentElement; - } - return null; - }; - DOMService.prototype.useRelativePosition = function (el) { - return !!this.getRelativeContextElement(el); - }; - DOMService.prototype.windowViewPort = function (el) { - return Object(__WEBPACK_IMPORTED_MODULE_1__progress_kendo_popup_common__["e" /* getWindowViewPort */])(this.nativeElement(el)); - }; - DOMService.prototype.zIndex = function (anchor, container) { - return Object(__WEBPACK_IMPORTED_MODULE_2__util__["j" /* zIndex */])(this.nativeElement(anchor), this.nativeElement(container)); - }; - DOMService.prototype.zoomLevel = function () { - if (!Object(__WEBPACK_IMPORTED_MODULE_2__util__["e" /* isDocumentAvailable */])() || !Object(__WEBPACK_IMPORTED_MODULE_2__util__["f" /* isWindowAvailable */])()) { - return 1; - } - return parseFloat((document.documentElement.clientWidth / window.innerWidth).toFixed(2)); - }; - DOMService.prototype.isZoomed = function () { - return this.zoomLevel() > 1; - }; - return DOMService; -}()); - -DOMService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, -]; -/** @nocollapse */ -DOMService.ctorParameters = function () { return []; }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-angular-popup/dist/es/services/position.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PositionService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__dom_service__ = __webpack_require__("../../../../@progress/kendo-angular-popup/dist/es/services/dom.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("../../../../@progress/kendo-angular-popup/dist/es/util.js"); - - - -/** - * @hidden - */ -var PositionService = (function () { - function PositionService(_dom) { - this._dom = _dom; - } - PositionService.prototype.positionElement = function (settings) { - var anchor = settings.anchor, currentLocation = settings.currentLocation, positionMode = settings.positionMode, element = settings.element, anchorAlign = settings.anchorAlign, elementAlign = settings.elementAlign, collisions = settings.collisions; - var dom = this._dom; - var viewPort = settings.viewPort || dom.stackingElementViewPort(element) || dom.windowViewPort(element); - var anchorRect = Object(__WEBPACK_IMPORTED_MODULE_2__util__["c" /* eitherRect */])(dom.offset(anchor), currentLocation); - var initialElementRect = Object(__WEBPACK_IMPORTED_MODULE_2__util__["h" /* replaceOffset */])(dom.staticOffset(element), currentLocation); - var elementRect = this.elementRect(element, initialElementRect, positionMode); - var result = dom.restrictToView({ - anchorAlign: anchorAlign, - anchorRect: anchorRect, - collisions: collisions, - elementAlign: elementAlign, - elementRect: elementRect, - viewPort: viewPort - }); - return { - flipped: result.flipped, - offset: dom.addOffset(initialElementRect, result.offset) - }; - }; - PositionService.prototype.elementRect = function (element, rect, mode) { - if (mode === 'fixed') { - return rect; - } - return this._dom.removeScroll(rect, this._dom.scrollPosition(element)); - }; - return PositionService; -}()); - -PositionService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, -]; -/** @nocollapse */ -PositionService.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__dom_service__["a" /* DOMService */], }, -]; }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-angular-popup/dist/es/services/resize.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ResizeService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rxjs_add_observable_fromEvent__ = __webpack_require__("../../../../rxjs/_esm5/add/observable/fromEvent.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_rxjs_add_operator_auditTime__ = __webpack_require__("../../../../rxjs/_esm5/add/operator/auditTime.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util__ = __webpack_require__("../../../../@progress/kendo-angular-popup/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__dom_service__ = __webpack_require__("../../../../@progress/kendo-angular-popup/dist/es/services/dom.service.js"); - - - - - - -/** - * @hidden - */ -var ResizeService = (function () { - function ResizeService(_dom, _zone) { - this._dom = _dom; - this._zone = _zone; - } - ResizeService.prototype.subscribe = function (callback) { - var _this = this; - if (!Object(__WEBPACK_IMPORTED_MODULE_4__util__["e" /* isDocumentAvailable */])()) { - return; - } - this._zone.runOutsideAngular(function () { - _this.subscription = __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__["a" /* Observable */] - .fromEvent(_this._dom.getWindow(), "resize") - .auditTime(__WEBPACK_IMPORTED_MODULE_4__util__["a" /* FRAME_DURATION */]) - .subscribe(function () { return callback(); }); - }); - }; - ResizeService.prototype.unsubscribe = function () { - if (!this.subscription) { - return; - } - this.subscription.unsubscribe(); - }; - ResizeService.prototype.isUnsubscribed = function () { - return this.subscription && this.subscription.closed; - }; - return ResizeService; -}()); - -ResizeService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, -]; -/** @nocollapse */ -ResizeService.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_5__dom_service__["a" /* DOMService */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["O" /* NgZone */], }, -]; }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-angular-popup/dist/es/services/scrollable.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export THRESHOLD_DIFF */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ScrollableService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rxjs_add_observable_fromEvent__ = __webpack_require__("../../../../rxjs/_esm5/add/observable/fromEvent.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_rxjs_add_observable_merge__ = __webpack_require__("../../../../rxjs/_esm5/add/observable/merge.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_rxjs_add_operator_auditTime__ = __webpack_require__("../../../../rxjs/_esm5/add/operator/auditTime.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__dom_service__ = __webpack_require__("../../../../@progress/kendo-angular-popup/dist/es/services/dom.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util__ = __webpack_require__("../../../../@progress/kendo-angular-popup/dist/es/util.js"); - - - - - - - -/** - * @hidden - */ -var THRESHOLD_DIFF = 1; -/** - * @hidden - */ -var ScrollableService = (function () { - function ScrollableService(_dom, _zone) { - this._dom = _dom; - this._zone = _zone; - } - ScrollableService.prototype.forElement = function (element) { - this.unsubscribe(); - this.element = element; - return this; - }; - ScrollableService.prototype.subscribe = function (callback) { - var _this = this; - if (!callback || !Object(__WEBPACK_IMPORTED_MODULE_6__util__["e" /* isDocumentAvailable */])() || !this.element) { - return; - } - var nativeElement = this._dom.nativeElement(this.element); - var parents = this._dom.scrollableParents(this.element); - this._zone.runOutsideAngular(function () { - var observables = parents.map(function (p) { return __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__["a" /* Observable */].fromEvent(p, "scroll").auditTime(__WEBPACK_IMPORTED_MODULE_6__util__["a" /* FRAME_DURATION */]); }); - var subscriber = function (e) { - callback(_this.isVisible(nativeElement, e.target)); - }; - _this.subscription = __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__["a" /* Observable */].merge.apply(__WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__["a" /* Observable */], observables).subscribe(subscriber); - }); - }; - ScrollableService.prototype.unsubscribe = function () { - if (!this.subscription) { - return; - } - this.subscription.unsubscribe(); - }; - ScrollableService.prototype.isVisible = function (elem, container) { - var elemRect = this._dom.boundingOffset(elem); - var containerRect = this._dom.boundingOffset(container); - if ((containerRect.top - elemRect.bottom) > THRESHOLD_DIFF) { - return false; - } - if ((containerRect.bottom - elemRect.bottom) < -THRESHOLD_DIFF) { - return false; - } - if ((containerRect.right - elemRect.right) < -THRESHOLD_DIFF) { - return false; - } - if ((containerRect.left - elemRect.left) > THRESHOLD_DIFF) { - return false; - } - return true; - }; - return ScrollableService; -}()); - -ScrollableService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, -]; -/** @nocollapse */ -ScrollableService.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_5__dom_service__["a" /* DOMService */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["O" /* NgZone */], }, -]; }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-angular-popup/dist/es/util.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return eitherRect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return replaceOffset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return removeStackingOffset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isDifferentOffset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isDocumentAvailable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isWindowAvailable; }); -/* unused harmony export hasBoundingRect */ -/* unused harmony export OVERFLOW_REGEXP */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return scrollableParents; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FRAME_DURATION; }); -/* unused harmony export hasRelativeStackingContext */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return HAS_RELATIVE_STACKING_CONTEXT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return zIndex; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_popup_common__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/main.js"); - -/** - * @hidden - */ -var eitherRect = function (rect, offset) { - if (!rect) { - return { height: 0, left: offset.left, top: offset.top, width: 0 }; - } - return rect; -}; -/** - * @hidden - */ -var replaceOffset = function (rect, offset) { - if (!offset) { - return rect; - } - var result = { - height: rect.height, - left: offset.left, - top: offset.top, - width: rect.width - }; - return result; -}; -/** - * @hidden - */ -var removeStackingOffset = function (rect, stackingOffset) { - if (!stackingOffset) { - return rect; - } - var result = { - height: rect.height, - left: rect.left - stackingOffset.left, - top: rect.top - stackingOffset.top, - width: rect.width - }; - return result; -}; -/** - * @hidden - */ -var isDifferentOffset = function (oldOffset, newOffset) { - var oldLeft = oldOffset.left, oldTop = oldOffset.top; - var newLeft = newOffset.left, newTop = newOffset.top; - return Math.abs(oldLeft - newLeft) >= 1 || Math.abs(oldTop - newTop) >= 1; -}; -/** - * @hidden - */ -var isDocumentAvailable = function () { - return typeof document !== 'undefined' && !!document.body; -}; -/** - * @hidden - */ -var isWindowAvailable = function () { - return typeof window !== 'undefined'; -}; -/** - * @hidden - */ -var hasBoundingRect = function (elem) { return !!elem.getBoundingClientRect; }; -/** - * @hidden - */ -var OVERFLOW_REGEXP = /auto|scroll/; -var overflowStyle = function (element) { - var styles = window.getComputedStyle(element); - return "" + styles.overflow + styles.overflowX + styles.overflowY; -}; -/** - * @hidden - */ -var scrollableParents = function (element) { - var parentElements = []; - if (!isDocumentAvailable() || !isWindowAvailable()) { - return parentElements; - } - var parent = element.parentElement; - while (parent) { - if (OVERFLOW_REGEXP.test(overflowStyle(parent))) { - parentElements.push(parent); - } - parent = parent.parentElement; - } - parentElements.push(window); - return parentElements; -}; -/** - * @hidden - */ -var FRAME_DURATION = 1000 / 60; //1000ms divided by 60fps -/** - * @hidden - */ -//1000ms divided by 60fps -var hasRelativeStackingContext = function () { - if (!isDocumentAvailable()) { - return false; - } - var top = 10; - var parent = document.createElement("div"); - parent.style.transform = "matrix(10, 0, 0, 10, 0, 0)"; - parent.innerHTML = "
child
"; - document.body.appendChild(parent); - var isDifferent = parent.children[0].getBoundingClientRect().top !== top; - document.body.removeChild(parent); - return isDifferent; -}; -/** - * @hidden - */ -var HAS_RELATIVE_STACKING_CONTEXT = hasRelativeStackingContext(); -/** - * @hidden - */ -var zIndex = function (anchor, container) { - if (!anchor || !isDocumentAvailable() || !isWindowAvailable()) { - return null; - } - var sibling = Object(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_popup_common__["m" /* siblingContainer */])(anchor, container); - if (!sibling) { - return null; - } - var result = [anchor].concat(Object(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_popup_common__["h" /* parents */])(anchor, sibling)).reduce(function (index, p) { - var zIndexStyle = p.style.zIndex || window.getComputedStyle(p).zIndex; - var current = parseInt(zIndexStyle, 10); - return current > index ? current : index; - }, 0); - return result ? (result + 1) : null; -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-angular-resize-sensor/dist/es/main.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__resize_sensor_component__ = __webpack_require__("../../../../@progress/kendo-angular-resize-sensor/dist/es/resize-sensor.component.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__resize_sensor_component__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__resize_sensor_module__ = __webpack_require__("../../../../@progress/kendo-angular-resize-sensor/dist/es/resize-sensor.module.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__resize_sensor_module__["a"]; }); - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-angular-resize-sensor/dist/es/resize-sensor.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ResizeSensorComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Subject__ = __webpack_require__("../../../../rxjs/_esm5/Subject.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rxjs_add_operator_auditTime__ = __webpack_require__("../../../../rxjs/_esm5/add/operator/auditTime.js"); - - - -/** - * Emit up to 10 resize events per second by default. - * Chosen as a compromise between responsiveness and performance. - */ -var DEFAULT_RATE_LIMIT = 10; -var computedProp = function (elem, prop) { - return getComputedStyle(elem, null).getPropertyValue(prop); -}; -var WRAP_STYLE = 'position: absolute; display: block; left: 0; top: 0; right: 0; bottom: 0; z-index: -1;' + - 'overflow: hidden; visibility: hidden;'; -var EXPAND_CHILD_STYLE = 'position: absolute; left: 0; top: 0; transition: 0s;'; -var SHRINK_CHILD_STYLE = EXPAND_CHILD_STYLE + 'width: 200%; height: 200%;'; -/** - * Resize Sensor Component - * - * Triggers a "resize" event whenever the parent DOM element size changes. - */ -var ResizeSensorComponent = (function () { - function ResizeSensorComponent(element, zone, renderer) { - this.element = element; - this.zone = zone; - this.renderer = renderer; - /** - * The maximum number of resize events to emit per second. - * - * Defaults to 10. - */ - this.rateLimit = DEFAULT_RATE_LIMIT; - /** - * Fires when the parent DOM element has been resized. - */ - this.resize = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - this.source = new __WEBPACK_IMPORTED_MODULE_1_rxjs_Subject__["a" /* Subject */](); - this.initialized = false; - this.acceptedSize = false; - } - ResizeSensorComponent.prototype.ngAfterViewInit = function () { - var _this = this; - this.zone.runOutsideAngular(function () { - var scrollHandler = _this.scroll.bind(_this); - var detachExpand = _this.renderer.listen(_this.expand.nativeElement, 'scroll', scrollHandler); - var detachShrink = _this.renderer.listen(_this.shrink.nativeElement, 'scroll', scrollHandler); - _this.detachScrollHandlers = function () { - detachExpand(); - detachShrink(); - }; - }); - }; - ResizeSensorComponent.prototype.ngAfterViewChecked = function () { - var _this = this; - if (typeof document === 'undefined') { - return; - } - if (this.initialized) { - this.scroll(); - return; - } - var throttleTime = 1000 / (this.rateLimit || DEFAULT_RATE_LIMIT); - this.subscription = this.source.asObservable() - .auditTime(throttleTime) - .subscribe(function () { - if (!_this.acceptedSize) { - _this.resize.emit(); - } - }); - this.parentElement = this.element.nativeElement.parentElement; - if (computedProp(this.parentElement, 'position') === 'static') { - this.parentElement.style.position = 'relative'; - } - this.reset(); - this.lastWidth = this.parentElement.offsetWidth; - this.lastHeight = this.parentElement.offsetHeight; - this.initialized = true; - }; - ResizeSensorComponent.prototype.ngOnDestroy = function () { - if (this.subscription) { - this.subscription.unsubscribe(); - } - if (this.detachScrollHandlers) { - this.detachScrollHandlers(); - } - }; - /** - * Sets the passed size or the element size as current. - */ - ResizeSensorComponent.prototype.acceptSize = function (size) { - if (size === void 0) { size = this.measure(); } - this.lastWidth = size.width; - this.lastHeight = size.height; - this.acceptedSize = true; - }; - /** - * @hidden - */ - ResizeSensorComponent.prototype.scroll = function (_event) { - var _this = this; - if (!this.parentElement) { - return; - } - var _a = this.measure(), width = _a.width, height = _a.height; - var sameSize = width === this.lastWidth && height === this.lastHeight; - if (sameSize) { - return; - } - this.lastWidth = width; - this.lastHeight = height; - this.acceptedSize = false; - this.zone.runOutsideAngular(function () { - _this.source.next(); - }); - this.reset(); - }; - ResizeSensorComponent.prototype.reset = function () { - var expandChild = this.expandChild.nativeElement; - expandChild.style.width = 100000 + 'px'; - expandChild.style.height = 100000 + 'px'; - var expand = this.expand.nativeElement; - expand.scrollLeft = 100000; - expand.scrollTop = 100000; - var shrink = this.shrink.nativeElement; - shrink.scrollLeft = 100000; - shrink.scrollTop = 100000; - }; - ResizeSensorComponent.prototype.measure = function () { - return { - height: this.parentElement.offsetHeight, - width: this.parentElement.offsetWidth - }; - }; - return ResizeSensorComponent; -}()); - -ResizeSensorComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'kendo-resize-sensor', - styles: [':host { ' + WRAP_STYLE + ' }'], - template: '
' + - '
' + - '
' + - '
' + - '
' + - '
' - },] }, -]; -/** @nocollapse */ -ResizeSensorComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["O" /* NgZone */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["X" /* Renderer2 */], }, -]; }; -ResizeSensorComponent.propDecorators = { - 'rateLimit': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - 'resize': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */] },], - 'expand': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['expand',] },], - 'expandChild': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['expandChild',] },], - 'shrink': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['shrink',] },], -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-angular-resize-sensor/dist/es/resize-sensor.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ResizeSensorModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__resize_sensor_component__ = __webpack_require__("../../../../@progress/kendo-angular-resize-sensor/dist/es/resize-sensor.component.js"); - - -var COMPONENT_DIRECTIVES = [__WEBPACK_IMPORTED_MODULE_1__resize_sensor_component__["a" /* ResizeSensorComponent */]]; -/** - * Resize Sensor module - */ -var ResizeSensorModule = (function () { - function ResizeSensorModule() { - } - return ResizeSensorModule; -}()); - -ResizeSensorModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - declarations: [COMPONENT_DIRECTIVES], - exports: [COMPONENT_DIRECTIVES] - },] }, -]; -/** @nocollapse */ -ResizeSensorModule.ctorParameters = function () { return []; }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__chart_api_elements__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/api-elements.js"); -/* unused harmony namespace reexport */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__chart_aggregates_aggregates__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/aggregates/aggregates.js"); -/* unused harmony reexport Aggregates */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__chart_area_chart_area_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/area-chart.js"); -/* unused harmony reexport AreaChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__chart_area_chart_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/area-segment.js"); -/* unused harmony reexport AreaSegment */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__chart_axis_group_range_tracker__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/axis-group-range-tracker.js"); -/* unused harmony reexport AxisGroupRangeTracker */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__chart_bar_chart_bar__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar.js"); -/* unused harmony reexport Bar */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__chart_bar_chart_bar_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar-chart.js"); -/* unused harmony reexport BarChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__chart_bar_chart_bar_label__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar-label.js"); -/* unused harmony reexport BarLabel */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__chart_box_plot_chart_box_plot_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/box-plot-chart/box-plot-chart.js"); -/* unused harmony reexport BoxPlotChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__chart_box_plot_chart_box_plot__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/box-plot-chart/box-plot.js"); -/* unused harmony reexport BoxPlot */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__chart_bubble_chart_bubble_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bubble-chart/bubble-chart.js"); -/* unused harmony reexport BubbleChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__chart_bullet_chart_bullet__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bullet-chart/bullet.js"); -/* unused harmony reexport Bullet */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__chart_bullet_chart_bullet_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bullet-chart/bullet-chart.js"); -/* unused harmony reexport BulletChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__chart_candlestick_chart_candlestick_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/candlestick-chart/candlestick-chart.js"); -/* unused harmony reexport CandlestickChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__chart_candlestick_chart_candlestick__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/candlestick-chart/candlestick.js"); -/* unused harmony reexport Candlestick */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__chart_categorical_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/categorical-chart.js"); -/* unused harmony reexport CategoricalChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__chart_error_bars_categorical_error_bar__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/error-bars/categorical-error-bar.js"); -/* unused harmony reexport CategoricalErrorBar */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__chart_plotarea_categorical_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/categorical-plotarea.js"); -/* unused harmony reexport CategoricalPlotArea */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__chart_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/chart.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_18__chart_chart__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__chart_chart_container__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/chart-container.js"); -/* unused harmony reexport ChartContainer */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__chart_animations_clip_animation__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/animations/clip-animation.js"); -/* unused harmony reexport ClipAnimation */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__chart_layout_cluster_layout__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/layout/cluster-layout.js"); -/* unused harmony reexport ClusterLayout */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__chart_crosshair_crosshair__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/crosshair/crosshair.js"); -/* unused harmony reexport Crosshair */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__chart_crosshair_crosshair_tooltip__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/crosshair/crosshair-tooltip.js"); -/* unused harmony reexport CrosshairTooltip */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__chart_aggregates_default_aggregates__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/aggregates/default-aggregates.js"); -/* unused harmony reexport DefaultAggregates */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__chart_donut_chart_donut_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/donut-chart/donut-chart.js"); -/* unused harmony reexport DonutChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__chart_plotarea_donut_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/donut-plotarea.js"); -/* unused harmony reexport DonutPlotArea */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__chart_donut_chart_donut_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/donut-chart/donut-segment.js"); -/* unused harmony reexport DonutSegment */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__chart_error_bars_error_bar_base__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/error-bars/error-bar-base.js"); -/* unused harmony reexport ErrorBarBase */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__chart_error_bars_error_range_calculator__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/error-bars/error-range-calculator.js"); -/* unused harmony reexport ErrorRangeCalculator */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__chart_highlight__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/highlight.js"); -/* unused harmony reexport Highlight */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__chart_tooltip_shared_tooltip__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/tooltip/shared-tooltip.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_31__chart_tooltip_shared_tooltip__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__chart_legend_legend__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/legend/legend.js"); -/* unused harmony reexport Legend */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__chart_legend_legend_item__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/legend/legend-item.js"); -/* unused harmony reexport LegendItem */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__chart_legend_legend_layout__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/legend/legend-layout.js"); -/* unused harmony reexport LegendLayout */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__chart_line_chart_line_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-chart.js"); -/* unused harmony reexport LineChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__chart_line_chart_line_point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-point.js"); -/* unused harmony reexport LinePoint */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__chart_line_chart_line_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-segment.js"); -/* unused harmony reexport LineSegment */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__chart_pane__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pane.js"); -/* unused harmony reexport Pane */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__chart_animations_pie_animation__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/animations/pie-animation.js"); -/* unused harmony reexport PieAnimation */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__chart_pie_chart_pie_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pie-chart/pie-chart.js"); -/* unused harmony reexport PieChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__chart_mixins_pie_chart_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/pie-chart-mixin.js"); -/* unused harmony reexport PieChartMixin */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__chart_plotarea_pie_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/pie-plotarea.js"); -/* unused harmony reexport PiePlotArea */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__chart_pie_chart_pie_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pie-chart/pie-segment.js"); -/* unused harmony reexport PieSegment */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__chart_plotarea_plotarea_base__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/plotarea-base.js"); -/* unused harmony reexport PlotAreaBase */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__chart_mixins_plotarea_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/plotarea-events-mixin.js"); -/* unused harmony reexport PlotAreaEventsMixin */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__chart_plotarea_plotarea_factory__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/plotarea-factory.js"); -/* unused harmony reexport PlotAreaFactory */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__chart_mixins_point_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/point-events-mixin.js"); -/* unused harmony reexport PointEventsMixin */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__chart_range_bar_chart_range_bar__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-bar-chart/range-bar.js"); -/* unused harmony reexport RangeBar */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__chart_range_bar_chart_range_bar_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-bar-chart/range-bar-chart.js"); -/* unused harmony reexport RangeBarChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__chart_range_area_chart_range_area_point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/range-area-point.js"); -/* unused harmony reexport RangeAreaPoint */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_51__chart_range_area_chart_range_area_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/range-area-chart.js"); -/* unused harmony reexport RangeAreaChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_52__chart_scatter_charts_scatter_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/scatter-charts/scatter-chart.js"); -/* unused harmony reexport ScatterChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_53__chart_error_bars_scatter_error_bar__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/error-bars/scatter-error-bar.js"); -/* unused harmony reexport ScatterErrorBar */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_54__chart_scatter_charts_scatter_line_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/scatter-charts/scatter-line-chart.js"); -/* unused harmony reexport ScatterLineChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_55__chart_selection__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/selection.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_55__chart_selection__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_56__chart_aggregates_series_aggregator__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/aggregates/series-aggregator.js"); -/* unused harmony reexport SeriesAggregator */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_57__chart_series_binder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/series-binder.js"); -/* unused harmony reexport SeriesBinder */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_58__chart_line_chart_spline_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/spline-segment.js"); -/* unused harmony reexport SplineSegment */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_59__chart_area_chart_spline_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/spline-area-segment.js"); -/* unused harmony reexport SplineAreaSegment */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__chart_layout_stack_wrap__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/layout/stack-wrap.js"); -/* unused harmony reexport StackWrap */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_61__chart_tooltip_tooltip__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/tooltip/tooltip.js"); -/* unused harmony reexport Tooltip */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_62__chart_ohlc_chart_ohlc_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/ohlc-chart/ohlc-chart.js"); -/* unused harmony reexport OHLCChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_63__chart_ohlc_chart_ohlc_point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/ohlc-chart/ohlc-point.js"); -/* unused harmony reexport OHLCPoint */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_64__chart_waterfall_chart_waterfall_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/waterfall-chart/waterfall-chart.js"); -/* unused harmony reexport WaterfallChart */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__chart_waterfall_chart_waterfall_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/waterfall-chart/waterfall-segment.js"); -/* unused harmony reexport WaterfallSegment */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_66__chart_plotarea_xy_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/xy-plotarea.js"); -/* unused harmony reexport XYPlotArea */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_67__chart_pan_and_zoom_mousewheel_zoom__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/mousewheel-zoom.js"); -/* unused harmony reexport MousewheelZoom */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_68__chart_pan_and_zoom_zoom_selection__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/zoom-selection.js"); -/* unused harmony reexport ZoomSelection */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_69__chart_pan_and_zoom_pannable__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/pannable.js"); -/* unused harmony reexport Pannable */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_70__chart_utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_70__chart_utils__["g"]; }); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/aggregates/aggregates.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_count_numbers__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/count-numbers.js"); - - - - - -var Aggregates = { - min: function(values) { - var length = values.length; - var min = __WEBPACK_IMPORTED_MODULE_0__common_constants__["s" /* MAX_VALUE */]; - - for (var i = 0; i < length; i++) { - var value = values[i]; - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["B" /* isNumber */])(value)) { - min = Math.min(min, value); - } - } - - return min === __WEBPACK_IMPORTED_MODULE_0__common_constants__["s" /* MAX_VALUE */] ? values[0] : min; - }, - - max: function(values) { - var length = values.length; - var max = __WEBPACK_IMPORTED_MODULE_0__common_constants__["t" /* MIN_VALUE */]; - - for (var i = 0; i < length; i++) { - var value = values[i]; - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["B" /* isNumber */])(value)) { - max = Math.max(max, value); - } - } - - return max === __WEBPACK_IMPORTED_MODULE_0__common_constants__["t" /* MIN_VALUE */] ? values[0] : max; - }, - - sum: function(values) { - var length = values.length; - var sum = 0; - - for (var i = 0; i < length; i++) { - var value = values[i]; - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["B" /* isNumber */])(value)) { - sum += value; - } - } - - return sum; - }, - - sumOrNull: function(values) { - var result = null; - - if (Object(__WEBPACK_IMPORTED_MODULE_2__utils_count_numbers__["a" /* default */])(values)) { - result = Aggregates.sum(values); - } - - return result; - }, - - count: function(values) { - var length = values.length; - var count = 0; - - for (var i = 0; i < length; i++) { - var value = values[i]; - if (value !== null && Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(value)) { - count++; - } - } - - return count; - }, - - avg: function(values) { - var count = Object(__WEBPACK_IMPORTED_MODULE_2__utils_count_numbers__["a" /* default */])(values); - var result = values[0]; - - if (count > 0) { - result = Aggregates.sum(values) / count; - } - - return result; - }, - - first: function(values) { - var length = values.length; - - for (var i = 0; i < length; i++) { - var value = values[i]; - if (value !== null && Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(value)) { - return value; - } - } - - return values[0]; - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (Aggregates); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/aggregates/default-aggregates.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - -var DefaultAggregates = (function (Class) { - function DefaultAggregates() { - Class.call(this); - - this._defaults = {}; - } - - if ( Class ) DefaultAggregates.__proto__ = Class; - DefaultAggregates.prototype = Object.create( Class && Class.prototype ); - DefaultAggregates.prototype.constructor = DefaultAggregates; - - DefaultAggregates.prototype.register = function register (seriesTypes, aggregates) { - var this$1 = this; - - for (var i = 0; i < seriesTypes.length; i++) { - this$1._defaults[seriesTypes[i]] = aggregates; - } - }; - - DefaultAggregates.prototype.query = function query (seriesType) { - return this._defaults[seriesType]; - }; - - return DefaultAggregates; -}(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* Class */])); - -DefaultAggregates.current = new DefaultAggregates(); - -/* harmony default export */ __webpack_exports__["a"] = (DefaultAggregates); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/aggregates/series-aggregator.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__aggregates__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/aggregates/aggregates.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - -var SeriesAggregator = (function (Class) { - function SeriesAggregator(series, binder, defaultAggregates) { - Class.call(this); - - var canonicalFields = binder.canonicalFields(series); - var valueFields = binder.valueFields(series); - var sourceFields = binder.sourceFields(series, canonicalFields); - var seriesFields = this._seriesFields = []; - var defaults = defaultAggregates.query(series.type); - var rootAggregate = series.aggregate || defaults; - - this._series = series; - this._binder = binder; - - for (var i = 0; i < canonicalFields.length; i++) { - var field = canonicalFields[i]; - var fieldAggregate = (void 0); - - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["C" /* isObject */])(rootAggregate)) { - fieldAggregate = rootAggregate[field]; - } else if (i === 0 || Object(__WEBPACK_IMPORTED_MODULE_1__common__["x" /* inArray */])(field, valueFields)) { - fieldAggregate = rootAggregate; - } else { - break; - } - - if (fieldAggregate) { - seriesFields.push({ - canonicalName: field, - name: sourceFields[i], - transform: Object(__WEBPACK_IMPORTED_MODULE_1__common__["A" /* isFunction */])(fieldAggregate) ? fieldAggregate : __WEBPACK_IMPORTED_MODULE_0__aggregates__["a" /* default */][fieldAggregate] - }); - } - } - } - - if ( Class ) SeriesAggregator.__proto__ = Class; - SeriesAggregator.prototype = Object.create( Class && Class.prototype ); - SeriesAggregator.prototype.constructor = SeriesAggregator; - - SeriesAggregator.prototype.aggregatePoints = function aggregatePoints (srcPoints, group) { - var this$1 = this; - - var ref = this; - var series = ref._series; - var seriesFields = ref._seriesFields; - var data = this._bindPoints(srcPoints || []); - var firstDataItem = data.dataItems[0]; - var result = {}; - - if (firstDataItem && !Object(__WEBPACK_IMPORTED_MODULE_1__common__["B" /* isNumber */])(firstDataItem) && !Object(__WEBPACK_IMPORTED_MODULE_1__common__["z" /* isArray */])(firstDataItem)) { - var fn = function() {}; - fn.prototype = firstDataItem; - result = new fn(); - } - - for (var i = 0; i < seriesFields.length; i++) { - var field = seriesFields[i]; - var srcValues = this$1._bindField(data.values, field.canonicalName); - var value = field.transform(srcValues, series, data.dataItems, group); - - if (value !== null && Object(__WEBPACK_IMPORTED_MODULE_1__common__["C" /* isObject */])(value) && !Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(value.length) && !(value instanceof Date)) { - result = value; - break; - } else { - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(value)) { - setValue(field.name, result, value); - } - } - } - - return result; - }; - - SeriesAggregator.prototype._bindPoints = function _bindPoints (points) { - var ref = this; - var binder = ref._binder; - var series = ref._series; - var values = []; - var dataItems = []; - - for (var i = 0; i < points.length; i++) { - var pointIx = points[i]; - - values.push(binder.bindPoint(series, pointIx)); - dataItems.push(series.data[pointIx]); - } - - return { - values: values, - dataItems: dataItems - }; - }; - - SeriesAggregator.prototype._bindField = function _bindField (data, field) { - var values = []; - var count = data.length; - - for (var i = 0; i < count; i++) { - var item = data[i]; - var valueFields = item.valueFields; - var value = (void 0); - - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(valueFields[field])) { - value = valueFields[field]; - } else { - value = item.fields[field]; - } - - values.push(value); - } - - return values; - }; - - return SeriesAggregator; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -function setValue(fieldName, target, value) { - var parentObj = target; - var field = fieldName; - - if (fieldName.indexOf(".") > -1) { - var parts = fieldName.split("."); - - while (parts.length > 1) { - field = parts.shift(); - if (!Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(parentObj[field])) { - parentObj[field] = {}; - } - parentObj = parentObj[field]; - } - field = parts.shift(); - } - - parentObj[field] = value; -} - -/* harmony default export */ __webpack_exports__["a"] = (SeriesAggregator); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/animations.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__animations_bar_chart_animation__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/animations/bar-chart-animation.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__animations_bubble_animation__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/animations/bubble-animation.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__animations_fade_in_animation__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/animations/fade-in-animation.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__animations_clip_animation__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/animations/clip-animation.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__animations_pie_animation__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/animations/pie-animation.js"); - - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/animations/bar-chart-animation.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - -var BarChartAnimation = (function (superclass) { - function BarChartAnimation () { - superclass.apply(this, arguments); - } - - if ( superclass ) BarChartAnimation.__proto__ = superclass; - BarChartAnimation.prototype = Object.create( superclass && superclass.prototype ); - BarChartAnimation.prototype.constructor = BarChartAnimation; - - BarChartAnimation.prototype.setup = function setup () { - var ref = this; - var element = ref.element; - var options = ref.options; - var bbox = element.bbox(); - - if (bbox) { - this.origin = options.origin; - var axis = options.vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - - var fromScale = this.fromScale = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(1, 1); - fromScale[axis] = __WEBPACK_IMPORTED_MODULE_1__constants__["_6" /* START_SCALE */]; - - element.transform(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform() - .scale(fromScale.x, fromScale.y) - ); - } else { - this.abort(); - } - }; - - BarChartAnimation.prototype.step = function step (pos) { - var scaleX = Object(__WEBPACK_IMPORTED_MODULE_3__common__["y" /* interpolateValue */])(this.fromScale.x, 1, pos); - var scaleY = Object(__WEBPACK_IMPORTED_MODULE_3__common__["y" /* interpolateValue */])(this.fromScale.y, 1, pos); - - this.element.transform(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform() - .scale(scaleX, scaleY, this.origin) - ); - }; - - BarChartAnimation.prototype.abort = function abort () { - superclass.prototype.abort.call(this); - this.element.transform(null); - }; - - return BarChartAnimation; -}(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Animation)); - -Object(__WEBPACK_IMPORTED_MODULE_3__common__["M" /* setDefaultOptions */])(BarChartAnimation, { - duration: __WEBPACK_IMPORTED_MODULE_1__constants__["x" /* INITIAL_ANIMATION_DURATION */] -}); - -__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].AnimationFactory.current.register(__WEBPACK_IMPORTED_MODULE_1__constants__["c" /* BAR */], BarChartAnimation); - -/* unused harmony default export */ var _unused_webpack_default_export = (BarChartAnimation); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/animations/bubble-animation.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var BubbleAnimation = (function (superclass) { - function BubbleAnimation () { - superclass.apply(this, arguments); - } - - if ( superclass ) BubbleAnimation.__proto__ = superclass; - BubbleAnimation.prototype = Object.create( superclass && superclass.prototype ); - BubbleAnimation.prototype.constructor = BubbleAnimation; - - BubbleAnimation.prototype.setup = function setup () { - var center = this.center = this.element.bbox().center(); - this.element.transform(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform() - .scale(__WEBPACK_IMPORTED_MODULE_1__constants__["_6" /* START_SCALE */], __WEBPACK_IMPORTED_MODULE_1__constants__["_6" /* START_SCALE */], center) - ); - }; - - BubbleAnimation.prototype.step = function step (pos) { - this.element.transform(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform() - .scale(pos, pos, this.center) - ); - }; - - return BubbleAnimation; -}(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Animation)); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["M" /* setDefaultOptions */])(BubbleAnimation, { - easing: "easeOutElastic" -}); - -__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].AnimationFactory.current.register(__WEBPACK_IMPORTED_MODULE_1__constants__["g" /* BUBBLE */], BubbleAnimation); - -/* unused harmony default export */ var _unused_webpack_default_export = (BubbleAnimation); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/animations/clip-animation.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var ClipAnimation = (function (superclass) { - function ClipAnimation () { - superclass.apply(this, arguments); - } - - if ( superclass ) ClipAnimation.__proto__ = superclass; - ClipAnimation.prototype = Object.create( superclass && superclass.prototype ); - ClipAnimation.prototype.constructor = ClipAnimation; - - ClipAnimation.prototype.setup = function setup () { - this._setEnd(this.options.box.x1); - }; - - ClipAnimation.prototype.step = function step (pos) { - var box = this.options.box; - this._setEnd(Object(__WEBPACK_IMPORTED_MODULE_2__common__["y" /* interpolateValue */])(box.x1, box.x2, pos)); - }; - - ClipAnimation.prototype._setEnd = function _setEnd (x) { - var element = this.element; - var segments = element.segments; - var topRight = segments[1].anchor(); - var bottomRight = segments[2].anchor(); - - element.suspend(); - topRight.setX(x); - element.resume(); - bottomRight.setX(x); - }; - - return ClipAnimation; -}(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Animation)); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["M" /* setDefaultOptions */])(ClipAnimation, { - duration: __WEBPACK_IMPORTED_MODULE_1__constants__["x" /* INITIAL_ANIMATION_DURATION */] -}); - -__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].AnimationFactory.current.register("clip", ClipAnimation); - -/* harmony default export */ __webpack_exports__["a"] = (ClipAnimation); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/animations/fade-in-animation.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var FadeInAnimation = (function (superclass) { - function FadeInAnimation () { - superclass.apply(this, arguments); - } - - if ( superclass ) FadeInAnimation.__proto__ = superclass; - FadeInAnimation.prototype = Object.create( superclass && superclass.prototype ); - FadeInAnimation.prototype.constructor = FadeInAnimation; - - FadeInAnimation.prototype.setup = function setup () { - this.fadeTo = this.element.opacity(); - this.element.opacity(0); - }; - - FadeInAnimation.prototype.step = function step (pos) { - this.element.opacity(pos * this.fadeTo); - }; - - return FadeInAnimation; -}(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Animation)); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["M" /* setDefaultOptions */])(FadeInAnimation, { - duration: 200, - easing: "linear" -}); - -__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].AnimationFactory.current.register(__WEBPACK_IMPORTED_MODULE_1__constants__["s" /* FADEIN */], FadeInAnimation); - -/* unused harmony default export */ var _unused_webpack_default_export = (FadeInAnimation); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/animations/pie-animation.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var PieAnimation = (function (superclass) { - function PieAnimation () { - superclass.apply(this, arguments); - } - - if ( superclass ) PieAnimation.__proto__ = superclass; - PieAnimation.prototype = Object.create( superclass && superclass.prototype ); - PieAnimation.prototype.constructor = PieAnimation; - - PieAnimation.prototype.setup = function setup () { - this.element.transform(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform() - .scale(__WEBPACK_IMPORTED_MODULE_1__constants__["_6" /* START_SCALE */], __WEBPACK_IMPORTED_MODULE_1__constants__["_6" /* START_SCALE */], this.options.center) - ); - }; - - PieAnimation.prototype.step = function step (pos) { - this.element.transform(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform() - .scale(pos, pos, this.options.center) - ); - }; - - return PieAnimation; -}(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Animation)); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["M" /* setDefaultOptions */])(PieAnimation, { - easing: "easeOutElastic", - duration: __WEBPACK_IMPORTED_MODULE_1__constants__["x" /* INITIAL_ANIMATION_DURATION */] -}); - -__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].AnimationFactory.current.register(__WEBPACK_IMPORTED_MODULE_1__constants__["K" /* PIE */], PieAnimation); - -/* unused harmony default export */ var _unused_webpack_default_export = (PieAnimation); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/api-elements.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api_elements_chart_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/api-elements/chart-axis.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__api_elements_chart_axis__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__api_elements_chart_pane__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/api-elements/chart-pane.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__api_elements_chart_pane__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__api_elements_chart_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/api-elements/chart-plotarea.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__api_elements_chart_plotarea__["a"]; }); - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/api-elements/chart-axis.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - -var ChartAxis = (function (Class) { - function ChartAxis(axis) { - Class.call(this); - - this._axis = axis; - this.options = axis.options; - } - - if ( Class ) ChartAxis.__proto__ = Class; - ChartAxis.prototype = Object.create( Class && Class.prototype ); - ChartAxis.prototype.constructor = ChartAxis; - - ChartAxis.prototype.value = function value (point) { - var axis = this._axis; - var value = axis.getCategory ? axis.getCategory(point) : axis.getValue(point); - - return value; - }; - - ChartAxis.prototype.slot = function slot (from, to, limit) { - if ( limit === void 0 ) limit = true; - - return this._axis.slot(from, to, limit); - }; - - ChartAxis.prototype.range = function range () { - return this._axis.range(); - }; - - ChartAxis.prototype.valueRange = function valueRange () { - return this._axis.valueRange(); - }; - - return ChartAxis; -}(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* Class */])); - -/* harmony default export */ __webpack_exports__["a"] = (ChartAxis); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/api-elements/chart-pane.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var ChartPane = function ChartPane(pane) { - this.visual = pane.visual; - this.chartsVisual = pane.chartContainer.visual; -}; - -/* harmony default export */ __webpack_exports__["a"] = (ChartPane); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/api-elements/chart-plotarea.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - -var ChartPlotArea = (function (Class) { - function ChartPlotArea(plotArea) { - Class.call(this); - - this._plotArea = plotArea; - this.visual = plotArea.visual; - this.backgroundVisual = plotArea._bgVisual; - } - - if ( Class ) ChartPlotArea.__proto__ = Class; - ChartPlotArea.prototype = Object.create( Class && Class.prototype ); - ChartPlotArea.prototype.constructor = ChartPlotArea; - - return ChartPlotArea; -}(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* Class */])); - -/* harmony default export */ __webpack_exports__["a"] = (ChartPlotArea); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/area-chart/area-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__line_chart_line_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__line_chart_line_point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/area-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__step_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/step-area-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__spline_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/spline-area-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); - - - - - - - - - -var AreaChart = (function (LineChart) { - function AreaChart () { - LineChart.apply(this, arguments); - } - - if ( LineChart ) AreaChart.__proto__ = LineChart; - AreaChart.prototype = Object.create( LineChart && LineChart.prototype ); - AreaChart.prototype.constructor = AreaChart; - - AreaChart.prototype.createSegment = function createSegment (linePoints, currentSeries, seriesIx, prevSegment) { - var isStacked = this.options.isStacked; - var style = (currentSeries.line || {}).style; - var previousSegment; - - var stackPoints; - if (isStacked && seriesIx > 0 && prevSegment) { - var missingValues = this.seriesMissingValues(currentSeries); - if (missingValues !== "gap") { - stackPoints = prevSegment.linePoints; - previousSegment = prevSegment; - } else { - stackPoints = this._gapStackPoints(linePoints, seriesIx, style); - } - } - - var pointType; - if (style === __WEBPACK_IMPORTED_MODULE_5__constants__["_7" /* STEP */]) { - pointType = __WEBPACK_IMPORTED_MODULE_3__step_area_segment__["a" /* default */]; - } else if (style === __WEBPACK_IMPORTED_MODULE_5__constants__["_5" /* SMOOTH */]) { - pointType = __WEBPACK_IMPORTED_MODULE_4__spline_area_segment__["a" /* default */]; - } else { - pointType = __WEBPACK_IMPORTED_MODULE_2__area_segment__["a" /* default */]; - } - - return new pointType(linePoints, currentSeries, seriesIx, previousSegment, stackPoints); - }; - - AreaChart.prototype.reflow = function reflow (targetBox) { - var this$1 = this; - - LineChart.prototype.reflow.call(this, targetBox); - - var stackPoints = this._stackPoints; - if (stackPoints) { - for (var idx = 0; idx < stackPoints.length; idx++) { - var stackPoint = stackPoints[idx]; - var pointSlot = this$1.categoryAxis.getSlot(stackPoint.categoryIx); - stackPoint.reflow(pointSlot); - } - } - }; - - AreaChart.prototype._gapStackPoints = function _gapStackPoints (linePoints, seriesIx, style) { - var this$1 = this; - - var seriesPoints = this.seriesPoints; - var startIdx = linePoints[0].categoryIx; - var length = linePoints.length; - if (startIdx < 0) { - startIdx = 0; - length--; - } - - var endIdx = startIdx + length; - var pointOffset = this.seriesOptions[0]._outOfRangeMinPoint ? 1 : 0; - var stackPoints = []; - - this._stackPoints = this._stackPoints || []; - for (var categoryIx = startIdx; categoryIx < endIdx; categoryIx++) { - var pointIx = categoryIx + pointOffset; - var currentSeriesIx = seriesIx; - var point = (void 0); - - do { - currentSeriesIx--; - point = seriesPoints[currentSeriesIx][pointIx]; - } while (currentSeriesIx > 0 && !point); - - if (point) { - if (style !== __WEBPACK_IMPORTED_MODULE_5__constants__["_7" /* STEP */] && categoryIx > startIdx && !seriesPoints[currentSeriesIx][pointIx - 1]) { - stackPoints.push(this$1._previousSegmentPoint(categoryIx, pointIx, pointIx - 1, currentSeriesIx)); - } - - stackPoints.push(point); - - if (style !== __WEBPACK_IMPORTED_MODULE_5__constants__["_7" /* STEP */] && categoryIx + 1 < endIdx && !seriesPoints[currentSeriesIx][pointIx + 1]) { - stackPoints.push(this$1._previousSegmentPoint(categoryIx, pointIx, pointIx + 1, currentSeriesIx)); - } - } else { - var gapStackPoint = this$1._createGapStackPoint(categoryIx); - this$1._stackPoints.push(gapStackPoint); - stackPoints.push(gapStackPoint); - } - } - - return stackPoints; - }; - - AreaChart.prototype._previousSegmentPoint = function _previousSegmentPoint (categoryIx, pointIx, segmentIx, seriesIdx) { - var seriesPoints = this.seriesPoints; - var index = seriesIdx; - var point; - - while (index > 0 && !point) { - index--; - point = seriesPoints[index][segmentIx]; - } - - if (!point) { - point = this._createGapStackPoint(categoryIx); - this._stackPoints.push(point); - } else { - point = seriesPoints[index][pointIx]; - } - - return point; - }; - - AreaChart.prototype._createGapStackPoint = function _createGapStackPoint (categoryIx) { - var options = this.pointOptions({}, 0); - var point = new __WEBPACK_IMPORTED_MODULE_1__line_chart_line_point__["a" /* default */](0, options); - point.categoryIx = categoryIx; - point.series = {}; - - return point; - }; - - AreaChart.prototype.seriesMissingValues = function seriesMissingValues (series) { - return series.missingValues || __WEBPACK_IMPORTED_MODULE_5__constants__["_19" /* ZERO */]; - }; - - return AreaChart; -}(__WEBPACK_IMPORTED_MODULE_0__line_chart_line_chart__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (AreaChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/area-chart/area-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__line_chart_line_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var AreaSegment = (function (LineSegment) { - function AreaSegment(linePoints, currentSeries, seriesIx, prevSegment, stackPoints) { - LineSegment.call(this, linePoints, currentSeries, seriesIx); - - this.prevSegment = prevSegment; - this.stackPoints = stackPoints; - } - - if ( LineSegment ) AreaSegment.__proto__ = LineSegment; - AreaSegment.prototype = Object.create( LineSegment && LineSegment.prototype ); - AreaSegment.prototype.constructor = AreaSegment; - - AreaSegment.prototype.createVisual = function createVisual () { - var series = this.series; - var defaults = series._defaults; - var lineOptions = series.line || {}; - var color = series.color; - - if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["A" /* isFunction */])(color) && defaults) { - color = defaults.color; - } - - this.visual = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group({ - zIndex: series.zIndex - }); - - this.createFill({ - fill: { - color: color, - opacity: series.opacity - }, - stroke: null - }); - - if (lineOptions.width > 0 && lineOptions.visible !== false) { - this.createStroke({ - stroke: Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])({ - color: color, - opacity: series.opacity, - lineCap: "butt" - }, lineOptions) - }); - } - }; - - AreaSegment.prototype.strokeSegments = function strokeSegments () { - var segments = this._strokeSegments; - - if (!segments) { - segments = this._strokeSegments = this.createStrokeSegments(); - } - - return segments; - }; - - AreaSegment.prototype.createStrokeSegments = function createStrokeSegments () { - return this.segmentsFromPoints(this.points()); - }; - - AreaSegment.prototype.stackSegments = function stackSegments () { - if (this.prevSegment) { - return this.prevSegment.createStackSegments(this.stackPoints); - } - - return this.createStackSegments(this.stackPoints); - }; - - AreaSegment.prototype.createStackSegments = function createStackSegments (stackPoints) { - return this.segmentsFromPoints(this.toGeometryPoints(stackPoints)).reverse(); - }; - - AreaSegment.prototype.segmentsFromPoints = function segmentsFromPoints (points) { - return points.map(function (point) { return new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Segment(point); }); - }; - - AreaSegment.prototype.createStroke = function createStroke (style) { - var stroke = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path(style); - stroke.segments.push.apply(stroke.segments, this.strokeSegments()); - - this.visual.append(stroke); - }; - - AreaSegment.prototype.hasStackSegment = function hasStackSegment () { - return this.prevSegment || (this.stackPoints && this.stackPoints.length); - }; - - AreaSegment.prototype.createFill = function createFill (style) { - var strokeSegments = this.strokeSegments(); - var fillSegments = strokeSegments.slice(0); - var hasStackSegments = this.hasStackSegment(); - - if (hasStackSegments) { - var stackSegments = this.stackSegments(); - - Object(__WEBPACK_IMPORTED_MODULE_2__common__["g" /* append */])(fillSegments, stackSegments); - } - - var fill = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path(style); - fill.segments.push.apply(fill.segments, fillSegments); - - if (!hasStackSegments && strokeSegments.length > 1) { - this.fillToAxes(fill); - } - - this.visual.append(fill); - }; - - AreaSegment.prototype.fillToAxes = function fillToAxes (fillPath) { - var chart = this.parent; - var invertAxes = chart.options.invertAxes; - var valueAxis = chart.seriesValueAxis(this.series); - var crossingValue = chart.categoryAxisCrossingValue(valueAxis); - var endSlot = valueAxis.getSlot(crossingValue, crossingValue, true); - var segments = this.strokeSegments(); - var firstPoint = segments[0].anchor(); - var lastPoint = Object(__WEBPACK_IMPORTED_MODULE_2__common__["E" /* last */])(segments).anchor(); - var end = invertAxes ? endSlot.x1 : endSlot.y1; - - if (invertAxes) { - fillPath.lineTo(end, lastPoint.y) - .lineTo(end, firstPoint.y); - } else { - fillPath.lineTo(lastPoint.x, end) - .lineTo(firstPoint.x, end); - } - }; - - return AreaSegment; -}(__WEBPACK_IMPORTED_MODULE_1__line_chart_line_segment__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (AreaSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/area-chart/spline-area-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/area-segment.js"); - - - - - -var SplineAreaSegment = (function (AreaSegment) { - function SplineAreaSegment () { - AreaSegment.apply(this, arguments); - } - - if ( AreaSegment ) SplineAreaSegment.__proto__ = AreaSegment; - SplineAreaSegment.prototype = Object.create( AreaSegment && AreaSegment.prototype ); - SplineAreaSegment.prototype.constructor = SplineAreaSegment; - - SplineAreaSegment.prototype.createStrokeSegments = function createStrokeSegments () { - var curveProcessor = new __WEBPACK_IMPORTED_MODULE_1__core__["e" /* CurveProcessor */](this.options.closed); - var linePoints = this.points(); - - return curveProcessor.process(linePoints); - }; - - SplineAreaSegment.prototype.createStackSegments = function createStackSegments () { - var strokeSegments = this.strokeSegments(); - var stackSegments = []; - for (var idx = strokeSegments.length - 1; idx >= 0; idx--) { - var segment = strokeSegments[idx]; - stackSegments.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Segment( - segment.anchor(), - segment.controlOut(), - segment.controlIn() - )); - } - - return stackSegments; - }; - - return SplineAreaSegment; -}(__WEBPACK_IMPORTED_MODULE_2__area_segment__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (SplineAreaSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/area-chart/step-area-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__line_chart_step_line_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/step-line-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/area-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var StepAreaSegment = (function (AreaSegment) { - function StepAreaSegment () { - AreaSegment.apply(this, arguments); - } - - if ( AreaSegment ) StepAreaSegment.__proto__ = AreaSegment; - StepAreaSegment.prototype = Object.create( AreaSegment && AreaSegment.prototype ); - StepAreaSegment.prototype.constructor = StepAreaSegment; - - StepAreaSegment.prototype.createStrokeSegments = function createStrokeSegments () { - return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints)); - }; - - StepAreaSegment.prototype.createStackSegments = function createStackSegments (stackPoints) { - return this.segmentsFromPoints(this.calculateStepPoints(stackPoints)).reverse(); - }; - - return StepAreaSegment; -}(__WEBPACK_IMPORTED_MODULE_1__area_segment__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])(StepAreaSegment.prototype, __WEBPACK_IMPORTED_MODULE_0__line_chart_step_line_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (StepAreaSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/axis-group-range-tracker.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - -var AxisGroupRangeTracker = (function (Class) { - function AxisGroupRangeTracker() { - Class.call(this); - - this.axisRanges = {}; - } - - if ( Class ) AxisGroupRangeTracker.__proto__ = Class; - AxisGroupRangeTracker.prototype = Object.create( Class && Class.prototype ); - AxisGroupRangeTracker.prototype.constructor = AxisGroupRangeTracker; - - AxisGroupRangeTracker.prototype.update = function update (chartAxisRanges) { - var axisRanges = this.axisRanges; - - for (var axisName in chartAxisRanges) { - var chartRange = chartAxisRanges[axisName]; - var range = axisRanges[axisName]; - axisRanges[axisName] = range = range || { min: __WEBPACK_IMPORTED_MODULE_0__common_constants__["s" /* MAX_VALUE */], max: __WEBPACK_IMPORTED_MODULE_0__common_constants__["t" /* MIN_VALUE */] }; - - range.min = Math.min(range.min, chartRange.min); - range.max = Math.max(range.max, chartRange.max); - } - }; - - AxisGroupRangeTracker.prototype.reset = function reset (axisName) { - this.axisRanges[axisName] = undefined; - }; - - AxisGroupRangeTracker.prototype.query = function query (axisName) { - return this.axisRanges[axisName]; - }; - - return AxisGroupRangeTracker; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -/* harmony default export */ __webpack_exports__["a"] = (AxisGroupRangeTracker); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__bar__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__categorical_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/categorical-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__layout_cluster_layout__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/layout/cluster-layout.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__layout_stack_wrap__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/layout/stack-wrap.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_any_has_z_index__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/any-has-z-index.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - - - -var BarChart = (function (CategoricalChart) { - function BarChart () { - CategoricalChart.apply(this, arguments); - } - - if ( CategoricalChart ) BarChart.__proto__ = CategoricalChart; - BarChart.prototype = Object.create( CategoricalChart && CategoricalChart.prototype ); - BarChart.prototype.constructor = BarChart; - - BarChart.prototype.render = function render () { - CategoricalChart.prototype.render.call(this); - this.updateStackRange(); - }; - - BarChart.prototype.pointType = function pointType () { - return __WEBPACK_IMPORTED_MODULE_1__bar__["a" /* default */]; - }; - - BarChart.prototype.clusterType = function clusterType () { - return __WEBPACK_IMPORTED_MODULE_3__layout_cluster_layout__["a" /* default */]; - }; - - BarChart.prototype.stackType = function stackType () { - return __WEBPACK_IMPORTED_MODULE_4__layout_stack_wrap__["a" /* default */]; - }; - - BarChart.prototype.stackLimits = function stackLimits (axisName, stackName) { - var limits = CategoricalChart.prototype.stackLimits.call(this, axisName, stackName); - - return limits; - }; - - BarChart.prototype.createPoint = function createPoint (data, fields) { - var categoryIx = fields.categoryIx; - var category = fields.category; - var series = fields.series; - var seriesIx = fields.seriesIx; - var ref = this; - var options = ref.options; - var children = ref.children; - var isStacked = options.isStacked; - var value = this.pointValue(data); - var pointOptions = this.pointOptions(series, seriesIx); - - var labelOptions = pointOptions.labels; - if (isStacked) { - if (labelOptions.position === __WEBPACK_IMPORTED_MODULE_5__constants__["J" /* OUTSIDE_END */]) { - labelOptions.position = __WEBPACK_IMPORTED_MODULE_5__constants__["z" /* INSIDE_END */]; - } - } - - pointOptions.isStacked = isStacked; - - var color = data.fields.color || series.color; - if (value < 0 && pointOptions.negativeColor) { - color = pointOptions.negativeColor; - } - - pointOptions = this.evalPointOptions( - pointOptions, value, category, categoryIx, series, seriesIx - ); - - if (Object(__WEBPACK_IMPORTED_MODULE_8__common__["A" /* isFunction */])(series.color)) { - color = pointOptions.color; - } - - var pointType = this.pointType(); - var point = new pointType(value, pointOptions); - point.color = color; - - var cluster = children[categoryIx]; - if (!cluster) { - var clusterType = this.clusterType(); - cluster = new clusterType({ - vertical: options.invertAxes, - gap: options.gap, - spacing: options.spacing, - rtl: !options.invertAxes && (this.chartService || {}).rtl - }); - this.append(cluster); - } - - if (isStacked) { - var stackWrap = this.getStackWrap(series, cluster); - stackWrap.append(point); - } else { - cluster.append(point); - } - - return point; - }; - - BarChart.prototype.getStackWrap = function getStackWrap (series, cluster) { - var stack = series.stack; - var stackGroup = stack ? stack.group || stack : stack; - var wraps = cluster.children; - var stackWrap; - - if (typeof stackGroup === __WEBPACK_IMPORTED_MODULE_7__common_constants__["A" /* STRING */]) { - for (var i = 0; i < wraps.length; i++) { - if (wraps[i]._stackGroup === stackGroup) { - stackWrap = wraps[i]; - break; - } - } - } else { - stackWrap = wraps[0]; - } - - if (!stackWrap) { - var stackType = this.stackType(); - stackWrap = new stackType({ - vertical: !this.options.invertAxes - }); - stackWrap._stackGroup = stackGroup; - cluster.append(stackWrap); - } - - return stackWrap; - }; - - BarChart.prototype.categorySlot = function categorySlot (categoryAxis, categoryIx, valueAxis) { - var options = this.options; - var categorySlot = categoryAxis.getSlot(categoryIx); - var startValue = valueAxis.startValue(); - - if (options.isStacked) { - var zeroSlot = valueAxis.getSlot(startValue, startValue, true); - var stackAxis = options.invertAxes ? __WEBPACK_IMPORTED_MODULE_7__common_constants__["G" /* X */] : __WEBPACK_IMPORTED_MODULE_7__common_constants__["H" /* Y */]; - categorySlot[stackAxis + 1] = categorySlot[stackAxis + 2] = zeroSlot[stackAxis + 1]; - } - - return categorySlot; - }; - - BarChart.prototype.reflowCategories = function reflowCategories (categorySlots) { - var children = this.children; - var childrenLength = children.length; - - for (var i = 0; i < childrenLength; i++) { - children[i].reflow(categorySlots[i]); - } - }; - - BarChart.prototype.createAnimation = function createAnimation () { - this._setAnimationOptions(); - CategoricalChart.prototype.createAnimation.call(this); - - if (Object(__WEBPACK_IMPORTED_MODULE_6__utils_any_has_z_index__["a" /* default */])(this.options.series)) { - this._setChildrenAnimation(); - } - }; - - BarChart.prototype._setChildrenAnimation = function _setChildrenAnimation () { - var this$1 = this; - - var points = this.points; - - for (var idx = 0; idx < points.length; idx++) { - var point = points[idx]; - var pointVisual = point.visual; - if (pointVisual && Object(__WEBPACK_IMPORTED_MODULE_8__common__["l" /* defined */])(pointVisual.options.zIndex)) { - point.options.animation = this$1.options.animation; - point.createAnimation(); - } - } - }; - - BarChart.prototype._setAnimationOptions = function _setAnimationOptions () { - var options = this.options; - var animation = options.animation || {}; - var origin; - - if (options.isStacked) { - var valueAxis = this.seriesValueAxis(options.series[0]); - origin = valueAxis.getSlot(valueAxis.startValue()); - } else { - origin = this.categoryAxis.getSlot(0); - } - - animation.origin = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(origin.x1, origin.y1); - animation.vertical = !options.invertAxes; - }; - - return BarChart; -}(__WEBPACK_IMPORTED_MODULE_2__categorical_chart__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_8__common__["M" /* setDefaultOptions */])(BarChart, { - animation: { - type: __WEBPACK_IMPORTED_MODULE_5__constants__["c" /* BAR */] - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (BarChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar-label.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var BarLabel = (function (ChartElement) { - function BarLabel(content, options) { - ChartElement.call(this, options); - - this.textBox = new __WEBPACK_IMPORTED_MODULE_0__core__["u" /* TextBox */](content, this.options); - this.append(this.textBox); - } - - if ( ChartElement ) BarLabel.__proto__ = ChartElement; - BarLabel.prototype = Object.create( ChartElement && ChartElement.prototype ); - BarLabel.prototype.constructor = BarLabel; - - BarLabel.prototype.createVisual = function createVisual () { - this.textBox.options.noclip = this.options.noclip; - }; - - BarLabel.prototype.reflow = function reflow (targetBox) { - var options = this.options; - var vertical = options.vertical; - var aboveAxis = options.aboveAxis; - var text = this.children[0]; - var textOptions = text.options; - var box = text.box; - var padding = text.options.padding; - var labelBox = targetBox; - - textOptions.align = vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["r" /* LEFT */]; - textOptions.vAlign = vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["B" /* TOP */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */]; - - if (options.position === __WEBPACK_IMPORTED_MODULE_1__constants__["z" /* INSIDE_END */]) { - if (vertical) { - textOptions.vAlign = __WEBPACK_IMPORTED_MODULE_2__common_constants__["B" /* TOP */]; - - if (!aboveAxis && box.height() < targetBox.height()) { - textOptions.vAlign = __WEBPACK_IMPORTED_MODULE_2__common_constants__["d" /* BOTTOM */]; - } - } else { - textOptions.align = aboveAxis ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["z" /* RIGHT */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["r" /* LEFT */]; - } - } else if (options.position === __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */]) { - textOptions.vAlign = __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */]; - textOptions.align = __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */]; - } else if (options.position === __WEBPACK_IMPORTED_MODULE_1__constants__["y" /* INSIDE_BASE */]) { - if (vertical) { - textOptions.vAlign = aboveAxis ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["d" /* BOTTOM */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["B" /* TOP */]; - } else { - textOptions.align = aboveAxis ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["r" /* LEFT */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["z" /* RIGHT */]; - } - } else if (options.position === __WEBPACK_IMPORTED_MODULE_1__constants__["J" /* OUTSIDE_END */]) { - if (vertical) { - if (aboveAxis) { - labelBox = new __WEBPACK_IMPORTED_MODULE_0__core__["a" /* Box */]( - targetBox.x1, targetBox.y1 - box.height(), - targetBox.x2, targetBox.y1 - ); - } else { - labelBox = new __WEBPACK_IMPORTED_MODULE_0__core__["a" /* Box */]( - targetBox.x1, targetBox.y2, - targetBox.x2, targetBox.y2 + box.height() - ); - } - } else { - textOptions.align = __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */]; - if (aboveAxis) { - labelBox = new __WEBPACK_IMPORTED_MODULE_0__core__["a" /* Box */]( - targetBox.x2, targetBox.y1, - targetBox.x2 + box.width(), targetBox.y2 - ); - } else { - labelBox = new __WEBPACK_IMPORTED_MODULE_0__core__["a" /* Box */]( - targetBox.x1 - box.width(), targetBox.y1, - targetBox.x1, targetBox.y2 - ); - } - } - } - - if (!options.rotation) { - if (vertical) { - padding.left = padding.right = - (labelBox.width() - text.contentBox.width()) / 2; - } else { - padding.top = padding.bottom = - (labelBox.height() - text.contentBox.height()) / 2; - } - } - - text.reflow(labelBox); - }; - - BarLabel.prototype.alignToClipBox = function alignToClipBox (clipBox) { - var vertical = this.options.vertical; - var field = vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - var start = field + "1"; - var end = field + "2"; - var text = this.children[0]; - var parentBox = this.parent.box; - - if (parentBox[start] < clipBox[start] || clipBox[end] < parentBox[end]) { - var targetBox = text.paddingBox.clone(); - targetBox[start] = Math.max(parentBox[start], clipBox[start]); - targetBox[end] = Math.min(parentBox[end], clipBox[end]); - - this.reflow(targetBox); - } - }; - - return BarLabel; -}(__WEBPACK_IMPORTED_MODULE_0__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_3__common__["M" /* setDefaultOptions */])(BarLabel, { - position: __WEBPACK_IMPORTED_MODULE_1__constants__["J" /* OUTSIDE_END */], - margin: Object(__WEBPACK_IMPORTED_MODULE_3__common__["s" /* getSpacing */])(3), - padding: Object(__WEBPACK_IMPORTED_MODULE_3__common__["s" /* getSpacing */])(4), - color: __WEBPACK_IMPORTED_MODULE_2__common_constants__["c" /* BLACK */], - background: "", - border: { - width: 1, - color: "" - }, - aboveAxis: true, - vertical: false, - animation: { - type: __WEBPACK_IMPORTED_MODULE_1__constants__["s" /* FADEIN */], - delay: __WEBPACK_IMPORTED_MODULE_1__constants__["x" /* INITIAL_ANIMATION_DURATION */] - }, - zIndex: 2 -}); - -/* harmony default export */ __webpack_exports__["a"] = (BarLabel); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__bar_label__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar-label.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_has_gradient_overlay__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/has-gradient-overlay.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__mixins_point_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/point-events-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__mixins_note_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/note-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - - - - - -var BAR_ALIGN_MIN_WIDTH = 6; - -var Bar = (function (ChartElement) { - function Bar(value, options) { - ChartElement.call(this); - - this.options = options; - this.color = options.color || __WEBPACK_IMPORTED_MODULE_7__common_constants__["E" /* WHITE */]; - this.aboveAxis = Object(__WEBPACK_IMPORTED_MODULE_8__common__["Q" /* valueOrDefault */])(this.options.aboveAxis, true); - this.value = value; - } - - if ( ChartElement ) Bar.__proto__ = ChartElement; - Bar.prototype = Object.create( ChartElement && ChartElement.prototype ); - Bar.prototype.constructor = Bar; - - Bar.prototype.render = function render () { - if (this._rendered) { - return; - } - - this._rendered = true; - - this.createLabel(); - this.createNote(); - - if (this.errorBar) { - this.append(this.errorBar); - } - }; - - Bar.prototype.createLabel = function createLabel () { - var options = this.options; - var labels = options.labels; - - if (labels.visible) { - var labelTemplate = Object(__WEBPACK_IMPORTED_MODULE_8__common__["t" /* getTemplate */])(labels); - var labelText; - - if (labelTemplate) { - labelText = labelTemplate({ - dataItem: this.dataItem, - category: this.category, - value: this.value, - percentage: this.percentage, - stackValue: this.stackValue, - runningTotal: this.runningTotal, - total: this.total, - series: this.series - }); - } else { - labelText = this.formatValue(labels.format); - } - - this.label = new __WEBPACK_IMPORTED_MODULE_1__bar_label__["a" /* default */](labelText, - Object(__WEBPACK_IMPORTED_MODULE_8__common__["k" /* deepExtend */])({ - vertical: options.vertical - }, - labels - )); - this.append(this.label); - } - }; - - Bar.prototype.formatValue = function formatValue (format) { - return this.owner.formatPointValue(this, format); - }; - - Bar.prototype.reflow = function reflow (targetBox) { - var this$1 = this; - - this.render(); - - var label = this.label; - - this.box = targetBox; - - if (label) { - label.options.aboveAxis = this.aboveAxis; - label.reflow(targetBox); - } - - if (this.note) { - this.note.reflow(targetBox); - } - - if (this.errorBars) { - for (var i = 0; i < this.errorBars.length; i++) { - this$1.errorBars[i].reflow(targetBox); - } - } - }; - - Bar.prototype.createVisual = function createVisual () { - var this$1 = this; - - var ref = this; - var box = ref.box; - var options = ref.options; - var customVisual = options.visual; - - if (this.visible !== false) { - ChartElement.prototype.createVisual.call(this); - - if (customVisual) { - var visual = this.rectVisual = customVisual({ - category: this.category, - dataItem: this.dataItem, - value: this.value, - sender: this.getSender(), - series: this.series, - percentage: this.percentage, - stackValue: this.stackValue, - runningTotal: this.runningTotal, - total: this.total, - rect: box.toRect(), - createVisual: function () { - var group = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group(); - this$1.createRect(group); - return group; - }, - options: options - }); - - if (visual) { - this.visual.append(visual); - } - } else if (box.width() > 0 && box.height() > 0) { - this.createRect(this.visual); - } - } - }; - - Bar.prototype.createRect = function createRect (visual) { - var options = this.options; - var border = options.border; - var strokeOpacity = Object(__WEBPACK_IMPORTED_MODULE_8__common__["l" /* defined */])(border.opacity) ? border.opacity : options.opacity; - var rect = this.box.toRect(); - - rect.size.width = Math.round(rect.size.width); - - var path = this.rectVisual = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(rect, { - fill: { - color: this.color, - opacity: options.opacity - }, - stroke: { - color: this.getBorderColor(), - width: border.width, - opacity: strokeOpacity, - dashType: border.dashType - } - }); - - var width = this.box.width(); - var height = this.box.height(); - - var size = options.vertical ? width : height; - - if (size > BAR_ALIGN_MIN_WIDTH) { - Object(__WEBPACK_IMPORTED_MODULE_8__common__["f" /* alignPathToPixel */])(path); - - // Fixes lineJoin issue in firefox when the joined lines are parallel - if (width < 1 || height < 1) { - path.options.stroke.lineJoin = "round"; - } - } - - visual.append(path); - - if (Object(__WEBPACK_IMPORTED_MODULE_3__utils_has_gradient_overlay__["a" /* default */])(options)) { - var overlay = this.createGradientOverlay(path, { baseColor: this.color }, Object(__WEBPACK_IMPORTED_MODULE_8__common__["k" /* deepExtend */])({ - end: !options.vertical ? [ 0, 1 ] : undefined - }, options.overlay)); - - visual.append(overlay); - } - }; - - Bar.prototype.createHighlight = function createHighlight (style) { - var highlight = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(this.box.toRect(), style); - - return Object(__WEBPACK_IMPORTED_MODULE_8__common__["f" /* alignPathToPixel */])(highlight); - }; - - Bar.prototype.highlightVisual = function highlightVisual () { - return this.rectVisual; - }; - - Bar.prototype.highlightVisualArgs = function highlightVisualArgs () { - return { - options: this.options, - rect: this.box.toRect(), - visual: this.rectVisual - }; - }; - - Bar.prototype.getBorderColor = function getBorderColor () { - var color = this.color; - var border = this.options.border; - var brightness = border._brightness || __WEBPACK_IMPORTED_MODULE_2__constants__["e" /* BORDER_BRIGHTNESS */]; - var borderColor = border.color; - - if (!Object(__WEBPACK_IMPORTED_MODULE_8__common__["l" /* defined */])(borderColor)) { - borderColor = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["b" /* Color */](color).brightness(brightness).toHex(); - } - - return borderColor; - }; - - Bar.prototype.tooltipAnchor = function tooltipAnchor () { - var ref = this; - var options = ref.options; - var box = ref.box; - var aboveAxis = ref.aboveAxis; - var clipBox = this.owner.pane.clipBox() || box; - var horizontalAlign = __WEBPACK_IMPORTED_MODULE_7__common_constants__["r" /* LEFT */]; - var verticalAlign = __WEBPACK_IMPORTED_MODULE_7__common_constants__["B" /* TOP */]; - var x, y; - - if (options.vertical) { - x = Math.min(box.x2, clipBox.x2) + __WEBPACK_IMPORTED_MODULE_2__constants__["_8" /* TOOLTIP_OFFSET */]; - if (aboveAxis) { - y = Math.max(box.y1, clipBox.y1); - } else { - y = Math.min(box.y2, clipBox.y2); - verticalAlign = __WEBPACK_IMPORTED_MODULE_7__common_constants__["d" /* BOTTOM */]; - } - } else { - var x1 = Math.max(box.x1, clipBox.x1); - var x2 = Math.min(box.x2, clipBox.x2); - - if (options.isStacked) { - verticalAlign = __WEBPACK_IMPORTED_MODULE_7__common_constants__["d" /* BOTTOM */]; - if (aboveAxis) { - horizontalAlign = __WEBPACK_IMPORTED_MODULE_7__common_constants__["z" /* RIGHT */]; - x = x2; - } else { - x = x1; - } - y = Math.max(box.y1, clipBox.y1) - __WEBPACK_IMPORTED_MODULE_2__constants__["_8" /* TOOLTIP_OFFSET */]; - } else { - if (aboveAxis) { - x = x2 + __WEBPACK_IMPORTED_MODULE_2__constants__["_8" /* TOOLTIP_OFFSET */]; - } else { - x = x1 - __WEBPACK_IMPORTED_MODULE_2__constants__["_8" /* TOOLTIP_OFFSET */]; - horizontalAlign = __WEBPACK_IMPORTED_MODULE_7__common_constants__["z" /* RIGHT */]; - } - y = Math.max(box.y1, clipBox.y1); - } - } - - return { - point: new __WEBPACK_IMPORTED_MODULE_4__core__["l" /* Point */](x, y), - align: { - horizontal: horizontalAlign, - vertical: verticalAlign - } - }; - }; - - Bar.prototype.overlapsBox = function overlapsBox (box) { - return this.box.overlaps(box); - }; - - return Bar; -}(__WEBPACK_IMPORTED_MODULE_4__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_8__common__["k" /* deepExtend */])(Bar.prototype, __WEBPACK_IMPORTED_MODULE_5__mixins_point_events_mixin__["a" /* default */]); -Object(__WEBPACK_IMPORTED_MODULE_8__common__["k" /* deepExtend */])(Bar.prototype, __WEBPACK_IMPORTED_MODULE_6__mixins_note_mixin__["a" /* default */]); - -Bar.prototype.defaults = { - border: { - width: 1 - }, - vertical: true, - overlay: { - gradient: "glass" - }, - labels: { - visible: false, - format: "{0}" - }, - opacity: 1, - notes: { - label: {} - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (Bar); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/base-theme.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return baseTheme; }); -var BAR_GAP = 1.5; -var BAR_SPACING = 0.4; -var BLACK = '#000'; -var SANS = 'Arial, Helvetica, sans-serif'; -var SANS11 = "11px " + SANS; -var SANS12 = '12px ' + SANS; -var SANS16 = '16px ' + SANS; -var TRANSPARENT = 'transparent'; -var WHITE = '#fff'; - -var notes = function () { return ({ - icon: { - border: { - width: 1 - } - }, - label: { - font: SANS12, - padding: 3 - }, - line: { - length: 10, - width: 2 - }, - visible: true -}); }; - -var axisDefaults = function () { return ({ - labels: { - font: SANS12 - }, - notes: notes(), - title: { - font: SANS16, - margin: 5 - } -}); }; - -var areaSeries = function () { return ({ - highlight: { - markers: { - border: {} - } - }, - line: { - opacity: 1, - width: 0 - }, - markers: { - size: 6, - visible: false - }, - opacity: 0.4 -}); }; - -var rangeAreaSeries = function () { return ({ - highlight: { - markers: { - border: {} - } - }, - line: { - opacity: 1, - width: 0 - }, - markers: { - size: 6, - visible: false - }, - opacity: 0.4 -}); }; - -var barSeries = function () { return ({ - gap: BAR_GAP, - spacing: BAR_SPACING -}); }; - -var boxPlotSeries = function () { return ({ - outliersField: "", - meanField: "", - border: { - _brightness: 0.8, - width: 1 - }, - downColor: WHITE, - gap: 1, - highlight: { - border: { - opacity: 1, - width: 2 - }, - whiskers: { - width: 3 - }, - mean: { - width: 2 - }, - median: { - width: 2 - } - }, - mean: { - width: 2 - }, - median: { - width: 2 - }, - spacing: 0.3, - whiskers: { - width: 2 - } -}); }; - -var bubbleSeries = function () { return ({ - border: { - width: 0 - }, - labels: { - background: TRANSPARENT - }, - opacity: 0.6 -}); }; - -var bulletSeries = function () { return ({ - gap: BAR_GAP, - spacing: BAR_SPACING, - target: { - color: "#ff0000" - } -}); }; - -var candlestickSeries = function () { return ({ - border: { - _brightness: 0.8, - width: 1 - }, - downColor: WHITE, - gap: 1, - highlight: { - border: { - opacity: 1, - width: 2 - }, - line: { - width: 2 - } - }, - line: { - color: BLACK, - width: 1 - }, - spacing: 0.3 -}); }; - -var columnSeries = function () { return ({ - gap: BAR_GAP, - spacing: BAR_SPACING -}); }; - -var donutSeries = function () { return ({ - margin: 1 -}); }; - -var lineSeries = function () { return ({ - width: 2 -}); }; - -var ohlcSeries = function () { return ({ - gap: 1, - highlight: { - line: { - opacity: 1, - width: 3 - } - }, - line: { - width: 1 - }, - spacing: 0.3 -}); }; - -var radarAreaSeries = function () { return ({ - line: { - opacity: 1, - width: 0 - }, - markers: { - size: 6, - visible: false - }, - opacity: 0.5 -}); }; - -var radarLineSeries = function () { return ({ - markers: { - visible: false - }, - width: 2 -}); }; - -var rangeBarSeries = function () { return ({ - gap: BAR_GAP, - spacing: BAR_SPACING -}); }; - -var rangeColumnSeries = function () { return ({ - gap: BAR_GAP, - spacing: BAR_SPACING -}); }; - -var scatterLineSeries = function () { return ({ - width: 1 -}); }; - -var waterfallSeries = function () { return ({ - gap: 0.5, - line: { - color: BLACK, - width: 1 - }, - spacing: BAR_SPACING -}); }; - -var pieSeries = function () { return ({ - labels: { - background: '', - color: '', - padding: { - top: 5, - bottom: 5, - left: 7, - right: 7 - } - } -}); }; - -var funnelSeries = function () { return ({ - labels: { - background: '', - color: '', - padding: { - top: 5, - bottom: 5, - left: 7, - right: 7 - } - } -}); }; - -var seriesDefaults = function (options) { return ({ - visible: true, - labels: { - font: SANS11 - }, - overlay: options.gradients ? {} : { - gradient: "none" - }, - area: areaSeries(), - rangeArea: rangeAreaSeries(), - verticalRangeArea: rangeAreaSeries(), - bar: barSeries(), - boxPlot: boxPlotSeries(), - bubble: bubbleSeries(), - bullet: bulletSeries(), - candlestick: candlestickSeries(), - column: columnSeries(), - pie: pieSeries(), - donut: donutSeries(), - funnel: funnelSeries(), - horizontalWaterfall: waterfallSeries(), - line: lineSeries(), - notes: notes(), - ohlc: ohlcSeries(), - radarArea: radarAreaSeries(), - radarLine: radarLineSeries(), - polarArea: radarAreaSeries(), - polarLine: radarLineSeries(), - rangeBar: rangeBarSeries(), - rangeColumn: rangeColumnSeries(), - scatterLine: scatterLineSeries(), - verticalArea: areaSeries(), - verticalBoxPlot: boxPlotSeries(), - verticalBullet: bulletSeries(), - verticalLine: lineSeries(), - waterfall: waterfallSeries() -}); }; - -var title = function () { return ({ - font: SANS16 -}); }; - -var legend = function () { return ({ - labels: { - font: SANS12 - } -}); }; - -var baseTheme = function (options) { - if ( options === void 0 ) options = {}; - - return ({ - axisDefaults: axisDefaults(), - categoryAxis: { - majorGridLines: { - visible: true - } - }, - navigator: { - pane: { - height: 90, - margin: { - top: 10 - } - } - }, - seriesDefaults: seriesDefaults(options), - title: title(), - legend: legend() -}); -}; - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/box-plot-chart/box-plot-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__candlestick_chart_candlestick_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/candlestick-chart/candlestick-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vertical_box_plot__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/box-plot-chart/vertical-box-plot.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__box_plot__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/box-plot-chart/box-plot.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__layout_cluster_layout__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/layout/cluster-layout.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_are_numbers__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/are-numbers.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - -var BoxPlotChart = (function (CandlestickChart) { - function BoxPlotChart () { - CandlestickChart.apply(this, arguments); - } - - if ( CandlestickChart ) BoxPlotChart.__proto__ = CandlestickChart; - BoxPlotChart.prototype = Object.create( CandlestickChart && CandlestickChart.prototype ); - BoxPlotChart.prototype.constructor = BoxPlotChart; - - BoxPlotChart.prototype.addValue = function addValue (data, fields) { - var categoryIx = fields.categoryIx; - var category = fields.category; - var series = fields.series; - var seriesIx = fields.seriesIx; - var ref = this; - var children = ref.children; - var options = ref.options; - var value = data.valueFields; - var valueParts = this.splitValue(value); - var hasValue = Object(__WEBPACK_IMPORTED_MODULE_4__utils_are_numbers__["a" /* default */])(valueParts); - var dataItem = series.data[categoryIx]; - var categoryPoints = this.categoryPoints[categoryIx]; - var point; - - if (!categoryPoints) { - this.categoryPoints[categoryIx] = categoryPoints = []; - } - - if (hasValue) { - point = this.createPoint(data, fields); - } - - var cluster = children[categoryIx]; - if (!cluster) { - cluster = new __WEBPACK_IMPORTED_MODULE_3__layout_cluster_layout__["a" /* default */]({ - vertical: options.invertAxes, - gap: options.gap, - spacing: options.spacing, - rtl: !options.invertAxes && (this.chartService || {}).rtl - }); - this.append(cluster); - } - - if (point) { - this.updateRange(value, fields); - - cluster.append(point); - - point.categoryIx = categoryIx; - point.category = category; - point.series = series; - point.seriesIx = seriesIx; - point.owner = this; - point.dataItem = dataItem; - } - - this.points.push(point); - categoryPoints.push(point); - }; - - BoxPlotChart.prototype.pointType = function pointType () { - if (this.options.invertAxes) { - return __WEBPACK_IMPORTED_MODULE_1__vertical_box_plot__["a" /* default */]; - } - - return __WEBPACK_IMPORTED_MODULE_2__box_plot__["a" /* default */]; - }; - - BoxPlotChart.prototype.splitValue = function splitValue (value) { - return [ - value.lower, value.q1, value.median, - value.q3, value.upper - ]; - }; - - BoxPlotChart.prototype.updateRange = function updateRange (value, fields) { - var axisName = fields.series.axis; - var axisRange = this.valueAxisRanges[axisName]; - var parts = this.splitValue(value).concat(this.filterOutliers(value.outliers)); - - if (Object(__WEBPACK_IMPORTED_MODULE_6__common__["l" /* defined */])(value.mean)) { - parts = parts.concat(value.mean); - } - - axisRange = this.valueAxisRanges[axisName] = - axisRange || { min: __WEBPACK_IMPORTED_MODULE_5__common_constants__["s" /* MAX_VALUE */], max: __WEBPACK_IMPORTED_MODULE_5__common_constants__["t" /* MIN_VALUE */] }; - - axisRange = this.valueAxisRanges[axisName] = { - min: Math.min.apply(Math, parts.concat([ axisRange.min ])), - max: Math.max.apply(Math, parts.concat([ axisRange.max ])) - }; - }; - - BoxPlotChart.prototype.formatPointValue = function formatPointValue (point, format) { - var value = point.value; - - return this.chartService.format.auto(format, - value.lower, value.q1, value.median, - value.q3, value.upper, value.mean, point.category - ); - }; - - BoxPlotChart.prototype.filterOutliers = function filterOutliers (items) { - var length = (items || []).length; - var result = []; - - for (var i = 0; i < length; i++) { - var item = items[i]; - if (Object(__WEBPACK_IMPORTED_MODULE_6__common__["l" /* defined */])(item) && item !== null) { - result.push(item); - } - } - - return result; - }; - - return BoxPlotChart; -}(__WEBPACK_IMPORTED_MODULE_0__candlestick_chart_candlestick_chart__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (BoxPlotChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/box-plot-chart/box-plot.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__candlestick_chart_candlestick__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/candlestick-chart/candlestick.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_point_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/point-events-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - -var BoxPlot = (function (Candlestick) { - function BoxPlot(value, options) { - Candlestick.call(this, value, options); - - this.createNote(); - } - - if ( Candlestick ) BoxPlot.__proto__ = Candlestick; - BoxPlot.prototype = Object.create( Candlestick && Candlestick.prototype ); - BoxPlot.prototype.constructor = BoxPlot; - - BoxPlot.prototype.reflow = function reflow (box) { - var ref = this; - var options = ref.options; - var value = ref.value; - var chart = ref.owner; - var valueAxis = chart.seriesValueAxis(options); - var whiskerSlot, boxSlot; - - this.boxSlot = boxSlot = valueAxis.getSlot(value.q1, value.q3); - this.realBody = boxSlot; - this.reflowBoxSlot(box); - - this.whiskerSlot = whiskerSlot = valueAxis.getSlot(value.lower, value.upper); - this.reflowWhiskerSlot(box); - - var medianSlot = valueAxis.getSlot(value.median); - - if (value.mean) { - var meanSlot = valueAxis.getSlot(value.mean); - this.meanPoints = this.calcMeanPoints(box, meanSlot); - } - - this.whiskerPoints = this.calcWhiskerPoints(boxSlot, whiskerSlot); - this.medianPoints = this.calcMedianPoints(box, medianSlot); - - this.box = whiskerSlot.clone().wrap(boxSlot); - this.reflowNote(); - }; - - BoxPlot.prototype.reflowBoxSlot = function reflowBoxSlot (box) { - this.boxSlot.x1 = box.x1; - this.boxSlot.x2 = box.x2; - }; - - BoxPlot.prototype.reflowWhiskerSlot = function reflowWhiskerSlot (box) { - this.whiskerSlot.x1 = box.x1; - this.whiskerSlot.x2 = box.x2; - }; - - BoxPlot.prototype.calcMeanPoints = function calcMeanPoints (box, meanSlot) { - return [ - [ [ box.x1, meanSlot.y1 ], [ box.x2, meanSlot.y1 ] ] - ]; - }; - - BoxPlot.prototype.calcWhiskerPoints = function calcWhiskerPoints (boxSlot, whiskerSlot) { - var mid = whiskerSlot.center().x; - return [ [ - [ mid - 5, whiskerSlot.y1 ], [ mid + 5, whiskerSlot.y1 ], - [ mid, whiskerSlot.y1 ], [ mid, boxSlot.y1 ] - ], [ - [ mid - 5, whiskerSlot.y2 ], [ mid + 5, whiskerSlot.y2 ], - [ mid, whiskerSlot.y2 ], [ mid, boxSlot.y2 ] - ] ]; - }; - - BoxPlot.prototype.calcMedianPoints = function calcMedianPoints (box, medianSlot) { - return [ - [ [ box.x1, medianSlot.y1 ], [ box.x2, medianSlot.y1 ] ] - ]; - }; - - BoxPlot.prototype.renderOutliers = function renderOutliers (options) { - var this$1 = this; - - var value = this.value; - var outliers = value.outliers || []; - var outerFence = Math.abs(value.q3 - value.q1) * 3; - var elements = []; - var markers = options.markers || {}; - - for (var i = 0; i < outliers.length; i++) { - var outlierValue = outliers[i]; - if (outlierValue < value.q3 + outerFence && outlierValue > value.q1 - outerFence) { - markers = options.outliers; - } else { - markers = options.extremes; - } - var markersBorder = Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({}, markers.border); - - if (!Object(__WEBPACK_IMPORTED_MODULE_6__common__["l" /* defined */])(markersBorder.color)) { - if (Object(__WEBPACK_IMPORTED_MODULE_6__common__["l" /* defined */])(this$1.color)) { - markersBorder.color = this$1.color; - } else { - markersBorder.color = - new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["b" /* Color */](markers.background).brightness(__WEBPACK_IMPORTED_MODULE_4__constants__["e" /* BORDER_BRIGHTNESS */]).toHex(); - } - } - - var shape = new __WEBPACK_IMPORTED_MODULE_3__core__["t" /* ShapeElement */]({ - type: markers.type, - width: markers.size, - height: markers.size, - rotation: markers.rotation, - background: markers.background, - border: markersBorder, - opacity: markers.opacity - }); - - shape.value = outlierValue; - - elements.push(shape); - } - - this.reflowOutliers(elements); - return elements; - }; - - BoxPlot.prototype.reflowOutliers = function reflowOutliers (outliers) { - var this$1 = this; - - var valueAxis = this.owner.seriesValueAxis(this.options); - var center = this.box.center(); - - for (var i = 0; i < outliers.length; i++) { - var outlierValue = outliers[i].value; - var markerBox = valueAxis.getSlot(outlierValue); - - if (this$1.options.vertical) { - markerBox.move(center.x); - } else { - markerBox.move(undefined, center.y); - } - - this$1.box = this$1.box.wrap(markerBox); - outliers[i].reflow(markerBox); - } - }; - - BoxPlot.prototype.mainVisual = function mainVisual (options) { - var group = Candlestick.prototype.mainVisual.call(this, options); - var outliers = this.renderOutliers(options); - - for (var i = 0; i < outliers.length; i++) { - var element = outliers[i].getElement(); - if (element) { - group.append(element); - } - } - - return group; - }; - - BoxPlot.prototype.createLines = function createLines (container, options) { - this.drawLines(container, options, this.whiskerPoints, options.whiskers); - this.drawLines(container, options, this.medianPoints, options.median); - this.drawLines(container, options, this.meanPoints, options.mean); - }; - - BoxPlot.prototype.getBorderColor = function getBorderColor () { - if (this.color) { - return this.color; - } - - return Candlestick.prototype.getBorderColor.call(this); - }; - - return BoxPlot; -}(__WEBPACK_IMPORTED_MODULE_1__candlestick_chart_candlestick__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_6__common__["M" /* setDefaultOptions */])(BoxPlot, { - border: { - _brightness: 0.8 - }, - line: { - width: 2 - }, - median: { - color: "#f6f6f6" - }, - mean: { - width: 2, - dashType: "dash", - color: "#f6f6f6" - }, - overlay: { - gradient: "glass" - }, - tooltip: { - format: "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "
{6:d}
Lower:{0:C}
Q1:{1:C}
Median:{2:C}
Mean:{5:C}
Q3:{3:C}
Upper:{4:C}
" - }, - highlight: { - opacity: 1, - border: { - width: 1, - opacity: 1 - }, - line: { - width: 1, - opacity: 1 - } - }, - notes: { - visible: true, - label: {} - }, - outliers: { - visible: true, - size: __WEBPACK_IMPORTED_MODULE_4__constants__["E" /* LINE_MARKER_SIZE */], - type: __WEBPACK_IMPORTED_MODULE_5__common_constants__["h" /* CROSS */], - background: __WEBPACK_IMPORTED_MODULE_5__common_constants__["E" /* WHITE */], - border: { - width: 2, - opacity: 1 - }, - opacity: 0 - }, - extremes: { - visible: true, - size: __WEBPACK_IMPORTED_MODULE_4__constants__["E" /* LINE_MARKER_SIZE */], - type: __WEBPACK_IMPORTED_MODULE_5__common_constants__["f" /* CIRCLE */], - background: __WEBPACK_IMPORTED_MODULE_5__common_constants__["E" /* WHITE */], - border: { - width: 2, - opacity: 1 - }, - opacity: 0 - } -}); - -Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])(BoxPlot.prototype, __WEBPACK_IMPORTED_MODULE_2__mixins_point_events_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (BoxPlot); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/box-plot-chart/vertical-box-plot.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__box_plot__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/box-plot-chart/box-plot.js"); - - -var VerticalBoxPlot = (function (BoxPlot) { - function VerticalBoxPlot () { - BoxPlot.apply(this, arguments); - } - - if ( BoxPlot ) VerticalBoxPlot.__proto__ = BoxPlot; - VerticalBoxPlot.prototype = Object.create( BoxPlot && BoxPlot.prototype ); - VerticalBoxPlot.prototype.constructor = VerticalBoxPlot; - - VerticalBoxPlot.prototype.reflowBoxSlot = function reflowBoxSlot (box) { - this.boxSlot.y1 = box.y1; - this.boxSlot.y2 = box.y2; - }; - - VerticalBoxPlot.prototype.reflowWhiskerSlot = function reflowWhiskerSlot (box) { - this.whiskerSlot.y1 = box.y1; - this.whiskerSlot.y2 = box.y2; - }; - - VerticalBoxPlot.prototype.calcMeanPoints = function calcMeanPoints (box, meanSlot) { - return [ - [ [ meanSlot.x1, box.y1 ], [ meanSlot.x1, box.y2 ] ] - ]; - }; - - VerticalBoxPlot.prototype.calcWhiskerPoints = function calcWhiskerPoints (boxSlot, whiskerSlot) { - var mid = whiskerSlot.center().y; - return [ [ - [ whiskerSlot.x1, mid - 5 ], [ whiskerSlot.x1, mid + 5 ], - [ whiskerSlot.x1, mid ], [ boxSlot.x1, mid ] - ], [ - [ whiskerSlot.x2, mid - 5 ], [ whiskerSlot.x2, mid + 5 ], - [ whiskerSlot.x2, mid ], [ boxSlot.x2, mid ] - ] ]; - }; - - VerticalBoxPlot.prototype.calcMedianPoints = function calcMedianPoints (box, medianSlot) { - return [ - [ [ medianSlot.x1, box.y1 ], [ medianSlot.x1, box.y2 ] ] - ]; - }; - - return VerticalBoxPlot; -}(__WEBPACK_IMPORTED_MODULE_0__box_plot__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (VerticalBoxPlot); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/bubble-chart/bubble-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scatter_charts_scatter_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/scatter-charts/scatter-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__bubble__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bubble-chart/bubble.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - -var BubbleChart = (function (ScatterChart) { - function BubbleChart () { - ScatterChart.apply(this, arguments); - } - - if ( ScatterChart ) BubbleChart.__proto__ = ScatterChart; - BubbleChart.prototype = Object.create( ScatterChart && ScatterChart.prototype ); - BubbleChart.prototype.constructor = BubbleChart; - - BubbleChart.prototype._initFields = function _initFields () { - this._maxSize = __WEBPACK_IMPORTED_MODULE_3__common_constants__["t" /* MIN_VALUE */]; - ScatterChart.prototype._initFields.call(this); - }; - - BubbleChart.prototype.addValue = function addValue (value, fields) { - if (value.size !== null && (value.size > 0 || (value.size < 0 && fields.series.negativeValues.visible))) { - this._maxSize = Math.max(this._maxSize, Math.abs(value.size)); - ScatterChart.prototype.addValue.call(this, value, fields); - } else { - this.points.push(null); - this.seriesPoints[fields.seriesIx].push(null); - } - }; - - BubbleChart.prototype.reflow = function reflow (box) { - this.updateBubblesSize(box); - ScatterChart.prototype.reflow.call(this, box); - }; - - BubbleChart.prototype.pointType = function pointType () { - return __WEBPACK_IMPORTED_MODULE_1__bubble__["a" /* default */]; - }; - - BubbleChart.prototype.createPoint = function createPoint (value, fields) { - var series = fields.series; - var pointsCount = series.data.length; - var delay = fields.pointIx * (__WEBPACK_IMPORTED_MODULE_2__constants__["x" /* INITIAL_ANIMATION_DURATION */] / pointsCount); - var animationOptions = { - delay: delay, - duration: __WEBPACK_IMPORTED_MODULE_2__constants__["x" /* INITIAL_ANIMATION_DURATION */] - delay, - type: __WEBPACK_IMPORTED_MODULE_2__constants__["g" /* BUBBLE */] - }; - - var color = fields.color || series.color; - if (value.size < 0 && series.negativeValues.visible) { - color = Object(__WEBPACK_IMPORTED_MODULE_4__common__["Q" /* valueOrDefault */])( - series.negativeValues.color, color - ); - } - - var pointOptions = Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])({ - labels: { - animation: { - delay: delay, - duration: __WEBPACK_IMPORTED_MODULE_2__constants__["x" /* INITIAL_ANIMATION_DURATION */] - delay - } - } - }, this.pointOptions(series, fields.seriesIx), { - markers: { - type: __WEBPACK_IMPORTED_MODULE_3__common_constants__["f" /* CIRCLE */], - border: series.border, - opacity: series.opacity, - animation: animationOptions - } - }); - - pointOptions = this.evalPointOptions(pointOptions, value, fields); - if (Object(__WEBPACK_IMPORTED_MODULE_4__common__["A" /* isFunction */])(series.color)) { - color = pointOptions.color; - } - - pointOptions.markers.background = color; - - var point = new __WEBPACK_IMPORTED_MODULE_1__bubble__["a" /* default */](value, pointOptions); - point.color = color; - - this.append(point); - - return point; - }; - - BubbleChart.prototype.updateBubblesSize = function updateBubblesSize (box) { - var this$1 = this; - - var ref = this; - var series = ref.options.series; - var boxSize = Math.min(box.width(), box.height()); - - for (var seriesIx = 0; seriesIx < series.length; seriesIx++) { - var currentSeries = series[seriesIx]; - var seriesPoints = this$1.seriesPoints[seriesIx]; - var minSize = currentSeries.minSize || Math.max(boxSize * 0.02, 10); - var maxSize = currentSeries.maxSize || boxSize * 0.2; - var minR = minSize / 2; - var maxR = maxSize / 2; - var minArea = Math.PI * minR * minR; - var maxArea = Math.PI * maxR * maxR; - var areaRange = maxArea - minArea; - var areaRatio = areaRange / this$1._maxSize; - - for (var pointIx = 0; pointIx < seriesPoints.length; pointIx++) { - var point = seriesPoints[pointIx]; - if (point) { - var area = Math.abs(point.value.size) * areaRatio; - var radius = Math.sqrt((minArea + area) / Math.PI); - var baseZIndex = Object(__WEBPACK_IMPORTED_MODULE_4__common__["Q" /* valueOrDefault */])(point.options.zIndex, 0); - var zIndex = baseZIndex + (1 - radius / maxR); - - Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])(point.options, { - zIndex: zIndex, - markers: { - size: radius * 2, - zIndex: zIndex - }, - labels: { - zIndex: zIndex + 1 - } - }); - } - } - } - }; - - BubbleChart.prototype.formatPointValue = function formatPointValue (point, format) { - var value = point.value; - return this.chartService.format.auto(format, value.x, value.y, value.size, point.category); - }; - - BubbleChart.prototype.createAnimation = function createAnimation () {}; - BubbleChart.prototype.createVisual = function createVisual () {}; - - return BubbleChart; -}(__WEBPACK_IMPORTED_MODULE_0__scatter_charts_scatter_chart__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_4__common__["M" /* setDefaultOptions */])(BubbleChart, { - tooltip: { - format: "{3}" - }, - labels: { - format: "{3}" - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (BubbleChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/bubble-chart/bubble.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__line_chart_line_point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - -var Bubble = (function (LinePoint) { - function Bubble(value, options) { - LinePoint.call(this, value, options); - - this.category = value.category; - } - - if ( LinePoint ) Bubble.__proto__ = LinePoint; - Bubble.prototype = Object.create( LinePoint && LinePoint.prototype ); - Bubble.prototype.constructor = Bubble; - - Bubble.prototype.createHighlight = function createHighlight () { - var highlight = this.options.highlight; - var border = highlight.border; - var markers = this.options.markers; - var center = this.box.center(); - var radius = (markers.size + markers.border.width + border.width) / 2; - var highlightGroup = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group(); - var shadow = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Circle(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Circle([ center.x, center.y + radius / 5 + border.width / 2 ], radius + border.width / 2), { - stroke: { - color: 'none' - }, - fill: this.createGradient({ - gradient: 'bubbleShadow', - color: markers.background, - stops: [ { - offset: 0, - color: markers.background, - opacity: 0.3 - }, { - offset: 1, - color: markers.background, - opacity: 0 - } ] - }) - }); - var overlay = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Circle(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Circle([ center.x, center.y ], radius), { - stroke: { - color: border.color || - new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["b" /* Color */](markers.background).brightness(__WEBPACK_IMPORTED_MODULE_2__constants__["e" /* BORDER_BRIGHTNESS */]).toHex(), - width: border.width, - opacity: border.opacity - }, - fill: { - color: markers.background, - opacity: highlight.opacity - } - }); - - highlightGroup.append(shadow, overlay); - - return highlightGroup; - }; - - return Bubble; -}(__WEBPACK_IMPORTED_MODULE_1__line_chart_line_point__["a" /* default */])); - -Bubble.prototype.defaults = Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])({}, Bubble.prototype.defaults, { - labels: { - position: __WEBPACK_IMPORTED_MODULE_3__common_constants__["e" /* CENTER */] - }, - highlight: { - opacity: 1, - border: { - color: "#fff", - width: 2, - opacity: 1 - } - } -}); - -Bubble.prototype.defaults.highlight.zIndex = undefined; - -/* harmony default export */ __webpack_exports__["a"] = (Bubble); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/bullet-chart/bullet-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__categorical_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/categorical-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__bar_chart_bar_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bullet__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bullet-chart/bullet.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__layout_cluster_layout__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/layout/cluster-layout.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - -var BulletChart = (function (CategoricalChart) { - function BulletChart(plotArea, options) { - - wrapData(options); - - CategoricalChart.call(this, plotArea, options); - } - - if ( CategoricalChart ) BulletChart.__proto__ = CategoricalChart; - BulletChart.prototype = Object.create( CategoricalChart && CategoricalChart.prototype ); - BulletChart.prototype.constructor = BulletChart; - - BulletChart.prototype.reflowCategories = function reflowCategories (categorySlots) { - var children = this.children; - var childrenLength = children.length; - - for (var i = 0; i < childrenLength; i++) { - children[i].reflow(categorySlots[i]); - } - }; - - BulletChart.prototype.plotRange = function plotRange (point) { - var series = point.series; - var valueAxis = this.seriesValueAxis(series); - var axisCrossingValue = this.categoryAxisCrossingValue(valueAxis); - - return [ axisCrossingValue, point.value.current || axisCrossingValue ]; - }; - - BulletChart.prototype.createPoint = function createPoint (data, fields) { - var categoryIx = fields.categoryIx; - var category = fields.category; - var series = fields.series; - var seriesIx = fields.seriesIx; - var ref = this; - var options = ref.options; - var children = ref.children; - var value = data.valueFields; - - var bulletOptions = Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({ - vertical: !options.invertAxes, - overlay: series.overlay, - categoryIx: categoryIx, - invertAxes: options.invertAxes - }, series); - - var color = data.fields.color || series.color; - bulletOptions = this.evalPointOptions( - bulletOptions, value, category, categoryIx, series, seriesIx - ); - - if (Object(__WEBPACK_IMPORTED_MODULE_6__common__["A" /* isFunction */])(series.color)) { - color = bulletOptions.color; - } - - var bullet = new __WEBPACK_IMPORTED_MODULE_2__bullet__["a" /* default */](value, bulletOptions); - bullet.color = color; - - var cluster = children[categoryIx]; - if (!cluster) { - cluster = new __WEBPACK_IMPORTED_MODULE_3__layout_cluster_layout__["a" /* default */]({ - vertical: options.invertAxes, - gap: options.gap, - spacing: options.spacing, - rtl: !options.invertAxes && (this.chartService || {}).rtl - }); - this.append(cluster); - } - - cluster.append(bullet); - - return bullet; - }; - - BulletChart.prototype.updateRange = function updateRange (value, fields) { - var current = value.current; - var target = value.target; - var axisName = fields.series.axis; - var axisRange = this.valueAxisRanges[axisName]; - - if (Object(__WEBPACK_IMPORTED_MODULE_6__common__["l" /* defined */])(current) && !isNaN(current) && Object(__WEBPACK_IMPORTED_MODULE_6__common__["l" /* defined */])(target && !isNaN(target))) { - axisRange = this.valueAxisRanges[axisName] = - axisRange || { min: __WEBPACK_IMPORTED_MODULE_5__common_constants__["s" /* MAX_VALUE */], max: __WEBPACK_IMPORTED_MODULE_5__common_constants__["t" /* MIN_VALUE */] }; - - axisRange.min = Math.min(axisRange.min, current, target); - axisRange.max = Math.max(axisRange.max, current, target); - } - }; - - BulletChart.prototype.formatPointValue = function formatPointValue (point, format) { - return this.chartService.format.auto(format, point.value.current, point.value.target); - }; - - BulletChart.prototype.pointValue = function pointValue (data) { - return data.valueFields.current; - }; - - BulletChart.prototype.aboveAxis = function aboveAxis (point) { - var value = point.value.current; - - return value > 0; - }; - - BulletChart.prototype.createAnimation = function createAnimation () { - var this$1 = this; - - var points = this.points; - - this._setAnimationOptions(); - - for (var idx = 0; idx < points.length; idx++) { - var point = points[idx]; - point.options.animation = this$1.options.animation; - point.createAnimation(); - } - }; - - return BulletChart; -}(__WEBPACK_IMPORTED_MODULE_0__categorical_chart__["a" /* default */])); - -BulletChart.prototype._setAnimationOptions = __WEBPACK_IMPORTED_MODULE_1__bar_chart_bar_chart__["a" /* default */].prototype._setAnimationOptions; - -Object(__WEBPACK_IMPORTED_MODULE_6__common__["M" /* setDefaultOptions */])(BulletChart, { - animation: { - type: __WEBPACK_IMPORTED_MODULE_4__constants__["c" /* BAR */] - } -}); - -function wrapData(options) { - var series = options.series; - - for (var i = 0; i < series.length; i++) { - var seriesItem = series[i]; - var data = seriesItem.data; - if (data && !Object(__WEBPACK_IMPORTED_MODULE_6__common__["z" /* isArray */])(data[0]) && !Object(__WEBPACK_IMPORTED_MODULE_6__common__["C" /* isObject */])(data[0])) { - seriesItem.data = [ data ]; - } - } -} - -/* harmony default export */ __webpack_exports__["a"] = (BulletChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/bullet-chart/bullet.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__target__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bullet-chart/target.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mixins_point_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/point-events-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mixins_note_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/note-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__bar_chart_bar__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - - -var Bullet = (function (ChartElement) { - function Bullet(value, options) { - ChartElement.call(this, options); - - this.aboveAxis = this.options.aboveAxis; - this.color = options.color || __WEBPACK_IMPORTED_MODULE_6__common_constants__["E" /* WHITE */]; - this.value = value; - } - - if ( ChartElement ) Bullet.__proto__ = ChartElement; - Bullet.prototype = Object.create( ChartElement && ChartElement.prototype ); - Bullet.prototype.constructor = Bullet; - - Bullet.prototype.render = function render () { - var options = this.options; - - if (!this._rendered) { - this._rendered = true; - - if (Object(__WEBPACK_IMPORTED_MODULE_7__common__["l" /* defined */])(this.value.target)) { - this.target = new __WEBPACK_IMPORTED_MODULE_1__target__["a" /* default */]({ - type: options.target.shape, - background: options.target.color || this.color, - opacity: options.opacity, - zIndex: options.zIndex, - border: options.target.border, - vAlign: __WEBPACK_IMPORTED_MODULE_6__common_constants__["B" /* TOP */], - align: __WEBPACK_IMPORTED_MODULE_6__common_constants__["z" /* RIGHT */] - }); - - this.target.value = this.value; - this.target.dataItem = this.dataItem; - this.target.series = this.series; - - this.append(this.target); - } - - this.createNote(); - } - }; - - Bullet.prototype.reflow = function reflow (box) { - this.render(); - - var ref = this; - var options = ref.options; - var target = ref.target; - var chart = ref.owner; - var invertAxes = options.invertAxes; - var valueAxis = chart.seriesValueAxis(this.options); - var categorySlot = chart.categorySlot(chart.categoryAxis, options.categoryIx, valueAxis); - var targetValueSlot = valueAxis.getSlot(this.value.target); - var targetSlotX = invertAxes ? targetValueSlot : categorySlot; - var targetSlotY = invertAxes ? categorySlot : targetValueSlot; - - if (target) { - var targetSlot = new __WEBPACK_IMPORTED_MODULE_2__core__["a" /* Box */]( - targetSlotX.x1, targetSlotY.y1, - targetSlotX.x2, targetSlotY.y2 - ); - target.options.height = invertAxes ? targetSlot.height() : options.target.line.width; - target.options.width = invertAxes ? options.target.line.width : targetSlot.width(); - target.reflow(targetSlot); - } - - if (this.note) { - this.note.reflow(box); - } - - this.box = box; - }; - - Bullet.prototype.createVisual = function createVisual () { - ChartElement.prototype.createVisual.call(this); - - var options = this.options; - var body = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(this.box.toRect(), { - fill: { - color: this.color, - opacity: options.opacity - }, - stroke: null - }); - - if (options.border.width > 0) { - body.options.set("stroke", { - color: options.border.color || this.color, - width: options.border.width, - dashType: options.border.dashType, - opacity: Object(__WEBPACK_IMPORTED_MODULE_7__common__["Q" /* valueOrDefault */])(options.border.opacity, options.opacity) - }); - } - - this.bodyVisual = body; - - Object(__WEBPACK_IMPORTED_MODULE_7__common__["f" /* alignPathToPixel */])(body); - this.visual.append(body); - }; - - Bullet.prototype.createAnimation = function createAnimation () { - if (this.bodyVisual) { - this.animation = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Animation.create( - this.bodyVisual, this.options.animation - ); - } - }; - - Bullet.prototype.createHighlight = function createHighlight (style) { - return __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(this.box.toRect(), style); - }; - - Bullet.prototype.highlightVisual = function highlightVisual () { - return this.bodyVisual; - }; - - Bullet.prototype.highlightVisualArgs = function highlightVisualArgs () { - return { - rect: this.box.toRect(), - visual: this.bodyVisual, - options: this.options - }; - }; - - Bullet.prototype.formatValue = function formatValue (format) { - return this.owner.formatPointValue(this, format); - }; - - return Bullet; -}(__WEBPACK_IMPORTED_MODULE_2__core__["d" /* ChartElement */])); - -Bullet.prototype.tooltipAnchor = __WEBPACK_IMPORTED_MODULE_5__bar_chart_bar__["a" /* default */].prototype.tooltipAnchor; - -Object(__WEBPACK_IMPORTED_MODULE_7__common__["M" /* setDefaultOptions */])(Bullet, { - border: { - width: 1 - }, - vertical: false, - opacity: 1, - target: { - shape: "", - border: { - width: 0, - color: "green" - }, - line: { - width: 2 - } - }, - tooltip: { - format: "Current: {0}
Target: {1}" - } -}); - -Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])(Bullet.prototype, __WEBPACK_IMPORTED_MODULE_3__mixins_point_events_mixin__["a" /* default */]); -Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])(Bullet.prototype, __WEBPACK_IMPORTED_MODULE_4__mixins_note_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (Bullet); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/bullet-chart/target.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_point_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/point-events-mixin.js"); - - - - -var Target = (function (ShapeElement) { - function Target () { - ShapeElement.apply(this, arguments); - }if ( ShapeElement ) Target.__proto__ = ShapeElement; - Target.prototype = Object.create( ShapeElement && ShapeElement.prototype ); - Target.prototype.constructor = Target; - - - - return Target; -}(__WEBPACK_IMPORTED_MODULE_0__core__["t" /* ShapeElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])(Target.prototype, __WEBPACK_IMPORTED_MODULE_2__mixins_point_events_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (Target); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/candlestick-chart/candlestick-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__categorical_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/categorical-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__layout_cluster_layout__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/layout/cluster-layout.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__candlestick__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/candlestick-chart/candlestick.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mixins_clip_animation_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/clip-animation-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_are_numbers__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/are-numbers.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - -var CandlestickChart = (function (CategoricalChart) { - function CandlestickChart () { - CategoricalChart.apply(this, arguments); - } - - if ( CategoricalChart ) CandlestickChart.__proto__ = CategoricalChart; - CandlestickChart.prototype = Object.create( CategoricalChart && CategoricalChart.prototype ); - CandlestickChart.prototype.constructor = CandlestickChart; - - CandlestickChart.prototype.reflowCategories = function reflowCategories (categorySlots) { - var children = this.children; - var childrenLength = children.length; - - for (var i = 0; i < childrenLength; i++) { - children[i].reflow(categorySlots[i]); - } - }; - - CandlestickChart.prototype.addValue = function addValue (data, fields) { - var categoryIx = fields.categoryIx; - var category = fields.category; - var series = fields.series; - var seriesIx = fields.seriesIx; - var ref = this; - var children = ref.children; - var options = ref.options; - var value = data.valueFields; - var valueParts = this.splitValue(value); - var hasValue = Object(__WEBPACK_IMPORTED_MODULE_5__utils_are_numbers__["a" /* default */])(valueParts); - var dataItem = series.data[categoryIx]; - var categoryPoints = this.categoryPoints[categoryIx]; - var point; - - if (!categoryPoints) { - this.categoryPoints[categoryIx] = categoryPoints = []; - } - - if (hasValue) { - point = this.createPoint(data, fields); - } - - var cluster = children[categoryIx]; - if (!cluster) { - cluster = new __WEBPACK_IMPORTED_MODULE_1__layout_cluster_layout__["a" /* default */]({ - vertical: options.invertAxes, - gap: options.gap, - spacing: options.spacing, - rtl: !options.invertAxes && (this.chartService || {}).rtl - }); - this.append(cluster); - } - - if (point) { - this.updateRange(value, fields); - - cluster.append(point); - - point.categoryIx = categoryIx; - point.category = category; - point.series = series; - point.seriesIx = seriesIx; - point.owner = this; - point.dataItem = dataItem; - point.noteText = data.fields.noteText; - } - - this.points.push(point); - categoryPoints.push(point); - }; - - CandlestickChart.prototype.pointType = function pointType () { - return __WEBPACK_IMPORTED_MODULE_2__candlestick__["a" /* default */]; - }; - - CandlestickChart.prototype.createPoint = function createPoint (data, fields) { - var categoryIx = fields.categoryIx; - var category = fields.category; - var series = fields.series; - var seriesIx = fields.seriesIx; - var pointType = this.pointType(); - var value = data.valueFields; - var pointOptions = Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])({}, series); - var color = data.fields.color || series.color; - - pointOptions = this.evalPointOptions( - pointOptions, value, category, categoryIx, series, seriesIx - ); - - if (series.type === __WEBPACK_IMPORTED_MODULE_4__constants__["i" /* CANDLESTICK */]) { - if (value.open > value.close) { - color = data.fields.downColor || series.downColor || series.color; - } - } - - if (Object(__WEBPACK_IMPORTED_MODULE_7__common__["A" /* isFunction */])(series.color)) { - color = pointOptions.color; - } - - pointOptions.vertical = !this.options.invertAxes; - - var point = new pointType(value, pointOptions); - point.color = color; - - return point; - }; - - CandlestickChart.prototype.splitValue = function splitValue (value) { - return [ value.low, value.open, value.close, value.high ]; - }; - - CandlestickChart.prototype.updateRange = function updateRange (value, fields) { - var axisName = fields.series.axis; - var parts = this.splitValue(value); - var axisRange = this.valueAxisRanges[axisName]; - - axisRange = this.valueAxisRanges[axisName] = - axisRange || { min: __WEBPACK_IMPORTED_MODULE_6__common_constants__["s" /* MAX_VALUE */], max: __WEBPACK_IMPORTED_MODULE_6__common_constants__["t" /* MIN_VALUE */] }; - - axisRange = this.valueAxisRanges[axisName] = { - min: Math.min.apply(Math, parts.concat([ axisRange.min ])), - max: Math.max.apply(Math, parts.concat([ axisRange.max ])) - }; - }; - - CandlestickChart.prototype.formatPointValue = function formatPointValue (point, format) { - var value = point.value; - - return this.chartService.format.auto(format, - value.open, value.high, - value.low, value.close, point.category - ); - }; - - CandlestickChart.prototype.animationPoints = function animationPoints () { - return this.points; - }; - - return CandlestickChart; -}(__WEBPACK_IMPORTED_MODULE_0__categorical_chart__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])(CandlestickChart.prototype, __WEBPACK_IMPORTED_MODULE_3__mixins_clip_animation_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (CandlestickChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/candlestick-chart/candlestick.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_point_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/point-events-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mixins_note_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/note-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_has_gradient_overlay__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/has-gradient-overlay.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - -var Candlestick = (function (ChartElement) { - function Candlestick(value, options) { - ChartElement.call(this, options); - this.value = value; - } - - if ( ChartElement ) Candlestick.__proto__ = ChartElement; - Candlestick.prototype = Object.create( ChartElement && ChartElement.prototype ); - Candlestick.prototype.constructor = Candlestick; - - Candlestick.prototype.reflow = function reflow (box) { - var ref = this; - var options = ref.options; - var value = ref.value; - var chart = ref.owner; - var valueAxis = chart.seriesValueAxis(options); - var ocSlot = valueAxis.getSlot(value.open, value.close); - var lhSlot = valueAxis.getSlot(value.low, value.high); - - ocSlot.x1 = lhSlot.x1 = box.x1; - ocSlot.x2 = lhSlot.x2 = box.x2; - - this.realBody = ocSlot; - - var mid = lhSlot.center().x; - var points = []; - - points.push([ [ mid, lhSlot.y1 ], [ mid, ocSlot.y1 ] ]); - points.push([ [ mid, ocSlot.y2 ], [ mid, lhSlot.y2 ] ]); - - this.lines = points; - - this.box = lhSlot.clone().wrap(ocSlot); - - if (!this._rendered) { - this._rendered = true; - this.createNote(); - } - - this.reflowNote(); - }; - - Candlestick.prototype.reflowNote = function reflowNote () { - if (this.note) { - this.note.reflow(this.box); - } - }; - - Candlestick.prototype.createVisual = function createVisual () { - ChartElement.prototype.createVisual.call(this); - this._mainVisual = this.mainVisual(this.options); - this.visual.append( - this._mainVisual - ); - - this.createOverlay(); - }; - - Candlestick.prototype.mainVisual = function mainVisual (options) { - var group = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group(); - - this.createBody(group, options); - this.createLines(group, options); - - return group; - }; - - Candlestick.prototype.createBody = function createBody (container, options) { - var body = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(this.realBody.toRect(), { - fill: { - color: this.color, - opacity: options.opacity - }, - stroke: null - }); - - if (options.border.width > 0) { - body.options.set("stroke", { - color: this.getBorderColor(), - width: options.border.width, - dashType: options.border.dashType, - opacity: Object(__WEBPACK_IMPORTED_MODULE_7__common__["Q" /* valueOrDefault */])(options.border.opacity, options.opacity) - }); - } - - Object(__WEBPACK_IMPORTED_MODULE_7__common__["f" /* alignPathToPixel */])(body); - container.append(body); - - if (Object(__WEBPACK_IMPORTED_MODULE_5__utils_has_gradient_overlay__["a" /* default */])(options)) { - container.append(this.createGradientOverlay(body, { baseColor: this.color }, Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])({ - end: !options.vertical ? [ 0, 1 ] : undefined - }, options.overlay))); - } - }; - - Candlestick.prototype.createLines = function createLines (container, options) { - this.drawLines(container, options, this.lines, options.line); - }; - - Candlestick.prototype.drawLines = function drawLines (container, options, lines, lineOptions) { - if (!lines) { - return; - } - - var lineStyle = { - stroke: { - color: lineOptions.color || this.color, - opacity: Object(__WEBPACK_IMPORTED_MODULE_7__common__["Q" /* valueOrDefault */])(lineOptions.opacity, options.opacity), - width: lineOptions.width, - dashType: lineOptions.dashType, - lineCap: "butt" - } - }; - - for (var i = 0; i < lines.length; i++) { - var line = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromPoints(lines[i], lineStyle); - Object(__WEBPACK_IMPORTED_MODULE_7__common__["f" /* alignPathToPixel */])(line); - container.append(line); - } - }; - - Candlestick.prototype.getBorderColor = function getBorderColor () { - var border = this.options.border; - var borderColor = border.color; - - if (!Object(__WEBPACK_IMPORTED_MODULE_7__common__["l" /* defined */])(borderColor)) { - borderColor = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["b" /* Color */](this.color).brightness(border._brightness).toHex(); - } - - return borderColor; - }; - - Candlestick.prototype.createOverlay = function createOverlay () { - var overlay = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(this.box.toRect(), { - fill: { - color: __WEBPACK_IMPORTED_MODULE_6__common_constants__["E" /* WHITE */], - opacity: 0 - }, - stroke: null - }); - - this.visual.append(overlay); - }; - - Candlestick.prototype.createHighlight = function createHighlight () { - var highlight = this.options.highlight; - var normalColor = this.color; - - this.color = highlight.color || this.color; - var overlay = this.mainVisual( - Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])({}, this.options, { - line: { - color: this.getBorderColor() - } - }, highlight) - ); - this.color = normalColor; - - return overlay; - }; - - Candlestick.prototype.highlightVisual = function highlightVisual () { - return this._mainVisual; - }; - - Candlestick.prototype.highlightVisualArgs = function highlightVisualArgs () { - return { - options: this.options, - rect: this.box.toRect(), - visual: this._mainVisual - }; - }; - - Candlestick.prototype.tooltipAnchor = function tooltipAnchor () { - var box = this.box; - var clipBox = this.owner.pane.clipBox() || box; - - return { - point: new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](box.x2 + __WEBPACK_IMPORTED_MODULE_4__constants__["_8" /* TOOLTIP_OFFSET */], Math.max(box.y1, clipBox.y1) + __WEBPACK_IMPORTED_MODULE_4__constants__["_8" /* TOOLTIP_OFFSET */]), - align: { - horizontal: __WEBPACK_IMPORTED_MODULE_6__common_constants__["r" /* LEFT */], - vertical: __WEBPACK_IMPORTED_MODULE_6__common_constants__["B" /* TOP */] - } - }; - }; - - Candlestick.prototype.formatValue = function formatValue (format) { - return this.owner.formatPointValue(this, format); - }; - - Candlestick.prototype.overlapsBox = function overlapsBox (box) { - return this.box.overlaps(box); - }; - - return Candlestick; -}(__WEBPACK_IMPORTED_MODULE_1__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_7__common__["M" /* setDefaultOptions */])(Candlestick, { - vertical: true, - border: { - _brightness: 0.8 - }, - line: { - width: 2 - }, - overlay: { - gradient: "glass" - }, - tooltip: { - format: "" + - "" + - "" + - "" + - "" + - "" + - "
{4:d}
Open:{0:C}
High:{1:C}
Low:{2:C}
Close:{3:C}
" - }, - highlight: { - opacity: 1, - border: { - width: 1, - opacity: 1 - }, - line: { - width: 1, - opacity: 1 - } - }, - notes: { - visible: true, - label: {} - } -}); - -Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])(Candlestick.prototype, __WEBPACK_IMPORTED_MODULE_2__mixins_point_events_mixin__["a" /* default */]); -Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])(Candlestick.prototype, __WEBPACK_IMPORTED_MODULE_3__mixins_note_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (Candlestick); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/categorical-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__error_bars_error_range_calculator__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/error-bars/error-range-calculator.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__error_bars_categorical_error_bar__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/error-bars/categorical-error-bar.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__series_binder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/series-binder.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_eval_options__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/eval-options.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_categories_count__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/categories-count.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - - - -var CategoricalChart = (function (ChartElement) { - function CategoricalChart(plotArea, options) { - ChartElement.call(this, options); - - this.plotArea = plotArea; - this.chartService = plotArea.chartService; - this.categoryAxis = plotArea.seriesCategoryAxis(options.series[0]); - - // Value axis ranges grouped by axis name, e.g.: - // primary: { min: 0, max: 1 } - this.valueAxisRanges = {}; - - this.points = []; - this.categoryPoints = []; - this.seriesPoints = []; - this.seriesOptions = []; - this._evalSeries = []; - - this.render(); - } - - if ( ChartElement ) CategoricalChart.__proto__ = ChartElement; - CategoricalChart.prototype = Object.create( ChartElement && ChartElement.prototype ); - CategoricalChart.prototype.constructor = CategoricalChart; - - CategoricalChart.prototype.render = function render () { - this.traverseDataPoints(this.addValue.bind(this)); - }; - - CategoricalChart.prototype.pointOptions = function pointOptions (series, seriesIx) { - var options = this.seriesOptions[seriesIx]; - if (!options) { - var defaults = this.pointType().prototype.defaults; - this.seriesOptions[seriesIx] = options = Object(__WEBPACK_IMPORTED_MODULE_8__common__["k" /* deepExtend */])({ }, defaults, { - vertical: !this.options.invertAxes - }, series); - } - - return options; - }; - - CategoricalChart.prototype.plotValue = function plotValue (point) { - if (!point) { - return 0; - } - - if (this.options.isStacked100 && Object(__WEBPACK_IMPORTED_MODULE_8__common__["B" /* isNumber */])(point.value)) { - var categoryIx = point.categoryIx; - var categoryPoints = this.categoryPoints[categoryIx]; - var otherValues = []; - var categorySum = 0; - - for (var i = 0; i < categoryPoints.length; i++) { - var other = categoryPoints[i]; - if (other) { - var stack = point.series.stack; - var otherStack = other.series.stack; - - if ((stack && otherStack) && stack.group !== otherStack.group) { - continue; - } - - if (Object(__WEBPACK_IMPORTED_MODULE_8__common__["B" /* isNumber */])(other.value)) { - categorySum += Math.abs(other.value); - otherValues.push(Math.abs(other.value)); - } - } - } - - if (categorySum > 0) { - return point.value / categorySum; - } - } - - return point.value; - }; - - CategoricalChart.prototype.plotRange = function plotRange (point, startValue) { - var this$1 = this; - if ( startValue === void 0 ) startValue = 0; - - var categoryPoints = this.categoryPoints[point.categoryIx]; - - if (this.options.isStacked) { - var plotValue = this.plotValue(point); - var positive = plotValue >= 0; - var prevValue = startValue; - var isStackedBar = false; - - for (var i = 0; i < categoryPoints.length; i++) { - var other = categoryPoints[i]; - - if (point === other) { - break; - } - - var stack = point.series.stack; - var otherStack = other.series.stack; - if (stack && otherStack) { - if (typeof stack === __WEBPACK_IMPORTED_MODULE_7__common_constants__["A" /* STRING */] && stack !== otherStack) { - continue; - } - - if (stack.group && stack.group !== otherStack.group) { - continue; - } - } - - var otherValue = this$1.plotValue(other); - if ((otherValue >= 0 && positive) || - (otherValue < 0 && !positive)) { - prevValue += otherValue; - plotValue += otherValue; - isStackedBar = true; - - if (this$1.options.isStacked100) { - plotValue = Math.min(plotValue, 1); - } - } - } - - if (isStackedBar) { - prevValue -= startValue; - } - - return [ prevValue, plotValue ]; - } - - var series = point.series; - var valueAxis = this.seriesValueAxis(series); - var axisCrossingValue = this.categoryAxisCrossingValue(valueAxis); - - return [ axisCrossingValue, Object(__WEBPACK_IMPORTED_MODULE_8__common__["j" /* convertableToNumber */])(point.value) ? point.value : axisCrossingValue ]; - }; - - CategoricalChart.prototype.stackLimits = function stackLimits (axisName, stackName) { - var this$1 = this; - - var min = __WEBPACK_IMPORTED_MODULE_7__common_constants__["s" /* MAX_VALUE */]; - var max = __WEBPACK_IMPORTED_MODULE_7__common_constants__["t" /* MIN_VALUE */]; - - for (var i = 0; i < this.categoryPoints.length; i++) { - var categoryPoints = this$1.categoryPoints[i]; - if (!categoryPoints) { - continue; - } - - for (var pIx = 0; pIx < categoryPoints.length; pIx++) { - var point = categoryPoints[pIx]; - if (point) { - if (point.series.stack === stackName || point.series.axis === axisName) { - var to = this$1.plotRange(point, 0)[1]; - if (Object(__WEBPACK_IMPORTED_MODULE_8__common__["l" /* defined */])(to) && isFinite(to)) { - max = Math.max(max, to); - min = Math.min(min, to); - } - } - } - } - } - - return { min: min, max: max }; - }; - - CategoricalChart.prototype.updateStackRange = function updateStackRange () { - var this$1 = this; - - var ref = this.options; - var isStacked = ref.isStacked; - var chartSeries = ref.series; - var limitsCache = {}; - - if (isStacked) { - for (var i = 0; i < chartSeries.length; i++) { - var series = chartSeries[i]; - var axisName = series.axis; - var key = axisName + series.stack; - - var limits = limitsCache[key]; - if (!limits) { - limits = this$1.stackLimits(axisName, series.stack); - - var errorTotals = this$1.errorTotals; - if (errorTotals) { - if (errorTotals.negative.length) { - limits.min = Math.min(limits.min, Object(__WEBPACK_IMPORTED_MODULE_8__common__["N" /* sparseArrayLimits */])(errorTotals.negative).min); - } - if (errorTotals.positive.length) { - limits.max = Math.max(limits.max, Object(__WEBPACK_IMPORTED_MODULE_8__common__["N" /* sparseArrayLimits */])(errorTotals.positive).max); - } - } - - if (limits.min !== __WEBPACK_IMPORTED_MODULE_7__common_constants__["s" /* MAX_VALUE */] || limits.max !== __WEBPACK_IMPORTED_MODULE_7__common_constants__["t" /* MIN_VALUE */]) { - limitsCache[key] = limits; - } else { - limits = null; - } - } - - if (limits) { - this$1.valueAxisRanges[axisName] = limits; - } - } - } - }; - - CategoricalChart.prototype.addErrorBar = function addErrorBar (point, data, categoryIx) { - var value = point.value; - var series = point.series; - var seriesIx = point.seriesIx; - var errorBars = point.options.errorBars; - var lowValue = data.fields[__WEBPACK_IMPORTED_MODULE_3__constants__["r" /* ERROR_LOW_FIELD */]]; - var highValue = data.fields[__WEBPACK_IMPORTED_MODULE_3__constants__["q" /* ERROR_HIGH_FIELD */]]; - var errorRange; - - if (Object(__WEBPACK_IMPORTED_MODULE_8__common__["B" /* isNumber */])(lowValue) && Object(__WEBPACK_IMPORTED_MODULE_8__common__["B" /* isNumber */])(highValue)) { - errorRange = { low: lowValue, high: highValue }; - } else if (errorBars && Object(__WEBPACK_IMPORTED_MODULE_8__common__["l" /* defined */])(errorBars.value)) { - this.seriesErrorRanges = this.seriesErrorRanges || []; - this.seriesErrorRanges[seriesIx] = this.seriesErrorRanges[seriesIx] || - new __WEBPACK_IMPORTED_MODULE_0__error_bars_error_range_calculator__["a" /* default */](errorBars.value, series, __WEBPACK_IMPORTED_MODULE_7__common_constants__["D" /* VALUE */]); - - errorRange = this.seriesErrorRanges[seriesIx].getErrorRange(value, errorBars.value); - } - - if (errorRange) { - point.low = errorRange.low; - point.high = errorRange.high; - this.addPointErrorBar(point, categoryIx); - } - }; - - CategoricalChart.prototype.addPointErrorBar = function addPointErrorBar (point, categoryIx) { - var isVertical = !this.options.invertAxes; - var options = point.options.errorBars; - var series = point.series; - var low = point.low; - var high = point.high; - - if (this.options.isStacked) { - var stackedErrorRange = this.stackedErrorRange(point, categoryIx); - low = stackedErrorRange.low; - high = stackedErrorRange.high; - } else { - var fields = { categoryIx: categoryIx, series: series }; - this.updateRange({ value: low }, fields); - this.updateRange({ value: high }, fields); - } - - var errorBar = new __WEBPACK_IMPORTED_MODULE_1__error_bars_categorical_error_bar__["a" /* default */](low, high, isVertical, this, series, options); - point.errorBars = [ errorBar ]; - point.append(errorBar); - }; - - CategoricalChart.prototype.stackedErrorRange = function stackedErrorRange (point, categoryIx) { - var plotValue = this.plotRange(point, 0)[1] - point.value; - var low = point.low + plotValue; - var high = point.high + plotValue; - - this.errorTotals = this.errorTotals || { positive: [], negative: [] }; - - if (low < 0) { - this.errorTotals.negative[categoryIx] = Math.min(this.errorTotals.negative[categoryIx] || 0, low); - } - - if (high > 0) { - this.errorTotals.positive[categoryIx] = Math.max(this.errorTotals.positive[categoryIx] || 0, high); - } - - return { low: low, high: high }; - }; - - CategoricalChart.prototype.addValue = function addValue (data, fields) { - var categoryIx = fields.categoryIx; - var series = fields.series; - var seriesIx = fields.seriesIx; - - var categoryPoints = this.categoryPoints[categoryIx]; - if (!categoryPoints) { - this.categoryPoints[categoryIx] = categoryPoints = []; - } - - var seriesPoints = this.seriesPoints[seriesIx]; - if (!seriesPoints) { - this.seriesPoints[seriesIx] = seriesPoints = []; - } - - var point = this.createPoint(data, fields); - if (point) { - Object.assign(point, fields); - - point.owner = this; - point.noteText = data.fields.noteText; - if (!Object(__WEBPACK_IMPORTED_MODULE_8__common__["l" /* defined */])(point.dataItem)) { - point.dataItem = series.data[categoryIx]; - } - this.addErrorBar(point, data, categoryIx); - } - - this.points.push(point); - seriesPoints.push(point); - categoryPoints.push(point); - - this.updateRange(data.valueFields, fields); - }; - - CategoricalChart.prototype.evalPointOptions = function evalPointOptions (options, value, category, categoryIx, series, seriesIx) { - var state = { defaults: series._defaults, excluded: [ "data", "aggregate", "_events", "tooltip", "content", "template", "visual", "toggle", "_outOfRangeMinPoint", "_outOfRangeMaxPoint" ] }; - - var doEval = this._evalSeries[seriesIx]; - if (!Object(__WEBPACK_IMPORTED_MODULE_8__common__["l" /* defined */])(doEval)) { - this._evalSeries[seriesIx] = doEval = Object(__WEBPACK_IMPORTED_MODULE_4__utils_eval_options__["a" /* default */])(options, {}, state, true); - } - - var pointOptions = options; - if (doEval) { - pointOptions = Object(__WEBPACK_IMPORTED_MODULE_8__common__["k" /* deepExtend */])({}, pointOptions); - Object(__WEBPACK_IMPORTED_MODULE_4__utils_eval_options__["a" /* default */])(pointOptions, { - value: value, - category: category, - index: categoryIx, - series: series, - dataItem: series.data[categoryIx] - }, state); - } - - return pointOptions; - }; - - CategoricalChart.prototype.updateRange = function updateRange (data, fields) { - var axisName = fields.series.axis; - var value = data.value; - var axisRange = this.valueAxisRanges[axisName]; - - if (isFinite(value) && value !== null) { - axisRange = this.valueAxisRanges[axisName] = - axisRange || { min: __WEBPACK_IMPORTED_MODULE_7__common_constants__["s" /* MAX_VALUE */], max: __WEBPACK_IMPORTED_MODULE_7__common_constants__["t" /* MIN_VALUE */] }; - - axisRange.min = Math.min(axisRange.min, value); - axisRange.max = Math.max(axisRange.max, value); - } - }; - - CategoricalChart.prototype.seriesValueAxis = function seriesValueAxis (series) { - var plotArea = this.plotArea; - var axisName = series.axis; - var axis = axisName ? plotArea.namedValueAxes[axisName] : plotArea.valueAxis; - - if (!axis) { - throw new Error("Unable to locate value axis with name " + axisName); - } - - return axis; - }; - - CategoricalChart.prototype.reflow = function reflow (targetBox) { - var this$1 = this; - - var categorySlots = this.categorySlots = []; - var chartPoints = this.points; - var categoryAxis = this.categoryAxis; - var pointIx = 0; - - this.traverseDataPoints(function (data, fields) { - var categoryIx = fields.categoryIx; - var currentSeries = fields.series; - - var valueAxis = this$1.seriesValueAxis(currentSeries); - var point = chartPoints[pointIx++]; - - var categorySlot = categorySlots[categoryIx]; - if (!categorySlot) { - categorySlots[categoryIx] = categorySlot = - this$1.categorySlot(categoryAxis, categoryIx, valueAxis); - } - - if (point) { - var plotRange = this$1.plotRange(point, valueAxis.startValue()); - var valueSlot = this$1.valueSlot(valueAxis, plotRange); - if (valueSlot) { - var pointSlot = this$1.pointSlot(categorySlot, valueSlot); - - point.aboveAxis = this$1.aboveAxis(point, valueAxis); - point.stackValue = plotRange[1]; - - if (this$1.options.isStacked100) { - point.percentage = this$1.plotValue(point); - } - - this$1.reflowPoint(point, pointSlot); - } else { - point.visible = false; - } - } - }); - - this.reflowCategories(categorySlots); - if (!this.options.clip && this.options.limitPoints && this.points.length) { - this.limitPoints(); - } - - this.box = targetBox; - }; - - CategoricalChart.prototype.valueSlot = function valueSlot (valueAxis, plotRange) { - return valueAxis.getSlot(plotRange[0], plotRange[1], !this.options.clip); - }; - - CategoricalChart.prototype.limitPoints = function limitPoints () { - var this$1 = this; - - var categoryPoints = this.categoryPoints; - var points = categoryPoints[0].concat(Object(__WEBPACK_IMPORTED_MODULE_8__common__["E" /* last */])(categoryPoints)); - for (var idx = 0; idx < points.length; idx++) { - if (points[idx]) { - this$1.limitPoint(points[idx]); - } - } - }; - - CategoricalChart.prototype.limitPoint = function limitPoint (point) { - var limittedSlot = this.categoryAxis.limitSlot(point.box); - if (!limittedSlot.equals(point.box)) { - point.reflow(limittedSlot); - } - }; - - CategoricalChart.prototype.aboveAxis = function aboveAxis (point, valueAxis) { - var axisCrossingValue = this.categoryAxisCrossingValue(valueAxis); - var value = point.value; - - return valueAxis.options.reverse ? - value < axisCrossingValue : value >= axisCrossingValue; - }; - - CategoricalChart.prototype.categoryAxisCrossingValue = function categoryAxisCrossingValue (valueAxis) { - var categoryAxis = this.categoryAxis; - var options = valueAxis.options; - var crossingValues = [].concat( - options.axisCrossingValues || options.axisCrossingValue - ); - - return crossingValues[categoryAxis.axisIndex || 0] || 0; - }; - - CategoricalChart.prototype.reflowPoint = function reflowPoint (point, pointSlot) { - point.reflow(pointSlot); - }; - - CategoricalChart.prototype.reflowCategories = function reflowCategories () { }; - - CategoricalChart.prototype.pointSlot = function pointSlot (categorySlot, valueSlot) { - var options = this.options; - var invertAxes = options.invertAxes; - var slotX = invertAxes ? valueSlot : categorySlot; - var slotY = invertAxes ? categorySlot : valueSlot; - - return new __WEBPACK_IMPORTED_MODULE_6__core__["a" /* Box */](slotX.x1, slotY.y1, slotX.x2, slotY.y2); - }; - - CategoricalChart.prototype.categorySlot = function categorySlot (categoryAxis, categoryIx) { - return categoryAxis.getSlot(categoryIx); - }; - - CategoricalChart.prototype.traverseDataPoints = function traverseDataPoints (callback) { - var this$1 = this; - - var series = this.options.series; - var count = Object(__WEBPACK_IMPORTED_MODULE_5__utils_categories_count__["a" /* default */])(series); - var seriesCount = series.length; - - for (var seriesIx = 0; seriesIx < seriesCount; seriesIx++) { - this$1._outOfRangeCallback(series[seriesIx], "_outOfRangeMinPoint", seriesIx, callback); - } - - for (var categoryIx = 0; categoryIx < count; categoryIx++) { - for (var seriesIx$1 = 0; seriesIx$1 < seriesCount; seriesIx$1++) { - var currentSeries = series[seriesIx$1]; - var currentCategory = this$1.categoryAxis.categoryAt(categoryIx); - var pointData = this$1._bindPoint(currentSeries, seriesIx$1, categoryIx); - - callback(pointData, { - category: currentCategory, - categoryIx: categoryIx, - series: currentSeries, - seriesIx: seriesIx$1 - }); - } - } - - for (var seriesIx$2 = 0; seriesIx$2 < seriesCount; seriesIx$2++) { - this$1._outOfRangeCallback(series[seriesIx$2], "_outOfRangeMaxPoint", seriesIx$2, callback); - } - }; - - CategoricalChart.prototype._outOfRangeCallback = function _outOfRangeCallback (series, field, seriesIx, callback) { - var outOfRangePoint = series[field]; - if (outOfRangePoint) { - var categoryIx = outOfRangePoint.categoryIx; - var pointData = this._bindPoint(series, seriesIx, categoryIx, outOfRangePoint.item); - - callback(pointData, { - category: outOfRangePoint.category, - categoryIx: categoryIx, - series: series, - seriesIx: seriesIx, - dataItem: outOfRangePoint.item - }); - } - }; - - CategoricalChart.prototype._bindPoint = function _bindPoint (series, seriesIx, categoryIx, item) { - if (!this._bindCache) { - this._bindCache = []; - } - - var bindCache = this._bindCache[seriesIx]; - if (!bindCache) { - bindCache = this._bindCache[seriesIx] = []; - } - - var data = bindCache[categoryIx]; - if (!data) { - data = bindCache[categoryIx] = __WEBPACK_IMPORTED_MODULE_2__series_binder__["a" /* default */].current.bindPoint(series, categoryIx, item); - } - - return data; - }; - - CategoricalChart.prototype.formatPointValue = function formatPointValue (point, format) { - if (point.value === null) { - return ""; - } - - return this.chartService.format.auto(format, point.value); - }; - - CategoricalChart.prototype.pointValue = function pointValue (data) { - return data.valueFields.value; - }; - - return CategoricalChart; -}(__WEBPACK_IMPORTED_MODULE_6__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_8__common__["M" /* setDefaultOptions */])(CategoricalChart, { - series: [], - invertAxes: false, - isStacked: false, - clip: true, - limitPoints: true -}); - -/* harmony default export */ __webpack_exports__["a"] = (CategoricalChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/chart-container.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); - - - - -var ChartContainer = (function (ChartElement) { - function ChartContainer(options, pane) { - ChartElement.call(this, options); - this.pane = pane; - } - - if ( ChartElement ) ChartContainer.__proto__ = ChartElement; - ChartContainer.prototype = Object.create( ChartElement && ChartElement.prototype ); - ChartContainer.prototype.constructor = ChartContainer; - - ChartContainer.prototype.shouldClip = function shouldClip () { - var children = this.children; - var length = children.length; - - for (var i = 0; i < length; i++) { - if (children[i].options.clip === true) { - return true; - } - } - return false; - }; - - ChartContainer.prototype._clipBox = function _clipBox () { - return this.pane.chartsBox(); - }; - - ChartContainer.prototype.createVisual = function createVisual () { - this.visual = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group({ - zIndex: 0 - }); - - if (this.shouldClip()) { - var clipBox = this.clipBox = this._clipBox(); - var clipRect = clipBox.toRect(); - var clipPath = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(clipRect); - - this.visual.clip(clipPath); - this.unclipLabels(); - } - }; - - ChartContainer.prototype.stackRoot = function stackRoot () { - return this; - }; - - ChartContainer.prototype.unclipLabels = function unclipLabels () { - var ref = this; - var charts = ref.children; - var clipBox = ref.clipBox; - - for (var i = 0; i < charts.length; i++) { - var points = charts[i].points || {}; - var length = points.length; - - for (var j = 0; j < length; j++) { - var point = points[j]; - if (point && point.visible !== false && point.overlapsBox && point.overlapsBox(clipBox)) { - if (point.unclipElements) { - point.unclipElements(); - } else { - var label = point.label; - var note = point.note; - - if (label && label.options.visible) { - if (label.alignToClipBox) { - label.alignToClipBox(clipBox); - } - label.options.noclip = true; - } - - if (note && note.options.visible) { - note.options.noclip = true; - } - } - } - } - } - }; - - ChartContainer.prototype.destroy = function destroy () { - ChartElement.prototype.destroy.call(this); - - delete this.parent; - }; - - return ChartContainer; -}(__WEBPACK_IMPORTED_MODULE_1__core__["d" /* ChartElement */])); - -ChartContainer.prototype.isStackRoot = true; - -/* harmony default export */ __webpack_exports__["a"] = (ChartContainer); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__highlight__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/highlight.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__pan_and_zoom_pannable__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/pannable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pan_and_zoom_zoom_selection__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/zoom-selection.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pan_and_zoom_mousewheel_zoom__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/mousewheel-zoom.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__legend_legend__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/legend/legend.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__plotarea_plotarea_factory__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/plotarea-factory.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__selection__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/selection.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__series_binder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/series-binder.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__tooltip_tooltip__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/tooltip/tooltip.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__tooltip_shared_tooltip__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/tooltip/shared-tooltip.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__plotarea_categorical_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/categorical-plotarea.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__plotarea_plotarea_base__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/plotarea-base.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__services__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__utils_get_field__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/get-field.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__utils_is_date_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/is-date-axis.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__utils_get_date_field__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/get-date-field.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__api_elements__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/api-elements.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__date_utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__animations__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/animations.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__register_charts__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/register-charts.js"); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -var AXIS_NAMES = [ __WEBPACK_IMPORTED_MODULE_22__constants__["j" /* CATEGORY */], __WEBPACK_IMPORTED_MODULE_19__common_constants__["D" /* VALUE */], __WEBPACK_IMPORTED_MODULE_19__common_constants__["G" /* X */], __WEBPACK_IMPORTED_MODULE_19__common_constants__["H" /* Y */] ]; - -var MOUSEMOVE = "mousemove"; -var CONTEXTMENU = "contextmenu"; -var MOUSEMOVE_DELAY = 20; - -var Chart = (function (Class) { - function Chart(element, userOptions, themeOptions, context) { - var this$1 = this; - if ( context === void 0 ) context = {}; - - Class.call(this); - - this.observers = []; - this.addObserver(context.observer); - this.chartService = new __WEBPACK_IMPORTED_MODULE_14__services__["a" /* ChartService */](this, context); - this.chartService.theme = themeOptions; - - this._initElement(element); - - var options = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, this.options, userOptions); - this._originalOptions = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, options); - this._theme = themeOptions; - this._initTheme(options, themeOptions); - - this._initSurface(); - - this._initHandlers(); - - this.bindCategories(); - __WEBPACK_IMPORTED_MODULE_20__common__["b" /* FontLoader */].preloadFonts(userOptions, function () { - if (!this$1._destroyed) { - this$1.trigger('init'); - this$1._redraw(); - this$1._attachEvents(); - } - }); - } - - if ( Class ) Chart.__proto__ = Class; - Chart.prototype = Object.create( Class && Class.prototype ); - Chart.prototype.constructor = Chart; - - Chart.prototype._initElement = function _initElement (element) { - this._setElementClass(element); - element.style.position = "relative"; - while (element.firstChild) { - element.removeChild(element.firstChild); - } - this.element = element; - }; - - Chart.prototype._setElementClass = function _setElementClass (element) { - Object(__WEBPACK_IMPORTED_MODULE_20__common__["e" /* addClass */])(element, "k-chart"); - }; - - Chart.prototype._initTheme = function _initTheme (options, themeOptions) { - var seriesCopies = []; - var series = options.series || []; - - for (var i = 0; i < series.length; i++) { - seriesCopies.push(Object.assign({}, series[i])); - } - options.series = seriesCopies; - - resolveAxisAliases(options); - this.applyDefaults(options, themeOptions); - - // Clean up default if not overriden by data attributes - if (options.seriesColors === null) { - delete options.seriesColors; - } - - this.options = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, themeOptions, options); - this.applySeriesColors(); - }; - - Chart.prototype.getSize = function getSize () { - var chartArea = this.options.chartArea || {}; - var width = chartArea.width ? parseInt(chartArea.width, 10) : Math.floor(this.element.offsetWidth); - var height = chartArea.height ? parseInt(chartArea.height, 10) : Math.floor(this.element.offsetHeight); - - return { - width: width, - height: height - }; - }; - - Chart.prototype.resize = function resize (force) { - var size = this.getSize(); - var currentSize = this._size; - - if (force || (size.width > 0 || size.height > 0) && (!currentSize || size.width !== currentSize.width || size.height !== currentSize.height)) { - this._size = size; - this._resize(size, force); - this.trigger("resize", size); - } - }; - - Chart.prototype._resize = function _resize () { - this._noTransitionsRedraw(); - }; - - Chart.prototype.redraw = function redraw (paneName) { - this.applyDefaults(this.options); - this.applySeriesColors(); - - if (paneName) { - var plotArea = this._model._plotArea; - var pane = plotArea.findPane(paneName); - plotArea.redraw(pane); - } else { - this._redraw(); - } - }; - - Chart.prototype.getAxis = function getAxis (name) { - var axes = this._plotArea.axes; - - for (var idx = 0; idx < axes.length; idx++) { - if (axes[idx].options.name === name) { - axes[idx].prepareUserOptions(); - return new __WEBPACK_IMPORTED_MODULE_18__api_elements__["a" /* ChartAxis */](axes[idx]); - } - } - }; - - Chart.prototype.findAxisByName = function findAxisByName (name) { - return this.getAxis(name); - }; - - Chart.prototype.findPaneByName = function findPaneByName (name) { - var panes = this._plotArea.panes; - - for (var idx = 0; idx < panes.length; idx++) { - if (panes[idx].options.name === name) { - return new __WEBPACK_IMPORTED_MODULE_18__api_elements__["b" /* ChartPane */](panes[idx]); - } - } - }; - - Chart.prototype.findPaneByIndex = function findPaneByIndex (idx) { - var panes = this._plotArea.panes; - if (panes[idx]) { - return new __WEBPACK_IMPORTED_MODULE_18__api_elements__["b" /* ChartPane */](panes[idx]); - } - }; - - Chart.prototype.plotArea = function plotArea () { - return new __WEBPACK_IMPORTED_MODULE_18__api_elements__["c" /* ChartPlotArea */](this._plotArea); - }; - - Chart.prototype.toggleHighlight = function toggleHighlight (show, filter) { - var plotArea = this._plotArea; - var firstSeries = (plotArea.srcSeries || plotArea.series || [])[0]; - var points; - - if (Object(__WEBPACK_IMPORTED_MODULE_20__common__["A" /* isFunction */])(filter)) { - points = plotArea.filterPoints(filter); - } else { - var seriesName, categoryName; - if (Object(__WEBPACK_IMPORTED_MODULE_20__common__["C" /* isObject */])(filter)) { - seriesName = filter.series; - categoryName = filter.category; - } else { - seriesName = categoryName = filter; - } - - if (firstSeries.type === __WEBPACK_IMPORTED_MODULE_22__constants__["l" /* DONUT */]) { - points = pointByCategoryName(plotArea.pointsBySeriesName(seriesName), categoryName); - } else if (firstSeries.type === __WEBPACK_IMPORTED_MODULE_22__constants__["K" /* PIE */] || firstSeries.type === __WEBPACK_IMPORTED_MODULE_22__constants__["t" /* FUNNEL */]) { - points = pointByCategoryName((plotArea.charts[0] || {}).points, categoryName); - } else { - points = plotArea.pointsBySeriesName(seriesName); - } - } - - if (points) { - this.togglePointsHighlight(show, points); - } - }; - - Chart.prototype.togglePointsHighlight = function togglePointsHighlight (show, points) { - var highlight = this._highlight; - for (var idx = 0; idx < points.length; idx++) { - highlight.togglePointHighlight(points[idx], show); - } - }; - - Chart.prototype.showTooltip = function showTooltip (filter) { - var shared = this._sharedTooltip(); - var ref = this; - var tooltip = ref._tooltip; - var plotArea = ref._plotArea; - var point, categoryIndex; - - if (Object(__WEBPACK_IMPORTED_MODULE_20__common__["A" /* isFunction */])(filter)) { - point = plotArea.findPoint(filter); - if (point && shared) { - categoryIndex = point.categoryIx; - } - } else if (shared && Object(__WEBPACK_IMPORTED_MODULE_20__common__["l" /* defined */])(filter)) { - categoryIndex = plotArea.categoryAxis.categoryIndex(filter); - } - - if (shared) { - if (categoryIndex >= 0) { - var points = this._plotArea.pointsByCategoryIndex(categoryIndex); - tooltip.showAt(points); - } - } else if (point) { - tooltip.show(point); - } - }; - - Chart.prototype.hideTooltip = function hideTooltip () { - this._tooltip.hide(); - }; - - Chart.prototype._initSurface = function _initSurface () { - var surface = this.surface; - var wrap = this._surfaceWrap(); - - var chartArea = this.options.chartArea; - if (chartArea.width) { - Object(__WEBPACK_IMPORTED_MODULE_20__common__["o" /* elementSize */])(wrap, { width: chartArea.width }); - } - if (chartArea.height) { - Object(__WEBPACK_IMPORTED_MODULE_20__common__["o" /* elementSize */])(wrap, { height: chartArea.height }); - } - - if (!surface || surface.options.type !== this.options.renderAs) { - if (surface) { - surface.destroy(); - } - - this.surface = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Surface.create(wrap, { - type: this.options.renderAs - }); - - } else { - this.surface.clear(); - this.surface.resize(); - } - }; - - Chart.prototype._surfaceWrap = function _surfaceWrap () { - return this.element; - }; - - Chart.prototype._redraw = function _redraw () { - var model = this._getModel(); - this._size = { - width: model.options.width, - height: model.options.height - }; - - this._destroyView(); - - this._model = model; - this._plotArea = model._plotArea; - - model.renderVisual(); - - if (this.options.transitions !== false) { - model.traverse(function(element) { - if (element.animation) { - element.animation.setup(); - } - }); - } - - this._initSurface(); - this.surface.draw(model.visual); - - if (this.options.transitions !== false) { - model.traverse(function(element) { - if (element.animation) { - element.animation.play(); - } - }); - } - - this._tooltip = this._createTooltip(); - this._highlight = new __WEBPACK_IMPORTED_MODULE_2__highlight__["a" /* default */](); - this._setupSelection(); - this._createPannable(); - this._createZoomSelection(); - this._createMousewheelZoom(); - - this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["W" /* RENDER */]); - - if (!this._navState) { - this._cancelDomEvents(); - } - }; - - Chart.prototype.exportVisual = function exportVisual (exportOptions) { - var visual; - if (exportOptions && (exportOptions.width || exportOptions.height || exportOptions.options)) { - var currentOptions = this.options; - var options = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, exportOptions.options, { - chartArea: { - width: exportOptions.width, - height: exportOptions.height - } - }); - - clearMissingValues(this._originalOptions, options); - this.options = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, this._originalOptions, options); - this._initTheme(this.options, this._theme); - this.bindCategories(); - - var model = this._getModel(); - - model.renderVisual(); - visual = model.visual; - - this.options = currentOptions; - } else { - visual = this.surface.exportVisual(); - } - - return visual; - }; - - Chart.prototype._sharedTooltip = function _sharedTooltip () { - return this._plotArea instanceof __WEBPACK_IMPORTED_MODULE_12__plotarea_categorical_plotarea__["a" /* default */] && this.options.tooltip.shared; - }; - - Chart.prototype._createPannable = function _createPannable () { - var options = this.options; - if (options.pannable !== false) { - this._pannable = new __WEBPACK_IMPORTED_MODULE_3__pan_and_zoom_pannable__["a" /* default */](this._plotArea, options.pannable); - } - }; - - Chart.prototype._createZoomSelection = function _createZoomSelection () { - var zoomable = this.options.zoomable; - var selection = (zoomable || {}).selection; - if (zoomable !== false && selection !== false) { - this._zoomSelection = new __WEBPACK_IMPORTED_MODULE_4__pan_and_zoom_zoom_selection__["a" /* default */](this, selection); - } - }; - - Chart.prototype._toggleDomDrag = function _toggleDomDrag () { - if (!this.domEvents || !this.domEvents.toggleDrag) { - return; - } - - var pannable = this.options.pannable; - var zoomable = this.options.zoomable; - var selection = (zoomable || {}).selection; - if (!pannable && (zoomable === false || selection === false) && !this.requiresHandlers([ __WEBPACK_IMPORTED_MODULE_22__constants__["o" /* DRAG_START */], __WEBPACK_IMPORTED_MODULE_22__constants__["m" /* DRAG */], __WEBPACK_IMPORTED_MODULE_22__constants__["n" /* DRAG_END */] ])) { - this.domEvents.toggleDrag(false); - } else { - this.domEvents.toggleDrag(true); - } - }; - - Chart.prototype._createMousewheelZoom = function _createMousewheelZoom () { - var zoomable = this.options.zoomable; - var mousewheel = (zoomable || {}).mousewheel; - if (zoomable !== false && mousewheel !== false) { - this._mousewheelZoom = new __WEBPACK_IMPORTED_MODULE_5__pan_and_zoom_mousewheel_zoom__["a" /* default */](this, mousewheel); - } - }; - - Chart.prototype._toggleDomZoom = function _toggleDomZoom () { - if (!this.domEvents || !this.domEvents.toggleZoom) { - return; - } - - var zoomable = this.options.zoomable; - var mousewheel = (zoomable || {}).mousewheel; - if ((zoomable === false || mousewheel === false) && !this.requiresHandlers([ __WEBPACK_IMPORTED_MODULE_22__constants__["_22" /* ZOOM_START */], __WEBPACK_IMPORTED_MODULE_22__constants__["_20" /* ZOOM */], __WEBPACK_IMPORTED_MODULE_22__constants__["_21" /* ZOOM_END */] ])) { - this.domEvents.toggleZoom(false); - } else { - this.domEvents.toggleZoom(true); - } - }; - - Chart.prototype._createTooltip = function _createTooltip () { - var ref = this; - var tooltipOptions = ref.options.tooltip; - var tooltip; - - if (this._sharedTooltip()) { - tooltip = this._createSharedTooltip(tooltipOptions); - } else { - tooltip = new __WEBPACK_IMPORTED_MODULE_10__tooltip_tooltip__["a" /* default */](this.chartService, tooltipOptions); - } - - return tooltip; - }; - - Chart.prototype._createSharedTooltip = function _createSharedTooltip (options) { - return new __WEBPACK_IMPORTED_MODULE_11__tooltip_shared_tooltip__["a" /* default */](this._plotArea, options); - }; - - Chart.prototype.applyDefaults = function applyDefaults (options, themeOptions) { - applyAxisDefaults(options, themeOptions); - applySeriesDefaults(options, themeOptions); - }; - - Chart.prototype.applySeriesColors = function applySeriesColors () { - var options = this.options; - var series = options.series; - var colors = options.seriesColors || []; - - for (var i = 0; i < series.length; i++) { - var currentSeries = series[i]; - var seriesColor = colors[i % colors.length]; - var defaults = currentSeries._defaults; - - currentSeries.color = currentSeries.color || seriesColor; - if (defaults) { - defaults.color = defaults.color || seriesColor; - } - } - }; - - Chart.prototype._getModel = function _getModel () { - var options = this.options; - var plotArea = this._createPlotArea(); - var model = new __WEBPACK_IMPORTED_MODULE_1__core__["r" /* RootElement */](this._modelOptions()); - model.chart = this; - model._plotArea = plotArea; - - __WEBPACK_IMPORTED_MODULE_1__core__["v" /* Title */].buildTitle(options.title, model); - - if (options.legend.visible) { - model.append(new __WEBPACK_IMPORTED_MODULE_6__legend_legend__["a" /* default */](plotArea.options.legend, this.chartService)); - } - model.append(plotArea); - model.reflow(); - - return model; - }; - - Chart.prototype._modelOptions = function _modelOptions () { - var options = this.options; - var size = this.getSize(); - - return Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({ - transitions: options.transitions, - width: size.width || __WEBPACK_IMPORTED_MODULE_19__common_constants__["m" /* DEFAULT_WIDTH */], - height: size.height || __WEBPACK_IMPORTED_MODULE_19__common_constants__["k" /* DEFAULT_HEIGHT */] - }, options.chartArea); - }; - - Chart.prototype._createPlotArea = function _createPlotArea (skipSeries) { - var options = this.options; - - var plotArea = __WEBPACK_IMPORTED_MODULE_7__plotarea_plotarea_factory__["a" /* default */].current.create(skipSeries ? [] : options.series, options, this.chartService); - - return plotArea; - }; - - Chart.prototype._setupSelection = function _setupSelection () { - var this$1 = this; - - var ref = this; - var axes = ref._plotArea.axes; - var selections = this._selections = []; - - for (var i = 0; i < axes.length; i++) { - var axis = axes[i]; - var options = axis.options; - if (axis instanceof __WEBPACK_IMPORTED_MODULE_1__core__["c" /* CategoryAxis */] && options.select && !options.vertical) { - var range = axis.range(); - - var selection = new __WEBPACK_IMPORTED_MODULE_8__selection__["a" /* default */](this$1, axis, - Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({ min: range.min, max: range.max }, options.select) - ); - - selections.push(selection); - } - } - }; - - Chart.prototype._selectStart = function _selectStart (e) { - return this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["_1" /* SELECT_START */], e); - }; - - Chart.prototype._select = function _select (e) { - return this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["Z" /* SELECT */], e); - }; - - Chart.prototype._selectEnd = function _selectEnd (e) { - return this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["_0" /* SELECT_END */], e); - }; - - Chart.prototype._initHandlers = function _initHandlers () { - this._clickHandler = this._click.bind(this); - this._mousewheelHandler = this._mousewheel.bind(this); - this._surfaceMouseenterHandler = this._mouseover.bind(this); - this._surfaceMouseleaveHandler = this._mouseout.bind(this); - - this._mousemove = Object(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["k" /* throttle */])( - this._mousemove.bind(this), - MOUSEMOVE_DELAY - ); - }; - - Chart.prototype.addObserver = function addObserver (observer) { - if (observer) { - this.observers.push(observer); - } - }; - - Chart.prototype.removeObserver = function removeObserver (observer) { - var index = this.observers.indexOf(observer); - if (index >= 0) { - this.observers.splice(index, 1); - } - }; - - Chart.prototype.requiresHandlers = function requiresHandlers (eventNames) { - var observers = this.observers; - for (var idx = 0; idx < observers.length; idx++) { - if (observers[idx].requiresHandlers(eventNames)) { - return true; - } - } - }; - - Chart.prototype.trigger = function trigger (name, args) { - if ( args === void 0 ) args = {}; - - if (name === __WEBPACK_IMPORTED_MODULE_22__constants__["_4" /* SHOW_TOOLTIP */]) { - args.anchor.point = this._toDocumentCoordinates(args.anchor.point); - } - args.sender = this; - - var observers = this.observers; - var isDefaultPrevented = false; - for (var idx = 0; idx < observers.length; idx++) { - if (observers[idx].trigger(name, args)) { - isDefaultPrevented = true; - } - } - - return isDefaultPrevented; - }; - - Chart.prototype._attachEvents = function _attachEvents () { - var obj, obj$1; - - var ref = this; - var element = ref.element; - var surface = ref.surface; - - surface.bind("mouseenter", this._surfaceMouseenterHandler); - surface.bind("mouseleave", this._surfaceMouseleaveHandler); - Object(__WEBPACK_IMPORTED_MODULE_20__common__["h" /* bindEvents */])(element, ( obj = {}, obj[ CONTEXTMENU ] = this._clickHandler, obj[ __WEBPACK_IMPORTED_MODULE_22__constants__["G" /* MOUSEWHEEL */] ] = this._mousewheelHandler, obj )); - - if (this._shouldAttachMouseMove()) { - Object(__WEBPACK_IMPORTED_MODULE_20__common__["h" /* bindEvents */])(element, ( obj$1 = {}, obj$1[ MOUSEMOVE ] = this._mousemove, obj$1 )); - } - - this.domEvents = __WEBPACK_IMPORTED_MODULE_14__services__["b" /* DomEventsBuilder */].create(this.element, { - start: this._start.bind(this), - move: this._move.bind(this), - end: this._end.bind(this), - tap: this._tap.bind(this), - gesturestart: this._gesturestart.bind(this), - gesturechange: this._gesturechange.bind(this), - gestureend: this._gestureend.bind(this) - }); - - this._toggleDomDrag(); - this._toggleDomZoom(); - }; - - Chart.prototype._cancelDomEvents = function _cancelDomEvents () { - if (this.domEvents && this.domEvents.cancel) { - this.domEvents.cancel(); - } - }; - - Chart.prototype._gesturestart = function _gesturestart (e) { - if (this._mousewheelZoom && !this._stopChartHandlers(e)) { - this._gestureDistance = e.distance; - this._unsetActivePoint(); - this.surface.suspendTracking(); - } - }; - - Chart.prototype._gestureend = function _gestureend (e) { - if (this._zooming && !this._stopChartHandlers(e)) { - if (this.surface) { - this.surface.resumeTracking(); - } - this._zooming = false; - this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["_21" /* ZOOM_END */], {}); - } - }; - - Chart.prototype._gesturechange = function _gesturechange (e) { - var mousewheelZoom = this._mousewheelZoom; - - if (mousewheelZoom && !this._stopChartHandlers(e)) { - e.preventDefault(); - var previousGestureDistance = this._gestureDistance; - var scaleDelta = -e.distance / previousGestureDistance + 1; - - if (Math.abs(scaleDelta) >= 0.1) { - scaleDelta = Math.round(scaleDelta * 10); - - this._gestureDistance = e.distance; - var args = { delta: scaleDelta, axisRanges: axisRanges(this._plotArea.axes), originalEvent: e }; - if (this._zooming || !this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["_22" /* ZOOM_START */], args)) { - - if (!this._zooming) { - this._zooming = true; - } - - var ranges = args.axisRanges = mousewheelZoom.updateRanges(scaleDelta); - if (ranges && !this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["_20" /* ZOOM */], args)) { - mousewheelZoom.zoom(); - } - } - } - } - }; - - Chart.prototype._mouseout = function _mouseout (e) { - if (e.element) { - var element = this._drawingChartElement(e.element, e); - - if (element && element.leave) { - element.leave(this, e.originalEvent); - } - } - }; - - Chart.prototype._start = function _start (e) { - var coords = this._eventCoordinates(e); - - if (this._stopChartHandlers(e) || !this._plotArea.backgroundContainsPoint(coords)) { - return; - } - - - if (this.requiresHandlers([ __WEBPACK_IMPORTED_MODULE_22__constants__["o" /* DRAG_START */], __WEBPACK_IMPORTED_MODULE_22__constants__["m" /* DRAG */], __WEBPACK_IMPORTED_MODULE_22__constants__["n" /* DRAG_END */] ])) { - this._startNavigation(e, coords, __WEBPACK_IMPORTED_MODULE_22__constants__["o" /* DRAG_START */]); - } - - if (this._pannable && this._pannable.start(e)) { - this.surface.suspendTracking(); - this._unsetActivePoint(); - this._suppressHover = true; - this.chartService.panning = true; - } - - if (this._zoomSelection) { - if (this._zoomSelection.start(e)) { - this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["_22" /* ZOOM_START */], { axisRanges: axisRanges(this._plotArea.axes), originalEvent: e }); - } - } - }; - - Chart.prototype._move = function _move (e) { - var ref = this; - var state = ref._navState; - var pannable = ref._pannable; - - if (this._stopChartHandlers(e)) { - return; - } - - if (pannable) { - var ranges = pannable.move(e); - - if (ranges && !this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["m" /* DRAG */], { axisRanges: ranges, originalEvent: e })) { - pannable.pan(); - } - } else if (state) { - var ranges$1 = {}; - var axes = state.axes; - - for (var i = 0; i < axes.length; i++) { - var currentAxis = axes[i]; - var axisName = currentAxis.options.name; - if (axisName) { - var axis = currentAxis.options.vertical ? e.y : e.x; - var delta = axis.startLocation - axis.location; - - if (delta !== 0) { - ranges$1[currentAxis.options.name] = currentAxis.translateRange(delta); - } - } - } - - state.axisRanges = ranges$1; - this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["m" /* DRAG */], { - axisRanges: ranges$1, - originalEvent: e - }); - } - - if (this._zoomSelection) { - this._zoomSelection.move(e); - } - }; - - Chart.prototype._end = function _end (e) { - if (this._stopChartHandlers(e)) { - return; - } - - var pannable = this._pannable; - if (pannable && pannable.end(e)) { - this.surface.resumeTracking(); - this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["n" /* DRAG_END */], { - axisRanges: axisRanges(this._plotArea.axes), - originalEvent: e - }); - this._suppressHover = false; - this.chartService.panning = false; - } else { - this._endNavigation(e, __WEBPACK_IMPORTED_MODULE_22__constants__["n" /* DRAG_END */]); - } - - if (this._zoomSelection) { - var ranges = this._zoomSelection.end(e); - if (ranges && !this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["_20" /* ZOOM */], { axisRanges: ranges, originalEvent: e })) { - this._zoomSelection.zoom(); - this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["_21" /* ZOOM_END */], { axisRanges: ranges, originalEvent: e }); - } - } - }; - - Chart.prototype._stopChartHandlers = function _stopChartHandlers (e) { - var selections = this._selections || []; - if (!selections.length) { - return false; - } - - var coords = this._eventCoordinates(e); - var pane = this._plotArea.paneByPoint(coords); - if (pane) { - for (var idx = 0; idx < selections.length; idx++) { - if (selections[idx].onPane(pane)) { - return true; - } - } - } - }; - - Chart.prototype._mousewheel = function _mousewheel (e) { - var this$1 = this; - - var delta = Object(__WEBPACK_IMPORTED_MODULE_20__common__["H" /* mousewheelDelta */])(e); - var mousewheelZoom = this._mousewheelZoom; - var coords = this._eventCoordinates(e); - - if (this._stopChartHandlers(e) || !this._plotArea.backgroundContainsPoint(coords)) { - return; - } - - if (mousewheelZoom) { - var args = { delta: delta, axisRanges: axisRanges(this._plotArea.axes), originalEvent: e }; - if (this._zooming || !this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["_22" /* ZOOM_START */], args)) { - e.preventDefault(); - - if (!this._zooming) { - this._unsetActivePoint(); - this.surface.suspendTracking(); - this._zooming = true; - } - - if (this._mwTimeout) { - clearTimeout(this._mwTimeout); - } - - args.axisRanges = mousewheelZoom.updateRanges(delta); - if (args.axisRanges && !this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["_20" /* ZOOM */], args)) { - mousewheelZoom.zoom(); - } - - this._mwTimeout = setTimeout(function () { - this$1.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["_21" /* ZOOM_END */], args); - this$1._zooming = false; - if (this$1.surface) { - this$1.surface.resumeTracking(); - } - }, __WEBPACK_IMPORTED_MODULE_22__constants__["H" /* MOUSEWHEEL_DELAY */]); - } - } else { - var state = this._navState; - if (!state) { - var prevented = this._startNavigation(e, coords, __WEBPACK_IMPORTED_MODULE_22__constants__["_22" /* ZOOM_START */]); - if (!prevented) { - state = this._navState; - } - } - - if (state) { - var totalDelta = state.totalDelta || delta; - state.totalDelta = totalDelta + delta; - - var axes = this._navState.axes; - var ranges = {}; - - for (var i = 0; i < axes.length; i++) { - var currentAxis = axes[i]; - var axisName = currentAxis.options.name; - if (axisName) { - ranges[axisName] = currentAxis.scaleRange(-totalDelta); - } - } - - this.trigger(__WEBPACK_IMPORTED_MODULE_22__constants__["_20" /* ZOOM */], { - delta: delta, - axisRanges: ranges, - originalEvent: e - }); - - if (this._mwTimeout) { - clearTimeout(this._mwTimeout); - } - - this._mwTimeout = setTimeout(function () { - this$1._endNavigation(e, __WEBPACK_IMPORTED_MODULE_22__constants__["_21" /* ZOOM_END */]); - }, __WEBPACK_IMPORTED_MODULE_22__constants__["H" /* MOUSEWHEEL_DELAY */]); - } - } - }; - - Chart.prototype._startNavigation = function _startNavigation (e, coords, chartEvent) { - var plotArea = this._model._plotArea; - var pane = plotArea.findPointPane(coords); - var axes = plotArea.axes.slice(0); - - if (!pane) { - return; - } - - var ranges = axisRanges(axes); - - var prevented = this.trigger(chartEvent, { - axisRanges: ranges, - originalEvent: e - }); - - if (prevented) { - this._cancelDomEvents(); - } else { - this._suppressHover = true; - this._unsetActivePoint(); - this._navState = { - axisRanges: ranges, - pane: pane, - axes: axes - }; - } - }; - - Chart.prototype._endNavigation = function _endNavigation (e, chartEvent) { - if (this._navState) { - this.trigger(chartEvent, { - axisRanges: this._navState.axisRanges, - originalEvent: e - }); - this._suppressHover = false; - this._navState = null; - } - }; - - Chart.prototype._getChartElement = function _getChartElement (e, match) { - var element = this.surface.eventTarget(e); - if (element) { - return this._drawingChartElement(element, e, match); - } - }; - - Chart.prototype._drawingChartElement = function _drawingChartElement (element, e, match) { - var current = element; - var chartElement; - while (current && !chartElement) { - chartElement = current.chartElement; - current = current.parent; - } - - if (chartElement) { - if (chartElement.aliasFor) { - chartElement = chartElement.aliasFor(e, this._eventCoordinates(e)); - } - - if (match) { - chartElement = chartElement.closest(match); - if (chartElement && chartElement.aliasFor) { - chartElement = chartElement.aliasFor(); - } - } - - return chartElement; - } - }; - - Chart.prototype._eventCoordinates = function _eventCoordinates (e) { - var coordinates = Object(__WEBPACK_IMPORTED_MODULE_20__common__["q" /* eventCoordinates */])(e); - return this._toModelCoordinates(coordinates.x, coordinates.y); - }; - - Chart.prototype._elementPadding = function _elementPadding () { - if (!this._padding) { - var ref = Object(__WEBPACK_IMPORTED_MODULE_20__common__["p" /* elementStyles */])(this.element, [ "paddingLeft", "paddingTop" ]); - var paddingLeft = ref.paddingLeft; - var paddingTop = ref.paddingTop; - this._padding = { - top: paddingTop, - left: paddingLeft - }; - } - - return this._padding; - }; - - Chart.prototype._toDocumentCoordinates = function _toDocumentCoordinates (point) { - var padding = this._elementPadding(); - var offset = Object(__WEBPACK_IMPORTED_MODULE_20__common__["n" /* elementOffset */])(this.element); - - return { - left: Object(__WEBPACK_IMPORTED_MODULE_20__common__["L" /* round */])(point.x + padding.left + offset.left), - top: Object(__WEBPACK_IMPORTED_MODULE_20__common__["L" /* round */])(point.y + padding.top + offset.top) - }; - }; - - Chart.prototype._toModelCoordinates = function _toModelCoordinates (clientX, clientY) { - var element = this.element; - var offset = Object(__WEBPACK_IMPORTED_MODULE_20__common__["n" /* elementOffset */])(element); - var padding = this._elementPadding(); - - return new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */]( - clientX - offset.left - padding.left, - clientY - offset.top - padding.top - ); - }; - - Chart.prototype._tap = function _tap (e) { - var this$1 = this; - - var drawingElement = this.surface.eventTarget(e); - var element = this._drawingChartElement(drawingElement, e); - var sharedTooltip = this._sharedTooltip(); - - if (!this._startHover(drawingElement, e) && !sharedTooltip) { - this._unsetActivePoint(); - } - - if (sharedTooltip) { - this._trackSharedTooltip(this._eventCoordinates(e), e, true); - } - - this._propagateClick(element, e); - - //part of fix for hover issue on windows touch - this.handlingTap = true; - setTimeout(function () { - this$1.handlingTap = false; - }, 0); - }; - - Chart.prototype._click = function _click (e) { - var element = this._getChartElement(e); - this._propagateClick(element, e); - }; - - Chart.prototype._propagateClick = function _propagateClick (element, e) { - var this$1 = this; - - var current = element; - while (current) { - if (current.click) { - current.click(this$1, e); - } - - current = current.parent; - } - }; - - Chart.prototype._startHover = function _startHover (element, e) { - if (this._suppressHover) { - return false; - } - - var point = this._drawingChartElement(element, e, function(element) { - return element.hover && !(element instanceof __WEBPACK_IMPORTED_MODULE_13__plotarea_plotarea_base__["a" /* default */]); - }); - - var sharedTooltip = this._sharedTooltip(); - var activePoint = this._activePoint; - - if (point && activePoint !== point && !point.hover(this, e) && !sharedTooltip) { - this._activePoint = point; - - var tooltipOptions = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, tooltipOptions, point.options.tooltip); - if (tooltipOptions.visible) { - this._tooltip.show(point); - } - - this._highlight.show(point); - } - - if (sharedTooltip) { - this._activePoint = point; - } - - return point; - }; - - Chart.prototype._mouseover = function _mouseover (e) { - var obj; - - var point = this._startHover(e.element, e.originalEvent); - - if (point && point.tooltipTracking && !this._mouseMoveTrackHandler && !this._sharedTooltip()) { - this._mouseMoveTrackHandler = this._mouseMoveTracking.bind(this); - Object(__WEBPACK_IMPORTED_MODULE_20__common__["h" /* bindEvents */])(document, ( obj = {}, obj[ MOUSEMOVE ] = this._mouseMoveTrackHandler, obj )); - } - }; - - Chart.prototype._mouseMoveTracking = function _mouseMoveTracking (e) { - var obj; - - var ref = this; - var options = ref.options; - var tooltip = ref._tooltip; - var highlight = ref._highlight; - var point = ref._activePoint; - var coords = this._eventCoordinates(e); - - if (this._plotArea.box.containsPoint(coords)) { - if (point && point.tooltipTracking && point.series && point.parent.getNearestPoint) { - var seriesPoint = point.parent.getNearestPoint(coords.x, coords.y, point.seriesIx); - if (seriesPoint && seriesPoint !== point) { - seriesPoint.hover(this, e); - this._activePoint = seriesPoint; - - var tooltipOptions = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, options.tooltip, seriesPoint.options.tooltip); - if (tooltipOptions.visible) { - tooltip.show(seriesPoint); - } - - highlight.show(seriesPoint); - } - } - } else { - Object(__WEBPACK_IMPORTED_MODULE_20__common__["P" /* unbindEvents */])(document, ( obj = {}, obj[ MOUSEMOVE ] = this._mouseMoveTrackHandler, obj )); - this._unsetActivePoint(); - this._mouseMoveTrackHandler = null; - } - }; - - Chart.prototype._mousemove = function _mousemove (e) { - var coords = this._eventCoordinates(e); - - this._trackCrosshairs(coords); - - if (this._plotArea.hover) { - this._plotArea.hover(this, e); - } - - if (this._sharedTooltip()) { - this._trackSharedTooltip(coords, e); - } - }; - - Chart.prototype._trackCrosshairs = function _trackCrosshairs (coords) { - var crosshairs = this._plotArea.crosshairs; - - for (var i = 0; i < crosshairs.length; i++) { - var current = crosshairs[i]; - - if (current.box.containsPoint(coords)) { - current.showAt(coords); - } else { - current.hide(); - } - } - }; - - Chart.prototype._trackSharedTooltip = function _trackSharedTooltip (coords, e, toggle) { - if (this._suppressHover) { - return; - } - - var ref = this; - var tooltipOptions = ref.options.tooltip; - var plotArea = ref._plotArea; - var categoryAxis = ref._plotArea.categoryAxis; - var tooltip = ref._tooltip; - var highlight = ref._highlight; - - if (plotArea.backgroundContainsPoint(coords)) { - var index = categoryAxis.pointCategoryIndex(coords); - if (index !== this._tooltipCategoryIx || (!tooltip.visible && toggle)) { - var points = plotArea.pointsByCategoryIndex(index); - - if (points.length > 0) { - if (tooltipOptions.visible) { - tooltip.showAt(points, coords); - } - - highlight.show(points); - } else { - tooltip.hide(); - } - - this._tooltipCategoryIx = index; - } else if (toggle && tooltip.visible) { - highlight.hide(); - tooltip.hide(); - } - } else if (tooltip.visible) { - highlight.hide(); - tooltip.hide(); - this._tooltipCategoryIx = null; - } - }; - - Chart.prototype.hideElements = function hideElements () { - var plotArea = this._plotArea; - this._mousemove.cancel(); - - plotArea.hideCrosshairs(); - - this._unsetActivePoint(); - }; - - Chart.prototype._unsetActivePoint = function _unsetActivePoint () { - var ref = this; - var tooltip = ref._tooltip; - var highlight = ref._highlight; - - this._activePoint = null; - - if (tooltip) { - tooltip.hide(); - this._tooltipCategoryIx = null; - } - - if (highlight) { - highlight.hide(); - } - }; - - Chart.prototype._deferRedraw = function _deferRedraw () { - this._redraw(); - }; - - Chart.prototype._clearRedrawTimeout = function _clearRedrawTimeout () { - if (this._redrawTimeout) { - clearInterval(this._redrawTimeout); - this._redrawTimeout = null; - } - }; - - Chart.prototype.bindCategories = function bindCategories () { - var this$1 = this; - - var options = this.options; - var definitions = [].concat(options.categoryAxis); - - for (var axisIx = 0; axisIx < definitions.length; axisIx++) { - var axis = definitions[axisIx]; - if (axis.autoBind !== false) { - this$1.bindCategoryAxisFromSeries(axis, axisIx); - } - } - }; - - Chart.prototype.bindCategoryAxisFromSeries = function bindCategoryAxisFromSeries (axis, axisIx) { - var this$1 = this; - - var series = this.options.series; - var seriesLength = series.length; - var uniqueCategories = new __WEBPACK_IMPORTED_MODULE_20__common__["c" /* HashMap */]();//perf improvement in case type category with dates - var items = []; - var bindable = false; - var dateAxis; - - for (var seriesIx = 0; seriesIx < seriesLength; seriesIx++) { - var s = series[seriesIx]; - var onAxis = s.categoryAxis === axis.name || (!s.categoryAxis && axisIx === 0); - var data = s.data; - var dataLength = data.length; - var bind = s.categoryField && onAxis; - bindable = bind || bindable; - - if (bind && dataLength > 0) { - dateAxis = Object(__WEBPACK_IMPORTED_MODULE_16__utils_is_date_axis__["a" /* default */])(axis, Object(__WEBPACK_IMPORTED_MODULE_15__utils_get_field__["a" /* default */])(s.categoryField, data[0])); - - var getFn = dateAxis ? __WEBPACK_IMPORTED_MODULE_17__utils_get_date_field__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_15__utils_get_field__["a" /* default */]; - - for (var dataIx = 0; dataIx < dataLength; dataIx++) { - var dataRow = data[dataIx]; - var category = getFn(s.categoryField, dataRow, this$1.chartService.intl); - - if (dateAxis || !uniqueCategories.get(category)) { - items.push([ category, dataRow ]); - - if (!dateAxis) { - uniqueCategories.set(category, true); - } - } - } - } - } - - if (items.length > 0) { - if (dateAxis) { - items = uniqueDates(items, function(a, b) { - return Object(__WEBPACK_IMPORTED_MODULE_21__date_utils__["e" /* dateComparer */])(a[0], b[0]); - }); - } - - var result = transpose(items); - axis.categories = result[0]; - } else if (bindable) { - axis.categories = []; - } - }; - - Chart.prototype._isBindable = function _isBindable (series) { - var valueFields = __WEBPACK_IMPORTED_MODULE_9__series_binder__["a" /* default */].current.valueFields(series); - var result = true; - - for (var i = 0; i < valueFields.length; i++) { - var field = valueFields[i]; - if (field === __WEBPACK_IMPORTED_MODULE_19__common_constants__["D" /* VALUE */]) { - field = "field"; - } else { - field = field + "Field"; - } - - if (!Object(__WEBPACK_IMPORTED_MODULE_20__common__["l" /* defined */])(series[field])) { - result = false; - break; - } - } - - return result; - }; - - Chart.prototype._noTransitionsRedraw = function _noTransitionsRedraw () { - var options = this.options; - var transitionsState; - - if (options.transitions) { - options.transitions = false; - transitionsState = true; - } - - this._redraw(); - - if (transitionsState) { - options.transitions = true; - } - }; - - Chart.prototype._legendItemHover = function _legendItemHover (seriesIndex, pointIndex) { - var ref = this; - var plotArea = ref._plotArea; - var highlight = ref._highlight; - var currentSeries = (plotArea.srcSeries || plotArea.series)[seriesIndex]; - var items; - - if (Object(__WEBPACK_IMPORTED_MODULE_20__common__["x" /* inArray */])(currentSeries.type, [ __WEBPACK_IMPORTED_MODULE_22__constants__["K" /* PIE */], __WEBPACK_IMPORTED_MODULE_22__constants__["l" /* DONUT */], __WEBPACK_IMPORTED_MODULE_22__constants__["t" /* FUNNEL */] ])) { - items = plotArea.findPoint(function(point) { - return point.series.index === seriesIndex && point.index === pointIndex; - }); - } else { - items = plotArea.pointsBySeriesIndex(seriesIndex); - } - - highlight.show(items); - }; - - Chart.prototype._shouldAttachMouseMove = function _shouldAttachMouseMove () { - return this._plotArea.crosshairs.length || (this._tooltip && this._sharedTooltip()) || this.requiresHandlers([ __WEBPACK_IMPORTED_MODULE_22__constants__["M" /* PLOT_AREA_HOVER */] ]); - }; - - Chart.prototype.updateMouseMoveHandler = function updateMouseMoveHandler () { - var obj, obj$1; - - Object(__WEBPACK_IMPORTED_MODULE_20__common__["P" /* unbindEvents */])(this.element, ( obj = {}, obj[ MOUSEMOVE ] = this._mousemove, obj )); - - if (this._shouldAttachMouseMove()) { - Object(__WEBPACK_IMPORTED_MODULE_20__common__["h" /* bindEvents */])(this.element, ( obj$1 = {}, obj$1[ MOUSEMOVE ] = this._mousemove, obj$1 )); - } - }; - - Chart.prototype.applyOptions = function applyOptions (options, theme) { - clearMissingValues(this._originalOptions, options); - this._originalOptions = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])(this._originalOptions, options); - this.options = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, this._originalOptions); - - if (theme) { - this._theme = theme; - this.chartService.theme = theme; - } - this._initTheme(this.options, this._theme); - }; - - Chart.prototype.setOptions = function setOptions (options, theme) { - this.applyOptions(options, theme); - this.bindCategories(); - this.redraw(); - this.updateMouseMoveHandler(); - - this._toggleDomDrag(); - this._toggleDomZoom(); - }; - - Chart.prototype.destroy = function destroy () { - var obj, obj$1; - - this._destroyed = true; - - Object(__WEBPACK_IMPORTED_MODULE_20__common__["P" /* unbindEvents */])(this.element, ( obj = {}, obj[ CONTEXTMENU ] = this._clickHandler, obj[ __WEBPACK_IMPORTED_MODULE_22__constants__["G" /* MOUSEWHEEL */] ] = this._mousewheelHandler, obj[ MOUSEMOVE ] = this._mousemove, obj )); - - if (this.domEvents) { - this.domEvents.destroy(); - delete this.domEvents; - } - - if (this._mouseMoveTrackHandler) { - Object(__WEBPACK_IMPORTED_MODULE_20__common__["P" /* unbindEvents */])(document, ( obj$1 = {}, obj$1[ MOUSEMOVE ] = this._mouseMoveTrackHandler, obj$1 )); - } - - this._destroyView(); - - if (this.surface) { - this.surface.destroy(); - this.surface = null; - } - - this._clearRedrawTimeout(); - }; - - Chart.prototype._destroyView = function _destroyView () { - var ref = this; - var model = ref._model; - var selections = ref._selections; - - if (model) { - model.destroy(); - this._model = null; - } - - if (selections) { - while (selections.length > 0) { - selections.shift().destroy(); - } - } - - this._unsetActivePoint(); - - if (this._tooltip) { - this._tooltip.destroy(); - } - - if (this._highlight) { - this._highlight.destroy(); - } - - if (this._zoomSelection) { - this._zoomSelection.destroy(); - delete this._zoomSelection; - } - - if (this._pannable) { - this._pannable.destroy(); - delete this._pannable; - } - - if (this._mousewheelZoom) { - this._mousewheelZoom.destroy(); - delete this._mousewheelZoom; - } - }; - - return Chart; -}(__WEBPACK_IMPORTED_MODULE_20__common__["a" /* Class */])); - -function resolveAxisAliases(options) { - var aliases = AXIS_NAMES; - - for (var idx = 0; idx < aliases.length; idx++) { - var alias = aliases[idx] + "Axes"; - if (options[alias]) { - options[aliases[idx] + "Axis"] = options[alias]; - delete options[alias]; - } - } -} - -function pointByCategoryName(points, name) { - if (points) { - for (var idx = 0; idx < points.length; idx++) { - if (points[idx].category === name) { - return [ points[idx] ]; - } - } - } -} - -function applyAxisDefaults(options, themeOptions) { - var themeAxisDefaults = ((themeOptions || {}).axisDefaults) || {}; - var axisName, axisDefaults, axes; - - function mapAxisOptions(axisOptions) { - var axisColor = (axisOptions || {}).color || axisDefaults.color; - var result = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, - themeAxisDefaults, - themeAxisDefaults[axisName], - axisDefaults, - axisDefaults[axisName], { - line: { color: axisColor }, - labels: { color: axisColor }, - title: { color: axisColor } - }, - axisOptions - ); - - delete result[axisName]; - - return result; - } - - for (var idx = 0; idx < AXIS_NAMES.length; idx++) { - axisName = AXIS_NAMES[idx] + "Axis"; - axisDefaults = options.axisDefaults || {}; - axes = [].concat(options[axisName]); - - axes = axes.map(mapAxisOptions); - - options[axisName] = axes.length > 1 ? axes : axes[0]; - } -} - -function applySeriesDefaults(options, themeOptions) { - var series = options.series; - var seriesLength = series.length; - var seriesDefaults = options.seriesDefaults; - var commonDefaults = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, options.seriesDefaults); - var themeSeriesDefaults = themeOptions ? Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, themeOptions.seriesDefaults) : {}; - var commonThemeDefaults = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, themeSeriesDefaults); - - cleanupNestedSeriesDefaults(commonDefaults); - cleanupNestedSeriesDefaults(commonThemeDefaults); - - for (var i = 0; i < seriesLength; i++) { - var seriesType = series[i].type || options.seriesDefaults.type; - - var baseOptions = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])( - { data: [] }, - commonThemeDefaults, - themeSeriesDefaults[seriesType], - { tooltip: options.tooltip }, - commonDefaults, - seriesDefaults[seriesType] - ); - - series[i]._defaults = baseOptions; - series[i] = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, baseOptions, series[i]); - } -} - -function cleanupNestedSeriesDefaults(seriesDefaults) { - delete seriesDefaults.bar; - delete seriesDefaults.column; - delete seriesDefaults.rangeColumn; - delete seriesDefaults.line; - delete seriesDefaults.verticalLine; - delete seriesDefaults.pie; - delete seriesDefaults.donut; - delete seriesDefaults.area; - delete seriesDefaults.verticalArea; - delete seriesDefaults.scatter; - delete seriesDefaults.scatterLine; - delete seriesDefaults.bubble; - delete seriesDefaults.candlestick; - delete seriesDefaults.ohlc; - delete seriesDefaults.boxPlot; - delete seriesDefaults.bullet; - delete seriesDefaults.verticalBullet; - delete seriesDefaults.polarArea; - delete seriesDefaults.polarLine; - delete seriesDefaults.radarArea; - delete seriesDefaults.radarLine; - delete seriesDefaults.waterfall; -} - - -function axisRanges(axes) { - var ranges = {}; - - for (var i = 0; i < axes.length; i++) { - var axis = axes[i]; - var axisName = axis.options.name; - if (axisName) { - ranges[axisName] = axis.range(); - } - } - - return ranges; -} - -function sortDates(dates, comparer) { - if ( comparer === void 0 ) comparer = __WEBPACK_IMPORTED_MODULE_21__date_utils__["e" /* dateComparer */]; - - for (var i = 1, length = dates.length; i < length; i++) { - if (comparer(dates[i], dates[i - 1]) < 0) { - dates.sort(comparer); - break; - } - } - - return dates; -} - -function uniqueDates(srcDates, comparer) { - if ( comparer === void 0 ) comparer = __WEBPACK_IMPORTED_MODULE_21__date_utils__["e" /* dateComparer */]; - - var dates = sortDates(srcDates, comparer); - var length = dates.length; - var result = length > 0 ? [ dates[0] ] : []; - - for (var i = 1; i < length; i++) { - if (comparer(dates[i], Object(__WEBPACK_IMPORTED_MODULE_20__common__["E" /* last */])(result)) !== 0) { - result.push(dates[i]); - } - } - - return result; -} - -function transpose(rows) { - var rowCount = rows.length; - var result = []; - - for (var rowIx = 0; rowIx < rowCount; rowIx++) { - var row = rows[rowIx]; - var colCount = row.length; - - for (var colIx = 0; colIx < colCount; colIx++) { - result[colIx] = result[colIx] || []; - result[colIx].push(row[colIx]); - } - } - - return result; -} - -var DATA_FIELDS = [ 'data', 'categories' ]; - -function clearMissingValues(originalOptions, options) { - for (var field in options) { - if (!Object(__WEBPACK_IMPORTED_MODULE_20__common__["x" /* inArray */])(field, DATA_FIELDS) && options.hasOwnProperty(field)) { - var fieldValue = options[field]; - var originalValue = originalOptions[field]; - if (Object(__WEBPACK_IMPORTED_MODULE_20__common__["l" /* defined */])(originalValue)) { - var nullValue = fieldValue === null; - if ((nullValue || !Object(__WEBPACK_IMPORTED_MODULE_20__common__["l" /* defined */])(fieldValue))) { - delete originalOptions[field]; - if (nullValue) { - delete options[field]; - } - } else if (originalValue && Object(__WEBPACK_IMPORTED_MODULE_20__common__["C" /* isObject */])(fieldValue)) { - if (Object(__WEBPACK_IMPORTED_MODULE_20__common__["C" /* isObject */])(originalValue)) { - clearMissingValues(originalValue, fieldValue); - } - } - } - } - } -} - -Object(__WEBPACK_IMPORTED_MODULE_20__common__["M" /* setDefaultOptions */])(Chart, { - renderAs: "", - chartArea: {}, - legend: { - visible: true, - labels: {} - }, - categoryAxis: {}, - seriesDefaults: { - type: __WEBPACK_IMPORTED_MODULE_22__constants__["k" /* COLUMN */], - data: [], - highlight: { - visible: true - }, - labels: {}, - negativeValues: { - visible: false - } - }, - series: [], - seriesColors: null, - tooltip: { - visible: false - }, - transitions: true, - valueAxis: {}, - plotArea: {}, - title: {}, - xAxis: {}, - yAxis: {}, - panes: [ {} ], - pannable: false, - zoomable: false -}); - -/* harmony default export */ __webpack_exports__["a"] = (Chart); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/constants.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return INITIAL_ANIMATION_DURATION; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return FADEIN; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return LEGEND_ITEM_CLICK; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return LEGEND_ITEM_HOVER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_2", function() { return SERIES_CLICK; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_3", function() { return SERIES_HOVER; }); -/* unused harmony export GLASS */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return BORDER_BRIGHTNESS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_8", function() { return TOOLTIP_OFFSET; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_6", function() { return START_SCALE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return ERROR_LOW_FIELD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return ERROR_HIGH_FIELD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_16", function() { return X_ERROR_LOW_FIELD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_15", function() { return X_ERROR_HIGH_FIELD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_18", function() { return Y_ERROR_LOW_FIELD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_17", function() { return Y_ERROR_HIGH_FIELD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return LINE_MARKER_SIZE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return INTERPOLATE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_19", function() { return ZERO; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_5", function() { return SMOOTH; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_7", function() { return STEP; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return CATEGORY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return FUNNEL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return BAR; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return CANDLESTICK; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return PIE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return COLUMN; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return AREA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_11", function() { return VERTICAL_BULLET; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return BOX_PLOT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return OHLC; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_14", function() { return WATERFALL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return LINE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return BULLET; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_12", function() { return VERTICAL_LINE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_9", function() { return VERTICAL_AREA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return RANGE_AREA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_13", function() { return VERTICAL_RANGE_AREA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return RANGE_COLUMN; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_10", function() { return VERTICAL_BOX_PLOT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return RANGE_BAR; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return HORIZONTAL_WATERFALL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return SCATTER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return SCATTER_LINE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return BUBBLE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return RADAR_AREA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return RADAR_LINE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return RADAR_COLUMN; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return POLAR_LINE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return POLAR_AREA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return POLAR_SCATTER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return RENDER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return PLOT_AREA_CLICK; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return PLOT_AREA_HOVER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return LOGARITHMIC; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return DRAG; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return DRAG_START; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return DRAG_END; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_22", function() { return ZOOM_START; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_20", function() { return ZOOM; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_21", function() { return ZOOM_END; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_1", function() { return SELECT_START; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return SELECT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_0", function() { return SELECT_END; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return GAP; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return DONUT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return INSIDE_END; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return INSIDE_BASE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return OUTSIDE_END; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return MOUSEWHEEL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return MOUSEWHEEL_DELAY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_4", function() { return SHOW_TOOLTIP; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return HIDE_TOOLTIP; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return EQUALLY_SPACED_SERIES; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ABOVE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return BELOW; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); - - -var browser = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["j" /* support */].browser || {}; - -var INITIAL_ANIMATION_DURATION = 600; -var FADEIN = "fadeIn"; - -var GLASS = "glass"; -var BORDER_BRIGHTNESS = 0.8; -var TOOLTIP_OFFSET = 5; -var START_SCALE = browser.msie ? 0.001 : 0; -var ERROR_LOW_FIELD = "errorLow"; -var ERROR_HIGH_FIELD = "errorHigh"; -var X_ERROR_LOW_FIELD = "xErrorLow"; -var X_ERROR_HIGH_FIELD = "xErrorHigh"; -var Y_ERROR_LOW_FIELD = "yErrorLow"; -var Y_ERROR_HIGH_FIELD = "yErrorHigh"; -var LINE_MARKER_SIZE = 8; -var ZERO = "zero"; -var INTERPOLATE = "interpolate"; -var GAP = "gap"; -var ABOVE = "above"; -var BELOW = "below"; - -var SMOOTH = "smooth"; -var STEP = "step"; - -var AREA = "area"; -var BAR = "bar"; -var BOX_PLOT = "boxPlot"; -var BUBBLE = "bubble"; -var BULLET = "bullet"; -var CANDLESTICK = "candlestick"; -var COLUMN = "column"; -var DONUT = "donut"; -var FUNNEL = "funnel"; -var HORIZONTAL_WATERFALL = "horizontalWaterfall"; -var LINE = "line"; -var OHLC = "ohlc"; -var PIE = "pie"; -var POLAR_AREA = "polarArea"; -var POLAR_LINE = "polarLine"; -var POLAR_SCATTER = "polarScatter"; -var RADAR_AREA = "radarArea"; -var RADAR_COLUMN = "radarColumn"; -var RADAR_LINE = "radarLine"; -var RANGE_AREA = "rangeArea"; -var RANGE_BAR = "rangeBar"; -var RANGE_COLUMN = "rangeColumn"; -var SCATTER = "scatter"; -var SCATTER_LINE = "scatterLine"; -var VERTICAL_AREA = "verticalArea"; -var VERTICAL_BOX_PLOT = "verticalBoxPlot"; -var VERTICAL_BULLET = "verticalBullet"; -var VERTICAL_LINE = "verticalLine"; -var VERTICAL_RANGE_AREA = "verticalRangeArea"; -var WATERFALL = "waterfall"; -var EQUALLY_SPACED_SERIES = [ - BAR, COLUMN, OHLC, CANDLESTICK, BOX_PLOT, VERTICAL_BOX_PLOT, - BULLET, RANGE_COLUMN, RANGE_BAR, WATERFALL, HORIZONTAL_WATERFALL -]; - -var LEGEND_ITEM_CLICK = "legendItemClick"; -var LEGEND_ITEM_HOVER = "legendItemHover"; -var SERIES_CLICK = "seriesClick"; -var SERIES_HOVER = "seriesHover"; -var PLOT_AREA_CLICK = "plotAreaClick"; -var PLOT_AREA_HOVER = "plotAreaHover"; -var DRAG = "drag"; -var DRAG_END = "dragEnd"; -var DRAG_START = "dragStart"; -var ZOOM_START = "zoomStart"; -var ZOOM = "zoom"; -var ZOOM_END = "zoomEnd"; -var SELECT_START = "selectStart"; -var SELECT = "select"; -var SELECT_END = "selectEnd"; -var RENDER = "render"; -var SHOW_TOOLTIP = "showTooltip"; -var HIDE_TOOLTIP = "hideTooltip"; - -var LOGARITHMIC = "log"; -var CATEGORY = "category"; - -var INSIDE_END = "insideEnd"; -var INSIDE_BASE = "insideBase"; -var OUTSIDE_END = "outsideEnd"; - -var MOUSEWHEEL = "DOMMouseScroll mousewheel"; -var MOUSEWHEEL_DELAY = 150; - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/crosshair/crosshair-tooltip.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tooltip_base_tooltip__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/tooltip/base-tooltip.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var CrosshairTooltip = (function (BaseTooltip) { - function CrosshairTooltip(chartService, crosshair, options) { - BaseTooltip.call(this, chartService, options); - - this.crosshair = crosshair; - this.formatService = chartService.format; - this.initAxisName(); - } - - if ( BaseTooltip ) CrosshairTooltip.__proto__ = BaseTooltip; - CrosshairTooltip.prototype = Object.create( BaseTooltip && BaseTooltip.prototype ); - CrosshairTooltip.prototype.constructor = CrosshairTooltip; - - CrosshairTooltip.prototype.initAxisName = function initAxisName () { - var axis = this.crosshair.axis; - var plotArea = axis.plotArea; - var name; - if (plotArea.categoryAxis) { - name = axis.getCategory ? "categoryAxis" : "valueAxis"; - } else { - name = axis.options.vertical ? "yAxis" : "xAxis"; - } - this.axisName = name; - }; - - CrosshairTooltip.prototype.showAt = function showAt (point) { - var ref = this; - var axis = ref.crosshair.axis; - var options = ref.options; - var value = axis[options.stickyMode ? "getCategory" : "getValue"](point); - var formattedValue = value; - - if (options.format) { - formattedValue = this.formatService.auto(options.format, value); - } else if (axis.options.type === __WEBPACK_IMPORTED_MODULE_2__common_constants__["i" /* DATE */]) { - formattedValue = this.formatService.auto(axis.options.labels.dateFormats[axis.options.baseUnit], value); - } - - this.show({ - point: point, - anchor: this.getAnchor(), - crosshair: this.crosshair, - value: formattedValue, - axisName: this.axisName, - axisIndex: this.crosshair.axis.axisIndex - }, this.options); - }; - - CrosshairTooltip.prototype.hide = function hide () { - this.chartService.notify(__WEBPACK_IMPORTED_MODULE_1__constants__["v" /* HIDE_TOOLTIP */], { - crosshair: this.crosshair, - axisName: this.axisName, - axisIndex: this.crosshair.axis.axisIndex - }); - }; - - CrosshairTooltip.prototype.getAnchor = function getAnchor () { - var ref = this; - var crosshair = ref.crosshair; - var ref_options = ref.options; - var position = ref_options.position; - var padding = ref_options.padding; - var vertical = !crosshair.axis.options.vertical; - var lineBox = crosshair.line.bbox(); - var horizontalAlign, verticalAlign, point; - - if (vertical) { - horizontalAlign = __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */]; - if (position === __WEBPACK_IMPORTED_MODULE_2__common_constants__["d" /* BOTTOM */]) { - verticalAlign = __WEBPACK_IMPORTED_MODULE_2__common_constants__["B" /* TOP */]; - point = lineBox.bottomLeft().translate(0, padding); - } else { - verticalAlign = __WEBPACK_IMPORTED_MODULE_2__common_constants__["d" /* BOTTOM */]; - point = lineBox.topLeft().translate(0, -padding); - } - } else { - verticalAlign = __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */]; - if (position === __WEBPACK_IMPORTED_MODULE_2__common_constants__["r" /* LEFT */]) { - horizontalAlign = __WEBPACK_IMPORTED_MODULE_2__common_constants__["z" /* RIGHT */]; - point = lineBox.topLeft().translate(-padding, 0); - } else { - horizontalAlign = __WEBPACK_IMPORTED_MODULE_2__common_constants__["r" /* LEFT */]; - point = lineBox.topRight().translate(padding, 0); - } - } - - return { - point: point, - align: { - horizontal: horizontalAlign, - vertical: verticalAlign - } - }; - }; - - return CrosshairTooltip; -}(__WEBPACK_IMPORTED_MODULE_0__tooltip_base_tooltip__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_3__common__["M" /* setDefaultOptions */])(CrosshairTooltip, { - padding: 10 -}); - -/* harmony default export */ __webpack_exports__["a"] = (CrosshairTooltip); - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/crosshair/crosshair.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__crosshair_tooltip__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/crosshair/crosshair-tooltip.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - -var Crosshair = (function (ChartElement) { - function Crosshair(chartService, axis, options) { - ChartElement.call(this, options); - - this.axis = axis; - this.stickyMode = axis instanceof __WEBPACK_IMPORTED_MODULE_1__core__["c" /* CategoryAxis */]; - - var tooltipOptions = this.options.tooltip; - - if (tooltipOptions.visible) { - this.tooltip = new __WEBPACK_IMPORTED_MODULE_2__crosshair_tooltip__["a" /* default */](chartService, this, - Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])({}, tooltipOptions, { stickyMode: this.stickyMode }) - ); - } - } - - if ( ChartElement ) Crosshair.__proto__ = ChartElement; - Crosshair.prototype = Object.create( ChartElement && ChartElement.prototype ); - Crosshair.prototype.constructor = Crosshair; - - Crosshair.prototype.showAt = function showAt (point) { - this.point = point; - this.moveLine(); - this.line.visible(true); - - if (this.tooltip) { - this.tooltip.showAt(point); - } - }; - - Crosshair.prototype.hide = function hide () { - this.line.visible(false); - - if (this.tooltip) { - this.tooltip.hide(); - } - }; - - Crosshair.prototype.moveLine = function moveLine () { - var ref = this; - var axis = ref.axis; - var point = ref.point; - var vertical = axis.options.vertical; - var box = this.getBox(); - var dim = vertical ? __WEBPACK_IMPORTED_MODULE_3__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_3__common_constants__["G" /* X */]; - var lineStart = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(box.x1, box.y1); - var lineEnd; - - if (vertical) { - lineEnd = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(box.x2, box.y1); - } else { - lineEnd = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(box.x1, box.y2); - } - - if (point) { - if (this.stickyMode) { - var slot = axis.getSlot(axis.pointCategoryIndex(point)); - lineStart[dim] = lineEnd[dim] = slot.center()[dim]; - } else { - lineStart[dim] = lineEnd[dim] = point[dim]; - } - } - - this.box = box; - - this.line.moveTo(lineStart).lineTo(lineEnd); - }; - - Crosshair.prototype.getBox = function getBox () { - var axis = this.axis; - var axes = axis.pane.axes; - var length = axes.length; - var vertical = axis.options.vertical; - var box = axis.lineBox().clone(); - var dim = vertical ? __WEBPACK_IMPORTED_MODULE_3__common_constants__["G" /* X */] : __WEBPACK_IMPORTED_MODULE_3__common_constants__["H" /* Y */]; - var axisLineBox; - - for (var i = 0; i < length; i++) { - var currentAxis = axes[i]; - if (currentAxis.options.vertical !== vertical) { - if (!axisLineBox) { - axisLineBox = currentAxis.lineBox().clone(); - } else { - axisLineBox.wrap(currentAxis.lineBox()); - } - } - } - - box[dim + 1] = axisLineBox[dim + 1]; - box[dim + 2] = axisLineBox[dim + 2]; - - return box; - }; - - Crosshair.prototype.createVisual = function createVisual () { - ChartElement.prototype.createVisual.call(this); - - var options = this.options; - this.line = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path({ - stroke: { - color: options.color, - width: options.width, - opacity: options.opacity, - dashType: options.dashType - }, - visible: false - }); - - this.moveLine(); - this.visual.append(this.line); - }; - - Crosshair.prototype.destroy = function destroy () { - if (this.tooltip) { - this.tooltip.destroy(); - } - - ChartElement.prototype.destroy.call(this); - }; - - return Crosshair; -}(__WEBPACK_IMPORTED_MODULE_1__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_4__common__["M" /* setDefaultOptions */])(Crosshair, { - color: __WEBPACK_IMPORTED_MODULE_3__common_constants__["c" /* BLACK */], - width: 2, - zIndex: -1, - tooltip: { - visible: false - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (Crosshair); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/donut-chart/donut-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__pie_chart_pie_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pie-chart/pie-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__donut_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/donut-chart/donut-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - -var DONUT_SECTOR_ANIM_DELAY = 50; - -var DonutChart = (function (PieChart) { - function DonutChart () { - PieChart.apply(this, arguments); - } - - if ( PieChart ) DonutChart.__proto__ = PieChart; - DonutChart.prototype = Object.create( PieChart && PieChart.prototype ); - DonutChart.prototype.constructor = DonutChart; - - DonutChart.prototype.addValue = function addValue (value, sector, fields) { - var segmentOptions = Object(__WEBPACK_IMPORTED_MODULE_3__common__["k" /* deepExtend */])({}, fields.series, { index: fields.index }); - this.evalSegmentOptions(segmentOptions, value, fields); - - this.createLegendItem(value, segmentOptions, fields); - - if (!value || fields.visible === false) { - return; - } - - var segment = new __WEBPACK_IMPORTED_MODULE_1__donut_segment__["a" /* default */](value, sector, segmentOptions); - - Object.assign(segment, fields); - this.append(segment); - this.points.push(segment); - }; - - DonutChart.prototype.reflow = function reflow (targetBox) { - var this$1 = this; - - var options = this.options; - var box = targetBox.clone(); - var space = 5; - var minWidth = Math.min(box.width(), box.height()); - var halfMinWidth = minWidth / 2; - var defaultPadding = minWidth - minWidth * 0.85; - var series = options.series; - var seriesCount = series.length; - - var padding = Object(__WEBPACK_IMPORTED_MODULE_3__common__["Q" /* valueOrDefault */])(options.padding, defaultPadding); - padding = padding > halfMinWidth - space ? halfMinWidth - space : padding; - - var totalSize = halfMinWidth - padding; - var seriesWithoutSize = 0; - var holeSize; - - for (var i = 0; i < seriesCount; i++) { - var currentSeries = series[i]; - if (i === 0) { - if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["l" /* defined */])(currentSeries.holeSize)) { - holeSize = currentSeries.holeSize; - totalSize -= currentSeries.holeSize; - } - } - - if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["l" /* defined */])(currentSeries.size)) { - totalSize -= currentSeries.size; - } else { - seriesWithoutSize++; - } - - if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["l" /* defined */])(currentSeries.margin) && i !== seriesCount - 1) { - totalSize -= currentSeries.margin; - } - } - - if (!Object(__WEBPACK_IMPORTED_MODULE_3__common__["l" /* defined */])(holeSize)) { - var currentSize = (halfMinWidth - padding) / (seriesCount + 0.75); - holeSize = currentSize * 0.75; - totalSize -= holeSize; - } - - var innerRadius = holeSize; - var margin = 0; - var size, radius; - - this.seriesConfigs = []; - - for (var i$1 = 0; i$1 < seriesCount; i$1++) { - var currentSeries$1 = series[i$1]; - size = Object(__WEBPACK_IMPORTED_MODULE_3__common__["Q" /* valueOrDefault */])(currentSeries$1.size, totalSize / seriesWithoutSize); - innerRadius += margin; - radius = innerRadius + size; - this$1.seriesConfigs.push({ innerRadius: innerRadius, radius: radius }); - margin = currentSeries$1.margin || 0; - innerRadius = radius; - } - - PieChart.prototype.reflow.call(this, targetBox); - }; - - DonutChart.prototype.animationDelay = function animationDelay (categoryIndex, seriesIndex, seriesCount) { - return categoryIndex * DONUT_SECTOR_ANIM_DELAY + - (__WEBPACK_IMPORTED_MODULE_2__constants__["x" /* INITIAL_ANIMATION_DURATION */] * (seriesIndex + 1) / (seriesCount + 1)); - }; - - return DonutChart; -}(__WEBPACK_IMPORTED_MODULE_0__pie_chart_pie_chart__["a" /* default */])); - - -Object(__WEBPACK_IMPORTED_MODULE_3__common__["M" /* setDefaultOptions */])(DonutChart, { - startAngle: 90, - connectors: { - width: 2, - color: "#939393", - padding: 8 - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (DonutChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/donut-chart/donut-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__pie_chart_pie_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pie-chart/pie-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_point_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/point-events-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - -var DonutSegment = (function (PieSegment) { - function DonutSegment () { - PieSegment.apply(this, arguments); - } - - if ( PieSegment ) DonutSegment.__proto__ = PieSegment; - DonutSegment.prototype = Object.create( PieSegment && PieSegment.prototype ); - DonutSegment.prototype.constructor = DonutSegment; - - DonutSegment.prototype.reflowLabel = function reflowLabel () { - var ref = this; - var labelsOptions = ref.options.labels; - var label = ref.label; - var sector = this.sector.clone(); - var angle = sector.middle(); - - if (label) { - var labelHeight = label.box.height(); - if (labelsOptions.position === __WEBPACK_IMPORTED_MODULE_4__common_constants__["e" /* CENTER */]) { - sector.radius -= (sector.radius - sector.innerRadius) / 2; - - var lp = sector.point(angle); - - label.reflow(new __WEBPACK_IMPORTED_MODULE_3__core__["a" /* Box */](lp.x, lp.y - labelHeight / 2, lp.x, lp.y)); - } else { - PieSegment.prototype.reflowLabel.call(this); - } - } - }; - - DonutSegment.prototype.createSegment = function createSegment (sector, options) { - return __WEBPACK_IMPORTED_MODULE_3__core__["s" /* ShapeBuilder */].current.createRing(sector, options); - }; - - return DonutSegment; -}(__WEBPACK_IMPORTED_MODULE_0__pie_chart_pie_segment__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_5__common__["M" /* setDefaultOptions */])(DonutSegment, { - overlay: { - gradient: "roundedGlass" - }, - labels: { - position: __WEBPACK_IMPORTED_MODULE_4__common_constants__["e" /* CENTER */] - }, - animation: { - type: __WEBPACK_IMPORTED_MODULE_2__constants__["K" /* PIE */] - } -}); - -Object(__WEBPACK_IMPORTED_MODULE_5__common__["k" /* deepExtend */])(DonutSegment.prototype, __WEBPACK_IMPORTED_MODULE_1__mixins_point_events_mixin__["a" /* default */]); - - -/* harmony default export */ __webpack_exports__["a"] = (DonutSegment); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/error-bars/categorical-error-bar.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__error_bar_base__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/error-bars/error-bar-base.js"); - - -var CategoricalErrorBar = (function (ErrorBarBase) { - function CategoricalErrorBar () { - ErrorBarBase.apply(this, arguments); - } - - if ( ErrorBarBase ) CategoricalErrorBar.__proto__ = ErrorBarBase; - CategoricalErrorBar.prototype = Object.create( ErrorBarBase && ErrorBarBase.prototype ); - CategoricalErrorBar.prototype.constructor = CategoricalErrorBar; - - CategoricalErrorBar.prototype.getAxis = function getAxis () { - var axis = this.chart.seriesValueAxis(this.series); - - return axis; - }; - - return CategoricalErrorBar; -}(__WEBPACK_IMPORTED_MODULE_0__error_bar_base__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (CategoricalErrorBar); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/error-bars/error-bar-base.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - -var DEFAULT_ERROR_BAR_WIDTH = 4; - -var ErrorBarBase = (function (ChartElement) { - function ErrorBarBase(low, high, isVertical, chart, series, options) { - ChartElement.call(this, options); - - this.low = low; - this.high = high; - this.isVertical = isVertical; - this.chart = chart; - this.series = series; - } - - if ( ChartElement ) ErrorBarBase.__proto__ = ChartElement; - ErrorBarBase.prototype = Object.create( ChartElement && ChartElement.prototype ); - ErrorBarBase.prototype.constructor = ErrorBarBase; - - ErrorBarBase.prototype.reflow = function reflow (targetBox) { - var endCaps = this.options.endCaps; - var isVertical = this.isVertical; - var axis = this.getAxis(); - var valueBox = axis.getSlot(this.low, this.high); - var centerBox = targetBox.center(); - var capsWidth = this.getCapsWidth(targetBox, isVertical); - var capValue = isVertical ? centerBox.x : centerBox.y; - var capStart = capValue - capsWidth; - var capEnd = capValue + capsWidth; - var linePoints; - - if (isVertical) { - linePoints = [ - new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](centerBox.x, valueBox.y1), - new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](centerBox.x, valueBox.y2) - ]; - if (endCaps) { - linePoints.push(new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](capStart, valueBox.y1), - new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](capEnd, valueBox.y1), - new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](capStart, valueBox.y2), - new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](capEnd, valueBox.y2)); - } - this.box = new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */](capStart, valueBox.y1, capEnd, valueBox.y2); - } else { - linePoints = [ - new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](valueBox.x1, centerBox.y), - new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](valueBox.x2, centerBox.y) - ]; - if (endCaps) { - linePoints.push(new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](valueBox.x1, capStart), - new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](valueBox.x1, capEnd), - new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](valueBox.x2, capStart), - new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](valueBox.x2, capEnd)); - } - this.box = new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */](valueBox.x1, capStart, valueBox.x2, capEnd); - } - - this.linePoints = linePoints; - }; - - ErrorBarBase.prototype.getCapsWidth = function getCapsWidth (box, isVertical) { - var boxSize = isVertical ? box.width() : box.height(); - var capsWidth = Math.min(Math.floor(boxSize / 2), DEFAULT_ERROR_BAR_WIDTH) || DEFAULT_ERROR_BAR_WIDTH; - - return capsWidth; - }; - - ErrorBarBase.prototype.createVisual = function createVisual () { - var this$1 = this; - - var options = this.options; - var visual = options.visual; - - if (visual) { - this.visual = visual({ - low: this.low, - high: this.high, - rect: this.box.toRect(), - sender: this.getSender(), - options: { - endCaps: options.endCaps, - color: options.color, - line: options.line - }, - createVisual: function () { - this$1.createDefaultVisual(); - var defaultVisual = this$1.visual; - delete this$1.visual; - return defaultVisual; - } - }); - } else { - this.createDefaultVisual(); - } - }; - - ErrorBarBase.prototype.createDefaultVisual = function createDefaultVisual () { - var this$1 = this; - - var ref = this; - var options = ref.options; - var linePoints = ref.linePoints; - var lineOptions = { - stroke: { - color: options.color, - width: options.line.width, - dashType: options.line.dashType - } - }; - - ChartElement.prototype.createVisual.call(this); - - for (var idx = 0; idx < linePoints.length; idx += 2) { - var line = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path(lineOptions) - .moveTo(linePoints[idx].x, linePoints[idx].y) - .lineTo(linePoints[idx + 1].x, linePoints[idx + 1].y); - - Object(__WEBPACK_IMPORTED_MODULE_3__common__["f" /* alignPathToPixel */])(line); - this$1.visual.append(line); - } - }; - - return ErrorBarBase; -}(__WEBPACK_IMPORTED_MODULE_1__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_3__common__["M" /* setDefaultOptions */])(ErrorBarBase, { - animation: { - type: __WEBPACK_IMPORTED_MODULE_2__constants__["s" /* FADEIN */], - delay: __WEBPACK_IMPORTED_MODULE_2__constants__["x" /* INITIAL_ANIMATION_DURATION */] - }, - endCaps: true, - line: { - width: 2 - }, - zIndex: 1 -}); - -/* harmony default export */ __webpack_exports__["a"] = (ErrorBarBase); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/error-bars/error-range-calculator.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__series_binder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/series-binder.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var STD_ERR = "stderr"; -var STD_DEV = "stddev"; -var percentRegex = /percent(?:\w*)\((\d+)\)/; -var standardDeviationRegex = new RegExp("^" + STD_DEV + "(?:\\((\\d+(?:\\.\\d+)?)\\))?$"); - -var ErrorRangeCalculator = (function (Class) { - function ErrorRangeCalculator(errorValue, series, field) { - Class.call(this); - - this.initGlobalRanges(errorValue, series, field); - } - - if ( Class ) ErrorRangeCalculator.__proto__ = Class; - ErrorRangeCalculator.prototype = Object.create( Class && Class.prototype ); - ErrorRangeCalculator.prototype.constructor = ErrorRangeCalculator; - - ErrorRangeCalculator.prototype.initGlobalRanges = function initGlobalRanges (errorValue, series, field) { - var data = series.data; - var deviationMatch = standardDeviationRegex.exec(errorValue); - - if (deviationMatch) { - this.valueGetter = this.createValueGetter(series, field); - - var average = this.getAverage(data); - var deviation = this.getStandardDeviation(data, average, false); - var multiple = deviationMatch[1] ? parseFloat(deviationMatch[1]) : 1; - var errorRange = { low: average.value - deviation * multiple, high: average.value + deviation * multiple }; - - this.globalRange = function() { - return errorRange; - }; - } else if (errorValue.indexOf && errorValue.indexOf(STD_ERR) >= 0) { - this.valueGetter = this.createValueGetter(series, field); - var standardError = this.getStandardError(data, this.getAverage(data)); - - this.globalRange = function(value) { - return { low: value - standardError, high: value + standardError }; - }; - } - }; - - ErrorRangeCalculator.prototype.createValueGetter = function createValueGetter (series, field) { - var data = series.data; - var binder = __WEBPACK_IMPORTED_MODULE_0__series_binder__["a" /* default */].current; - var valueFields = binder.valueFields(series); - var item = Object(__WEBPACK_IMPORTED_MODULE_2__common__["l" /* defined */])(data[0]) ? data[0] : {}; - var valueGetter; - - if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["z" /* isArray */])(item)) { - var index = field ? valueFields.indexOf(field) : 0; - valueGetter = Object(__WEBPACK_IMPORTED_MODULE_2__common__["u" /* getter */])("[" + index + "]"); - } else if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["B" /* isNumber */])(item)) { - valueGetter = Object(__WEBPACK_IMPORTED_MODULE_2__common__["u" /* getter */])(); - } else if (typeof item === __WEBPACK_IMPORTED_MODULE_1__common_constants__["x" /* OBJECT */]) { - var srcValueFields = binder.sourceFields(series, valueFields); - valueGetter = Object(__WEBPACK_IMPORTED_MODULE_2__common__["u" /* getter */])(srcValueFields[valueFields.indexOf(field)]); - } - - return valueGetter; - }; - - ErrorRangeCalculator.prototype.getErrorRange = function getErrorRange (pointValue, errorValue) { - var low, high, value; - - if (!Object(__WEBPACK_IMPORTED_MODULE_2__common__["l" /* defined */])(errorValue)) { - return null; - } - - if (this.globalRange) { - return this.globalRange(pointValue); - } - - if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["z" /* isArray */])(errorValue)) { - low = pointValue - errorValue[0]; - high = pointValue + errorValue[1]; - } else if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["B" /* isNumber */])(value = parseFloat(errorValue))) { - low = pointValue - value; - high = pointValue + value; - } else if ((value = percentRegex.exec(errorValue))) { - var percentValue = pointValue * (parseFloat(value[1]) / 100); - low = pointValue - Math.abs(percentValue); - high = pointValue + Math.abs(percentValue); - } else { - throw new Error("Invalid ErrorBar value: " + errorValue); - } - - return { low: low, high: high }; - }; - - ErrorRangeCalculator.prototype.getStandardError = function getStandardError (data, average) { - return this.getStandardDeviation(data, average, true) / Math.sqrt(average.count); - }; - - ErrorRangeCalculator.prototype.getStandardDeviation = function getStandardDeviation (data, average, isSample) { - var this$1 = this; - - var length = data.length; - var total = isSample ? average.count - 1 : average.count; - var squareDifferenceSum = 0; - - for (var idx = 0; idx < length; idx++) { - var value = this$1.valueGetter(data[idx]); - if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["B" /* isNumber */])(value)) { - squareDifferenceSum += Math.pow(value - average.value, 2); - } - } - - return Math.sqrt(squareDifferenceSum / total); - }; - - ErrorRangeCalculator.prototype.getAverage = function getAverage (data) { - var this$1 = this; - - var length = data.length; - var sum = 0; - var count = 0; - - for (var idx = 0; idx < length; idx++) { - var value = this$1.valueGetter(data[idx]); - if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["B" /* isNumber */])(value)) { - sum += value; - count++; - } - } - - return { - value: sum / count, - count: count - }; - }; - - return ErrorRangeCalculator; -}(__WEBPACK_IMPORTED_MODULE_2__common__["a" /* Class */])); - -/* harmony default export */ __webpack_exports__["a"] = (ErrorRangeCalculator); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/error-bars/scatter-error-bar.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__error_bar_base__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/error-bars/error-bar-base.js"); - - -var ScatterErrorBar = (function (ErrorBarBase) { - function ScatterErrorBar () { - ErrorBarBase.apply(this, arguments); - } - - if ( ErrorBarBase ) ScatterErrorBar.__proto__ = ErrorBarBase; - ScatterErrorBar.prototype = Object.create( ErrorBarBase && ErrorBarBase.prototype ); - ScatterErrorBar.prototype.constructor = ScatterErrorBar; - - ScatterErrorBar.prototype.getAxis = function getAxis () { - var axes = this.chart.seriesAxes(this.series); - var axis = this.isVertical ? axes.y : axes.x; - - return axis; - }; - - return ScatterErrorBar; -}(__WEBPACK_IMPORTED_MODULE_0__error_bar_base__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (ScatterErrorBar); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/funnel-chart/funnel-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_pie_chart_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/pie-chart-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__funnel_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/funnel-chart/funnel-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - -var FunnelChart = (function (ChartElement) { - function FunnelChart(plotArea, options) { - ChartElement.call(this, options); - - this.plotArea = plotArea; - this.points = []; - this.labels = []; - this.legendItems = []; - this.render(); - } - - if ( ChartElement ) FunnelChart.__proto__ = ChartElement; - FunnelChart.prototype = Object.create( ChartElement && ChartElement.prototype ); - FunnelChart.prototype.constructor = FunnelChart; - - FunnelChart.prototype.formatPointValue = function formatPointValue (point, format) { - return this.chartService.format.auto(format,point.value); - }; - - FunnelChart.prototype.render = function render () { - var this$1 = this; - - var ref = this; - var options = ref.options; - var seriesColors = ref.plotArea.options.seriesColors; if ( seriesColors === void 0 ) seriesColors = []; - var series = options.series[0]; - var data = series.data; - - if (!data) { - return; - } - - var ref$1 = Object(__WEBPACK_IMPORTED_MODULE_4__utils__["b" /* bindSegments */])(series); - var total = ref$1.total; - var points = ref$1.points; - - for (var i = 0; i < points.length; i++) { - var pointData = points[i]; - - if (!pointData) { - continue; - } - - var fields = pointData.fields; - - if (!Object(__WEBPACK_IMPORTED_MODULE_6__common__["A" /* isFunction */])(series.color)) { - series.color = fields.color || seriesColors[i % seriesColors.length]; - } - - fields = Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({ - index: i, - owner: this$1, - series: series, - dataItem: data[i], - percentage: pointData.value / total - }, fields, { visible: pointData.visible }); - - var value = pointData.valueFields.value; - var segment = this$1.createSegment(value, fields); - var label = this$1.createLabel(value, fields); - - if (segment && label) { - segment.append(label); - } - } - }; - - FunnelChart.prototype.evalSegmentOptions = function evalSegmentOptions (options, value, fields) { - var series = fields.series; - - Object(__WEBPACK_IMPORTED_MODULE_4__utils__["f" /* evalOptions */])(options, { - value: value, - series: series, - dataItem: fields.dataItem, - index: fields.index - }, { defaults: series._defaults, excluded: [ "data", "content", "template", "toggle", "visual" ] }); - }; - - FunnelChart.prototype.createSegment = function createSegment (value, fields) { - var seriesOptions = Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({}, fields.series); - this.evalSegmentOptions(seriesOptions, value, fields); - - this.createLegendItem(value, seriesOptions, fields); - - if (fields.visible !== false) { - - var segment = new __WEBPACK_IMPORTED_MODULE_3__funnel_segment__["a" /* default */](value, seriesOptions, fields); - Object.assign(segment, fields); - - this.append(segment); - this.points.push(segment); - - return segment; - } - }; - - FunnelChart.prototype.createLabel = function createLabel (value, fields) { - var series = fields.series; - var dataItem = fields.dataItem; - var labels = Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({}, this.options.labels, series.labels); - var text = value; - - if (labels.visible) { - var labelTemplate = Object(__WEBPACK_IMPORTED_MODULE_6__common__["t" /* getTemplate */])(labels); - if (labelTemplate) { - text = labelTemplate({ - dataItem: dataItem, - value: value, - percentage: fields.percentage, - category: fields.category, - series: series - }); - } else if (labels.format) { - text = this.plotArea.chartService.format.auto(labels.format, text); - } - - if (!labels.color) { - var brightnessValue = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["b" /* Color */](series.color).percBrightness(); - if (brightnessValue > 180) { - labels.color = __WEBPACK_IMPORTED_MODULE_5__common_constants__["c" /* BLACK */]; - } else { - labels.color = __WEBPACK_IMPORTED_MODULE_5__common_constants__["E" /* WHITE */]; - } - if (!labels.background) { - labels.background = series.color; - } - } - - this.evalSegmentOptions(labels, value, fields); - var textBox = new __WEBPACK_IMPORTED_MODULE_1__core__["u" /* TextBox */](text, Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({ - vAlign: labels.position - }, labels)); - - this.labels.push(textBox); - - return textBox; - } - }; - - FunnelChart.prototype.labelPadding = function labelPadding () { - var labels = this.labels; - var padding = { left: 0, right: 0 }; - - for (var i = 0; i < labels.length; i++) { - var label = labels[i]; - var align = label.options.align; - if (align !== __WEBPACK_IMPORTED_MODULE_5__common_constants__["e" /* CENTER */]) { - var width = labels[i].box.width(); - - if (align === __WEBPACK_IMPORTED_MODULE_5__common_constants__["r" /* LEFT */]) { - padding.left = Math.max(padding.left, width); - } else { - padding.right = Math.max(padding.right, width); - } - } - } - - return padding; - }; - - FunnelChart.prototype.dynamicSlopeReflow = function dynamicSlopeReflow (box, width, totalHeight) { - var ref = this; - var options = ref.options; - var segments = ref.points; - var count = segments.length; - var firstSegment = segments[0]; - var maxSegment = firstSegment; - - for (var idx = 0; idx < segments.length; idx++) { - if (segments[idx].percentage > maxSegment.percentage) { - maxSegment = segments[idx]; - } - } - - var lastUpperSide = (firstSegment.percentage / maxSegment.percentage) * width; - var previousOffset = (width - lastUpperSide) / 2; - var previousHeight = 0; - - for (var idx$1 = 0; idx$1 < count; idx$1++) { - var percentage = segments[idx$1].percentage; - var nextSegment = segments[idx$1 + 1]; - var nextPercentage = (nextSegment ? nextSegment.percentage : percentage); - var points = segments[idx$1].points = []; - var height = (options.dynamicHeight) ? (totalHeight * percentage) : (totalHeight / count); - var offset = (void 0); - - if (!percentage) { - offset = nextPercentage ? 0 : width / 2; - } else { - offset = (width - lastUpperSide * (nextPercentage / percentage)) / 2; - } - - offset = Object(__WEBPACK_IMPORTED_MODULE_6__common__["F" /* limitValue */])(offset, 0, width); - - points.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(box.x1 + previousOffset, box.y1 + previousHeight)); - points.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(box.x1 + width - previousOffset, box.y1 + previousHeight)); - points.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(box.x1 + width - offset, box.y1 + height + previousHeight)); - points.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(box.x1 + offset, box.y1 + height + previousHeight)); - - previousOffset = offset; - previousHeight += height + options.segmentSpacing; - lastUpperSide = Object(__WEBPACK_IMPORTED_MODULE_6__common__["F" /* limitValue */])(width - 2 * offset, 0, width); - } - }; - - FunnelChart.prototype.constantSlopeReflow = function constantSlopeReflow (box, width, totalHeight) { - var ref = this; - var options = ref.options; - var segments = ref.points; - var count = segments.length; - var decreasingWidth = options.neckRatio <= 1; - var neckRatio = decreasingWidth ? options.neckRatio * width : width; - var previousOffset = decreasingWidth ? 0 : (width - width / options.neckRatio) / 2; - var topMostWidth = decreasingWidth ? width : width - previousOffset * 2; - var finalNarrow = (topMostWidth - neckRatio) / 2; - var previousHeight = 0; - - for (var idx = 0; idx < count; idx++) { - var points = segments[idx].points = []; - var percentage = segments[idx].percentage; - var offset = (options.dynamicHeight) ? (finalNarrow * percentage) : (finalNarrow / count); - var height = (options.dynamicHeight) ? (totalHeight * percentage) : (totalHeight / count); - - points.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(box.x1 + previousOffset, box.y1 + previousHeight)); - points.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(box.x1 + width - previousOffset, box.y1 + previousHeight)); - points.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(box.x1 + width - previousOffset - offset, box.y1 + height + previousHeight)); - points.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(box.x1 + previousOffset + offset,box.y1 + height + previousHeight)); - previousOffset += offset; - previousHeight += height + options.segmentSpacing; - } - }; - - FunnelChart.prototype.reflow = function reflow (chartBox) { - var points = this.points; - var count = points.length; - - if (!count) { - return; - } - - var options = this.options; - var box = chartBox.clone().unpad(this.labelPadding()); - var totalHeight = box.height() - options.segmentSpacing * (count - 1); - var width = box.width(); - - if (options.dynamicSlope) { - this.dynamicSlopeReflow(box, width, totalHeight); - } else { - this.constantSlopeReflow(box, width, totalHeight); - } - - for (var idx = 0; idx < count; idx++) { - points[idx].reflow(chartBox); - } - }; - - return FunnelChart; -}(__WEBPACK_IMPORTED_MODULE_1__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_6__common__["M" /* setDefaultOptions */])(FunnelChart, { - neckRatio: 0.3, - width: 300, - dynamicSlope: false, - dynamicHeight: true, - segmentSpacing: 0, - labels: { - visible: false, - align: __WEBPACK_IMPORTED_MODULE_5__common_constants__["e" /* CENTER */], - position: __WEBPACK_IMPORTED_MODULE_5__common_constants__["e" /* CENTER */], - zIndex: 1 - } -}); - -Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])(FunnelChart.prototype, __WEBPACK_IMPORTED_MODULE_2__mixins_pie_chart_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (FunnelChart); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/funnel-chart/funnel-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_point_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/point-events-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - -var FunnelSegment = (function (ChartElement) { - function FunnelSegment(value, options, segmentOptions) { - ChartElement.call(this, options); - - this.value = value; - this.options.index = segmentOptions.index; - } - - if ( ChartElement ) FunnelSegment.__proto__ = ChartElement; - FunnelSegment.prototype = Object.create( ChartElement && ChartElement.prototype ); - FunnelSegment.prototype.constructor = FunnelSegment; - - FunnelSegment.prototype.reflow = function reflow (chartBox) { - var points = this.points; - var label = this.children[0]; - - this.box = new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */](points[0].x, points[0].y, points[1].x, points[2].y); - - if (label) { - label.reflow(new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */](chartBox.x1, points[0].y, chartBox.x2, points[2].y)); - } - }; - - FunnelSegment.prototype.createVisual = function createVisual () { - var this$1 = this; - - var options = this.options; - var visual; - - ChartElement.prototype.createVisual.call(this); - - if (options.visual) { - visual = options.visual({ - category: this.category, - dataItem: this.dataItem, - value: this.value, - series: this.series, - percentage: this.percentage, - points: this.points, - options: options, - sender: this.getSender(), - createVisual: function () { return this$1.createPath(); } - }); - } else { - visual = this.createPath(); - } - - if (visual) { - this.visual.append(visual); - } - }; - - FunnelSegment.prototype.createPath = function createPath () { - var options = this.options; - var border = options.border; - var path = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromPoints(this.points, { - fill: { - color: options.color, - opacity: options.opacity - }, - stroke: { - color: border.color, - opacity: border.opacity, - width: border.width - } - }).close(); - - return path; - }; - - FunnelSegment.prototype.createHighlight = function createHighlight (style) { - return __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromPoints(this.points, style); - }; - - FunnelSegment.prototype.highlightVisual = function highlightVisual () { - return this.visual.children[0]; - }; - - FunnelSegment.prototype.highlightVisualArgs = function highlightVisualArgs () { - var path = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromPoints(this.points).close(); - - return { - options: this.options, - path: path - }; - }; - - FunnelSegment.prototype.tooltipAnchor = function tooltipAnchor () { - var box = this.box; - return { - point: new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](box.center().x, box.y1), - align: { - horizontal: "center", - vertical: "top" - } - }; - }; - - FunnelSegment.prototype.formatValue = function formatValue (format) { - var point = this; - return point.owner.formatPointValue(point, format); - }; - - return FunnelSegment; -}(__WEBPACK_IMPORTED_MODULE_1__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_4__common__["M" /* setDefaultOptions */])(FunnelSegment, { - color: __WEBPACK_IMPORTED_MODULE_3__common_constants__["E" /* WHITE */], - border: { - width: 1 - } -}); - -Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])(FunnelSegment.prototype, __WEBPACK_IMPORTED_MODULE_2__mixins_point_events_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (FunnelSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/highlight.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - -var Highlight = (function (Class) { - function Highlight() { - Class.call(this); - - this._points = []; - } - - if ( Class ) Highlight.__proto__ = Class; - Highlight.prototype = Object.create( Class && Class.prototype ); - Highlight.prototype.constructor = Highlight; - - Highlight.prototype.destroy = function destroy () { - this._points = []; - }; - - Highlight.prototype.show = function show (points) { - var this$1 = this; - - var arrayPoints = [].concat(points); - this.hide(); - - for (var i = 0; i < arrayPoints.length; i++) { - var point = arrayPoints[i]; - if (point && point.toggleHighlight && point.hasHighlight()) { - this$1.togglePointHighlight(point, true); - this$1._points.push(point); - } - } - }; - - Highlight.prototype.togglePointHighlight = function togglePointHighlight (point, show) { - var toggleHandler = (point.options.highlight || {}).toggle; - if (toggleHandler) { - var eventArgs = { - category: point.category, - series: point.series, - dataItem: point.dataItem, - value: point.value, - stackValue: point.stackValue, - preventDefault: preventDefault, - visual: point.highlightVisual(), - show: show - }; - toggleHandler(eventArgs); - if (!eventArgs._defaultPrevented) { - point.toggleHighlight(show); - } - } else { - point.toggleHighlight(show); - } - }; - - Highlight.prototype.hide = function hide () { - var this$1 = this; - - var points = this._points; - while (points.length) { - this$1.togglePointHighlight(points.pop(), false); - } - }; - - Highlight.prototype.isHighlighted = function isHighlighted (element) { - var points = this._points; - - for (var i = 0; i < points.length; i++) { - var point = points[i]; - if (element === point) { - return true; - } - } - - return false; - }; - - return Highlight; -}(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* Class */])); - -function preventDefault() { - this._defaultPrevented = true; -} - -/* harmony default export */ __webpack_exports__["a"] = (Highlight); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/layout/cluster-layout.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/layout/utils.js"); - - - - - - -var ClusterLayout = (function (ChartElement) { - function ClusterLayout(options) { - ChartElement.call(this, options); - - this.forEach = options.rtl ? __WEBPACK_IMPORTED_MODULE_3__utils__["b" /* forEachReverse */] : __WEBPACK_IMPORTED_MODULE_3__utils__["a" /* forEach */]; - } - - if ( ChartElement ) ClusterLayout.__proto__ = ChartElement; - ClusterLayout.prototype = Object.create( ChartElement && ChartElement.prototype ); - ClusterLayout.prototype.constructor = ClusterLayout; - - ClusterLayout.prototype.reflow = function reflow (box) { - var ref = this.options; - var vertical = ref.vertical; - var gap = ref.gap; - var spacing = ref.spacing; - var children = this.children; - var count = children.length; - var axis = vertical ? __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */]; - var slots = count + gap + (spacing * (count - 1)); - var slotSize = (vertical ? box.height() : box.width()) / slots; - var position = box[axis + 1] + slotSize * (gap / 2); - - this.forEach(children, function (child, idx) { - var childBox = (child.box || box).clone(); - - childBox[axis + 1] = position; - childBox[axis + 2] = position + slotSize; - - child.reflow(childBox); - if (idx < count - 1) { - position += (slotSize * spacing); - } - - position += slotSize; - }); - }; - - return ClusterLayout; -}(__WEBPACK_IMPORTED_MODULE_0__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["M" /* setDefaultOptions */])(ClusterLayout, { - vertical: false, - gap: 0, - spacing: 0 -}); - -/* harmony default export */ __webpack_exports__["a"] = (ClusterLayout); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/layout/radar-cluster-layout.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/layout/utils.js"); - - - - - - -var RadarClusterLayout = (function (ChartElement) { - function RadarClusterLayout(options) { - ChartElement.call(this, options); - - this.forEach = options.rtl ? __WEBPACK_IMPORTED_MODULE_2__utils__["b" /* forEachReverse */] : __WEBPACK_IMPORTED_MODULE_2__utils__["a" /* forEach */]; - } - - if ( ChartElement ) RadarClusterLayout.__proto__ = ChartElement; - RadarClusterLayout.prototype = Object.create( ChartElement && ChartElement.prototype ); - RadarClusterLayout.prototype.constructor = RadarClusterLayout; - - RadarClusterLayout.prototype.reflow = function reflow (sector) { - var ref = this; - var options = ref.options; - var children = ref.children; - var gap = options.gap; - var spacing = options.spacing; - var count = children.length; - var slots = count + gap + (spacing * (count - 1)); - var slotAngle = sector.angle / slots; - var angle = sector.startAngle + slotAngle * (gap / 2); - - this.forEach(children, function (child) { - var slotSector = sector.clone(); - slotSector.startAngle = angle; - slotSector.angle = slotAngle; - - if (child.sector) { - slotSector.radius = child.sector.radius; - } - - child.reflow(slotSector); - child.sector = slotSector; - - angle += slotAngle + (slotAngle * spacing); - }); - }; - - return RadarClusterLayout; -}(__WEBPACK_IMPORTED_MODULE_0__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["M" /* setDefaultOptions */])(RadarClusterLayout, { - gap: 1, - spacing: 0 -}); - -/* harmony default export */ __webpack_exports__["a"] = (RadarClusterLayout); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/layout/radar-stack-layout.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); - - -var RadarStackLayout = (function (ChartElement) { - function RadarStackLayout () { - ChartElement.apply(this, arguments); - } - - if ( ChartElement ) RadarStackLayout.__proto__ = ChartElement; - RadarStackLayout.prototype = Object.create( ChartElement && ChartElement.prototype ); - RadarStackLayout.prototype.constructor = RadarStackLayout; - - RadarStackLayout.prototype.reflow = function reflow (sector) { - var ref = this; - var reverse = ref.options.reverse; - var children = ref.children; - var childrenCount = children.length; - var first = reverse ? childrenCount - 1 : 0; - var step = reverse ? -1 : 1; - - this.box = new __WEBPACK_IMPORTED_MODULE_0__core__["a" /* Box */](); - - for (var i = first; i >= 0 && i < childrenCount; i += step) { - var childSector = children[i].sector; - childSector.startAngle = sector.startAngle; - childSector.angle = sector.angle; - } - }; - - return RadarStackLayout; -}(__WEBPACK_IMPORTED_MODULE_0__core__["d" /* ChartElement */])); - -/* harmony default export */ __webpack_exports__["a"] = (RadarStackLayout); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/layout/stack-wrap.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var StackWrap = (function (ChartElement) { - function StackWrap () { - ChartElement.apply(this, arguments); - } - - if ( ChartElement ) StackWrap.__proto__ = ChartElement; - StackWrap.prototype = Object.create( ChartElement && ChartElement.prototype ); - StackWrap.prototype.constructor = StackWrap; - - StackWrap.prototype.reflow = function reflow (targetBox) { - var this$1 = this; - - var positionAxis = this.options.vertical ? __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */] : __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */]; - var children = this.children; - var childrenCount = children.length; - var box = this.box = new __WEBPACK_IMPORTED_MODULE_0__core__["a" /* Box */](); - - for (var i = 0; i < childrenCount; i++) { - var currentChild = children[i]; - - if (currentChild.visible !== false) { - var childBox = currentChild.box.clone(); - childBox.snapTo(targetBox, positionAxis); - - if (i === 0) { - box = this$1.box = childBox.clone(); - } - - currentChild.reflow(childBox); - box.wrap(childBox); - } - } - }; - - return StackWrap; -}(__WEBPACK_IMPORTED_MODULE_0__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["M" /* setDefaultOptions */])(StackWrap, { - vertical: true -}); - -/* harmony default export */ __webpack_exports__["a"] = (StackWrap); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/layout/utils.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = forEach; -/* harmony export (immutable) */ __webpack_exports__["b"] = forEachReverse; -function forEach(elements, callback) { - elements.forEach(callback); -} - -function forEachReverse(elements, callback) { - var length = elements.length; - - for (var idx = length - 1; idx >= 0; idx--) { - callback(elements[idx], idx - length - 1); - } -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/legend/legend-item.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - -var LegendItem = (function (BoxElement) { - function LegendItem(options) { - BoxElement.call(this, options); - - this.createContainer(); - if (!options.rtl) { - this.createMarker(); - this.createLabel(); - } else { - this.createLabel(); - this.createMarker(); - } - } - - if ( BoxElement ) LegendItem.__proto__ = BoxElement; - LegendItem.prototype = Object.create( BoxElement && BoxElement.prototype ); - LegendItem.prototype.constructor = LegendItem; - - LegendItem.prototype.createContainer = function createContainer () { - this.container = new __WEBPACK_IMPORTED_MODULE_1__core__["h" /* FloatElement */]({ vertical: false, wrap: false, align: __WEBPACK_IMPORTED_MODULE_3__common_constants__["e" /* CENTER */], spacing: this.options.spacing }); - this.append(this.container); - }; - - LegendItem.prototype.createMarker = function createMarker () { - this.container.append(new __WEBPACK_IMPORTED_MODULE_1__core__["t" /* ShapeElement */](this.markerOptions())); - }; - - LegendItem.prototype.markerOptions = function markerOptions () { - var options = this.options; - var markerColor = options.markerColor; - return Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])({}, options.markers, { - background: markerColor, - border: { - color: markerColor - } - }); - }; - - LegendItem.prototype.createLabel = function createLabel () { - var options = this.options; - var labelOptions = Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])({}, options.labels); - - this.container.append(new __WEBPACK_IMPORTED_MODULE_1__core__["u" /* TextBox */](options.text, labelOptions)); - }; - - LegendItem.prototype.renderComplete = function renderComplete () { - BoxElement.prototype.renderComplete.call(this); - - var cursor = this.options.cursor || {}; - var eventSink = this._itemOverlay = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(this.container.box.toRect(), { - fill: { - color: __WEBPACK_IMPORTED_MODULE_3__common_constants__["E" /* WHITE */], - opacity: 0 - }, - stroke: null, - cursor: cursor.style || cursor - }); - - this.appendVisual(eventSink); - }; - - LegendItem.prototype.click = function click (widget, e) { - var args = this.eventArgs(e); - - if (!widget.trigger(__WEBPACK_IMPORTED_MODULE_2__constants__["B" /* LEGEND_ITEM_CLICK */], args)) { - e.preventDefault(); - } - }; - - LegendItem.prototype.hover = function hover (widget, e) { - var args = this.eventArgs(e); - - if (!widget.trigger(__WEBPACK_IMPORTED_MODULE_2__constants__["C" /* LEGEND_ITEM_HOVER */], args)) { - e.preventDefault(); - widget._legendItemHover(args.seriesIndex, args.pointIndex); - } - - // Don't trigger point hover for legend items - return true; - }; - - LegendItem.prototype.leave = function leave (widget) { - widget._unsetActivePoint(); - }; - - LegendItem.prototype.eventArgs = function eventArgs (e) { - var options = this.options; - - return { - element: Object(__WEBPACK_IMPORTED_MODULE_4__common__["r" /* eventElement */])(e), - text: options.text, - series: options.series, - seriesIndex: options.series.index, - pointIndex: options.pointIndex - }; - }; - - LegendItem.prototype.renderVisual = function renderVisual () { - var this$1 = this; - - var options = this.options; - var customVisual = options.visual; - - if (customVisual) { - this.visual = customVisual({ - active: options.active, - series: options.series, - sender: this.getSender(), - pointIndex: options.pointIndex, - options: { - markers: this.markerOptions(), - labels: options.labels - }, - createVisual: function () { - this$1.createVisual(); - this$1.renderChildren(); - this$1.renderComplete(); - - var defaultVisual = this$1.visual; - - delete this$1.visual; - - return defaultVisual; - } - }); - this.addVisual(); - } else { - BoxElement.prototype.renderVisual.call(this); - } - }; - - return LegendItem; -}(__WEBPACK_IMPORTED_MODULE_1__core__["b" /* BoxElement */])); - -/* harmony default export */ __webpack_exports__["a"] = (LegendItem); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/legend/legend-layout.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); - - - - -var LegendLayout = (function (ChartElement) { - function LegendLayout(options, chartService) { - ChartElement.call(this, options); - - this.chartService = chartService; - } - - if ( ChartElement ) LegendLayout.__proto__ = ChartElement; - LegendLayout.prototype = Object.create( ChartElement && ChartElement.prototype ); - LegendLayout.prototype.constructor = LegendLayout; - - LegendLayout.prototype.render = function render () { - var ref = this; - var children = ref.children; - var options = ref.options; - var vertical = options.vertical; - - this.visual = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Layout(null, { - spacing: vertical ? 0 : options.spacing, - lineSpacing: vertical ? options.spacing : 0, - orientation: vertical ? "vertical" : "horizontal", - reverse: options.rtl, - alignItems: vertical ? "start" : "center" - }); - - for (var idx = 0; idx < children.length; idx++) { - var legendItem = children[idx]; - legendItem.reflow(new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */]()); - legendItem.renderVisual(); - } - }; - - LegendLayout.prototype.reflow = function reflow (box) { - this.visual.rect(box.toRect()); - this.visual.reflow(); - var bbox = this.visual.clippedBBox(); - - if (bbox) { - this.box = Object(__WEBPACK_IMPORTED_MODULE_1__core__["x" /* rectToBox */])(bbox); - } else { - this.box = new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */](); - } - }; - - LegendLayout.prototype.renderVisual = function renderVisual () { - this.addVisual(); - }; - - LegendLayout.prototype.createVisual = function createVisual () {}; - - return LegendLayout; -}(__WEBPACK_IMPORTED_MODULE_1__core__["d" /* ChartElement */])); - -/* harmony default export */ __webpack_exports__["a"] = (LegendLayout); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/legend/legend.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__legend_layout__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/legend/legend-layout.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__legend_item__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/legend/legend-item.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - -var HORIZONTAL = "horizontal"; -var POINTER = "pointer"; -var CUSTOM = "custom"; - -var Legend = (function (ChartElement) { - function Legend(options, chartService) { - if ( chartService === void 0 ) chartService = {}; - - ChartElement.call(this, options); - - this.chartService = chartService; - - if (!Object(__WEBPACK_IMPORTED_MODULE_4__common__["x" /* inArray */])(this.options.position, [ __WEBPACK_IMPORTED_MODULE_3__common_constants__["B" /* TOP */], __WEBPACK_IMPORTED_MODULE_3__common_constants__["z" /* RIGHT */], __WEBPACK_IMPORTED_MODULE_3__common_constants__["d" /* BOTTOM */], __WEBPACK_IMPORTED_MODULE_3__common_constants__["r" /* LEFT */], CUSTOM ])) { - this.options.position = __WEBPACK_IMPORTED_MODULE_3__common_constants__["z" /* RIGHT */]; - } - - this.createContainer(); - - this.createItems(); - } - - if ( ChartElement ) Legend.__proto__ = ChartElement; - Legend.prototype = Object.create( ChartElement && ChartElement.prototype ); - Legend.prototype.constructor = Legend; - - Legend.prototype.createContainer = function createContainer () { - var options = this.options; - var position = options.position; - var userAlign = options.align; - var align = position; - var vAlign = __WEBPACK_IMPORTED_MODULE_3__common_constants__["e" /* CENTER */]; - - if (position === CUSTOM) { - align = __WEBPACK_IMPORTED_MODULE_3__common_constants__["r" /* LEFT */]; - } else if (Object(__WEBPACK_IMPORTED_MODULE_4__common__["x" /* inArray */])(position, [ __WEBPACK_IMPORTED_MODULE_3__common_constants__["B" /* TOP */], __WEBPACK_IMPORTED_MODULE_3__common_constants__["d" /* BOTTOM */] ])) { - if (userAlign === "start") { - align = __WEBPACK_IMPORTED_MODULE_3__common_constants__["r" /* LEFT */]; - } else if (userAlign === "end") { - align = __WEBPACK_IMPORTED_MODULE_3__common_constants__["z" /* RIGHT */]; - } else { - align = __WEBPACK_IMPORTED_MODULE_3__common_constants__["e" /* CENTER */]; - } - vAlign = position; - } else if (userAlign) { - if (userAlign === "start") { - vAlign = __WEBPACK_IMPORTED_MODULE_3__common_constants__["B" /* TOP */]; - } else if (userAlign === "end") { - vAlign = __WEBPACK_IMPORTED_MODULE_3__common_constants__["d" /* BOTTOM */]; - } - } - - this.container = new __WEBPACK_IMPORTED_MODULE_0__core__["b" /* BoxElement */]({ - margin: options.margin, - padding: options.padding, - background: options.background, - border: options.border, - vAlign: vAlign, - align: align, - zIndex: options.zIndex, - shrinkToFit: true - }); - - this.append(this.container); - }; - - Legend.prototype.createItems = function createItems () { - var chartService = this.getService(); - var options = this.options; - var vertical = this.isVertical(); - var innerElement = new __WEBPACK_IMPORTED_MODULE_1__legend_layout__["a" /* default */]({ - vertical: vertical, - spacing: options.spacing, - rtl: chartService.rtl - }, chartService); - var items = options.items; - - if (options.reverse) { - items = items.slice(0).reverse(); - } - - var count = items.length; - - for (var i = 0; i < count; i++) { - var item = items[i]; - - innerElement.append(new __WEBPACK_IMPORTED_MODULE_2__legend_item__["a" /* default */](Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])({}, { - markers: options.markers, - labels: options.labels, - rtl: chartService.rtl - }, options.item, item))); - } - - innerElement.render(); - - this.container.append(innerElement); - }; - - Legend.prototype.isVertical = function isVertical () { - var ref = this.options; - var orientation = ref.orientation; - var position = ref.position; - var vertical = (position === CUSTOM && orientation !== HORIZONTAL) || - (Object(__WEBPACK_IMPORTED_MODULE_4__common__["l" /* defined */])(orientation) ? orientation !== HORIZONTAL : Object(__WEBPACK_IMPORTED_MODULE_4__common__["x" /* inArray */])(position, [ __WEBPACK_IMPORTED_MODULE_3__common_constants__["r" /* LEFT */], __WEBPACK_IMPORTED_MODULE_3__common_constants__["z" /* RIGHT */] ])); - - return vertical; - }; - - Legend.prototype.hasItems = function hasItems () { - return this.container.children[0].children.length > 0; - }; - - Legend.prototype.reflow = function reflow (targetBox) { - var options = this.options; - var legendBox = targetBox.clone(); - - if (!this.hasItems()) { - this.box = legendBox; - return; - } - - if (options.position === CUSTOM) { - this.containerCustomReflow(legendBox); - this.box = legendBox; - } else { - this.containerReflow(legendBox); - } - }; - - Legend.prototype.containerReflow = function containerReflow (targetBox) { - var ref = this; - var options = ref.options; - var container = ref.container; - var position = options.position; - var width = options.width; - var height = options.height; - var pos = position === __WEBPACK_IMPORTED_MODULE_3__common_constants__["B" /* TOP */] || position === __WEBPACK_IMPORTED_MODULE_3__common_constants__["d" /* BOTTOM */] ? __WEBPACK_IMPORTED_MODULE_3__common_constants__["G" /* X */] : __WEBPACK_IMPORTED_MODULE_3__common_constants__["H" /* Y */]; - var vertical = this.isVertical(); - var alignTarget = targetBox.clone(); - var containerBox = targetBox.clone(); - - if (position === __WEBPACK_IMPORTED_MODULE_3__common_constants__["r" /* LEFT */] || position === __WEBPACK_IMPORTED_MODULE_3__common_constants__["z" /* RIGHT */]) { - containerBox.y1 = alignTarget.y1 = 0; - } - - if (vertical && height) { - containerBox.y2 = containerBox.y1 + height; - containerBox.align(alignTarget, __WEBPACK_IMPORTED_MODULE_3__common_constants__["H" /* Y */], container.options.vAlign); - } else if (!vertical && width) { - containerBox.x2 = containerBox.x1 + width; - containerBox.align(alignTarget, __WEBPACK_IMPORTED_MODULE_3__common_constants__["G" /* X */], container.options.align); - } - - container.reflow(containerBox); - containerBox = container.box; - - var box = containerBox.clone(); - - if (options.offsetX || options.offsetY) { - containerBox.translate(options.offsetX, options.offsetY); - this.container.reflow(containerBox); - } - - box[pos + 1] = targetBox[pos + 1]; - box[pos + 2] = targetBox[pos + 2]; - - this.box = box; - }; - - Legend.prototype.containerCustomReflow = function containerCustomReflow (targetBox) { - var ref = this; - var options = ref.options; - var container = ref.container; - var offsetX = options.offsetX; - var offsetY = options.offsetY; - var width = options.width; - var height = options.height; - var vertical = this.isVertical(); - var containerBox = targetBox.clone(); - - if (vertical && height) { - containerBox.y2 = containerBox.y1 + height; - } else if (!vertical && width) { - containerBox.x2 = containerBox.x1 + width; - } - container.reflow(containerBox); - containerBox = container.box; - - container.reflow(new __WEBPACK_IMPORTED_MODULE_0__core__["a" /* Box */]( - offsetX, offsetY, - offsetX + containerBox.width(), offsetY + containerBox.height() - )); - }; - - Legend.prototype.renderVisual = function renderVisual () { - if (this.hasItems()) { - ChartElement.prototype.renderVisual.call(this); - } - }; - - return Legend; -}(__WEBPACK_IMPORTED_MODULE_0__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_4__common__["M" /* setDefaultOptions */])(Legend, { - position: __WEBPACK_IMPORTED_MODULE_3__common_constants__["z" /* RIGHT */], - items: [], - offsetX: 0, - offsetY: 0, - margin: Object(__WEBPACK_IMPORTED_MODULE_4__common__["s" /* getSpacing */])(5), - padding: Object(__WEBPACK_IMPORTED_MODULE_4__common__["s" /* getSpacing */])(5), - border: { - color: __WEBPACK_IMPORTED_MODULE_3__common_constants__["c" /* BLACK */], - width: 0 - }, - item: { - cursor: POINTER, - spacing: 6 - }, - spacing: 6, - background: "", - zIndex: 1, - markers: { - border: { - width: 0 - }, - width: 15, - height: 3, - type: "rect", - align: __WEBPACK_IMPORTED_MODULE_3__common_constants__["r" /* LEFT */], - vAlign: __WEBPACK_IMPORTED_MODULE_3__common_constants__["e" /* CENTER */] - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (Legend); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__categorical_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/categorical-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__line_point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__line_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__step_line_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/step-line-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__spline_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/spline-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__mixins_line_chart_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/line-chart-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__mixins_clip_animation_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/clip-animation-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - -var LineChart = (function (CategoricalChart) { - function LineChart () { - CategoricalChart.apply(this, arguments); - } - - if ( CategoricalChart ) LineChart.__proto__ = CategoricalChart; - LineChart.prototype = Object.create( CategoricalChart && CategoricalChart.prototype ); - LineChart.prototype.constructor = LineChart; - - LineChart.prototype.render = function render () { - - CategoricalChart.prototype.render.call(this); - - this.updateStackRange(); - this.renderSegments(); - }; - - LineChart.prototype.pointType = function pointType () { - return __WEBPACK_IMPORTED_MODULE_1__line_point__["a" /* default */]; - }; - - LineChart.prototype.createPoint = function createPoint (data, fields) { - var categoryIx = fields.categoryIx; - var category = fields.category; - var series = fields.series; - var seriesIx = fields.seriesIx; - var missingValues = this.seriesMissingValues(series); - var value = data.valueFields.value; - - if (!Object(__WEBPACK_IMPORTED_MODULE_8__common__["l" /* defined */])(value) || value === null) { - if (missingValues === __WEBPACK_IMPORTED_MODULE_7__constants__["_19" /* ZERO */]) { - value = 0; - } else { - return null; - } - } - - var pointOptions = this.pointOptions(series, seriesIx); - pointOptions = this.evalPointOptions( - pointOptions, value, category, categoryIx, series, seriesIx - ); - - var color = data.fields.color || series.color; - if (Object(__WEBPACK_IMPORTED_MODULE_8__common__["A" /* isFunction */])(series.color)) { - color = pointOptions.color; - } - - var point = new __WEBPACK_IMPORTED_MODULE_1__line_point__["a" /* default */](value, pointOptions); - point.color = color; - - this.append(point); - - return point; - }; - - LineChart.prototype.plotRange = function plotRange (point) { - var this$1 = this; - - var plotValue = this.plotValue(point); - - if (this.options.isStacked) { - var categoryIx = point.categoryIx; - var categoryPoints = this.categoryPoints[categoryIx]; - - for (var i = 0; i < categoryPoints.length; i++) { - var other = categoryPoints[i]; - - if (point === other) { - break; - } - - plotValue += this$1.plotValue(other); - - if (this$1.options.isStacked100) { - plotValue = Math.min(plotValue, 1); - } - } - - } - - return [ plotValue, plotValue ]; - }; - - LineChart.prototype.createSegment = function createSegment (linePoints, currentSeries, seriesIx) { - var style = currentSeries.style; - var pointType; - - if (style === __WEBPACK_IMPORTED_MODULE_7__constants__["_7" /* STEP */]) { - pointType = __WEBPACK_IMPORTED_MODULE_3__step_line_segment__["a" /* default */]; - } else if (style === __WEBPACK_IMPORTED_MODULE_7__constants__["_5" /* SMOOTH */]) { - pointType = __WEBPACK_IMPORTED_MODULE_4__spline_segment__["a" /* default */]; - } else { - pointType = __WEBPACK_IMPORTED_MODULE_2__line_segment__["a" /* default */]; - } - - return new pointType(linePoints, currentSeries, seriesIx); - }; - - LineChart.prototype.animationPoints = function animationPoints () { - var points = this.points; - var result = []; - for (var idx = 0; idx < points.length; idx++) { - result.push((points[idx] || {}).marker); - } - return result.concat(this._segments); - }; - - return LineChart; -}(__WEBPACK_IMPORTED_MODULE_0__categorical_chart__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_8__common__["k" /* deepExtend */])(LineChart.prototype, __WEBPACK_IMPORTED_MODULE_5__mixins_line_chart_mixin__["a" /* default */], __WEBPACK_IMPORTED_MODULE_6__mixins_clip_animation_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (LineChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-point.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_point_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/point-events-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mixins_note_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/note-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - -var LinePoint = (function (ChartElement) { - function LinePoint(value, options) { - ChartElement.call(this); - - this.value = value; - this.options = options; - this.aboveAxis = Object(__WEBPACK_IMPORTED_MODULE_6__common__["Q" /* valueOrDefault */])(this.options.aboveAxis, true); - this.tooltipTracking = true; - } - - if ( ChartElement ) LinePoint.__proto__ = ChartElement; - LinePoint.prototype = Object.create( ChartElement && ChartElement.prototype ); - LinePoint.prototype.constructor = LinePoint; - - LinePoint.prototype.render = function render () { - var ref = this.options; - var markers = ref.markers; - var labels = ref.labels; - - if (this._rendered) { - return; - } - - this._rendered = true; - - if (markers.visible && markers.size) { - this.marker = this.createMarker(); - this.append(this.marker); - } - - if (labels.visible) { - var labelTemplate = Object(__WEBPACK_IMPORTED_MODULE_6__common__["t" /* getTemplate */])(labels); - var labelText = this.value; - if (labelTemplate) { - labelText = labelTemplate({ - dataItem: this.dataItem, - category: this.category, - value: this.value, - percentage: this.percentage, - stackValue: this.stackValue, - series: this.series - }); - } else if (labels.format) { - labelText = this.formatValue(labels.format); - } - this.label = new __WEBPACK_IMPORTED_MODULE_1__core__["u" /* TextBox */](labelText, - Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({ - align: __WEBPACK_IMPORTED_MODULE_5__common_constants__["e" /* CENTER */], - vAlign: __WEBPACK_IMPORTED_MODULE_5__common_constants__["e" /* CENTER */], - margin: { - left: 5, - right: 5 - }, - zIndex: Object(__WEBPACK_IMPORTED_MODULE_6__common__["Q" /* valueOrDefault */])(labels.zIndex, this.series.zIndex) - }, labels) - ); - this.append(this.label); - } - - this.createNote(); - - if (this.errorBar) { - this.append(this.errorBar); - } - }; - - LinePoint.prototype.markerBorder = function markerBorder () { - var options = this.options.markers; - var background = options.background; - var border = Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({ color: this.color }, options.border); - - if (!Object(__WEBPACK_IMPORTED_MODULE_6__common__["l" /* defined */])(border.color)) { - border.color = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["b" /* Color */](background).brightness(__WEBPACK_IMPORTED_MODULE_4__constants__["e" /* BORDER_BRIGHTNESS */]).toHex(); - } - - return border; - }; - - LinePoint.prototype.createVisual = function createVisual () {}; - - LinePoint.prototype.createMarker = function createMarker () { - var options = this.options.markers; - var marker = new __WEBPACK_IMPORTED_MODULE_1__core__["t" /* ShapeElement */]({ - type: options.type, - width: options.size, - height: options.size, - rotation: options.rotation, - background: options.background, - border: this.markerBorder(), - opacity: options.opacity, - zIndex: Object(__WEBPACK_IMPORTED_MODULE_6__common__["Q" /* valueOrDefault */])(options.zIndex, this.series.zIndex), - animation: options.animation, - visual: options.visual - }, { - dataItem: this.dataItem, - value: this.value, - series: this.series, - category: this.category - }); - - return marker; - }; - - LinePoint.prototype.markerBox = function markerBox () { - if (!this.marker) { - this.marker = this.createMarker(); - this.marker.reflow(this._childBox); - } - - return this.marker.box; - }; - - LinePoint.prototype.reflow = function reflow (targetBox) { - var this$1 = this; - - var ref = this; - var options = ref.options; - var aboveAxis = ref.aboveAxis; - var vertical = options.vertical; - - this.render(); - - this.box = targetBox; - var childBox = targetBox.clone(); - - if (vertical) { - if (aboveAxis) { - childBox.y1 -= childBox.height(); - } else { - childBox.y2 += childBox.height(); - } - } else { - if (aboveAxis) { - childBox.x1 += childBox.width(); - } else { - childBox.x2 -= childBox.width(); - } - } - - this._childBox = childBox; - if (this.marker) { - this.marker.reflow(childBox); - } - - this.reflowLabel(childBox); - - if (this.errorBars) { - for (var i = 0; i < this.errorBars.length; i++) { - this$1.errorBars[i].reflow(childBox); - } - } - - if (this.note) { - var noteTargetBox = this.markerBox(); - - if (!(options.markers.visible && options.markers.size)) { - var center = noteTargetBox.center(); - noteTargetBox = new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */](center.x, center.y, center.x, center.y); - } - - this.note.reflow(noteTargetBox); - } - }; - - LinePoint.prototype.reflowLabel = function reflowLabel (box) { - var ref = this; - var options = ref.options; - var label = ref.label; - var anchor = options.labels.position; - - if (label) { - anchor = anchor === __WEBPACK_IMPORTED_MODULE_4__constants__["a" /* ABOVE */] ? __WEBPACK_IMPORTED_MODULE_5__common_constants__["B" /* TOP */] : anchor; - anchor = anchor === __WEBPACK_IMPORTED_MODULE_4__constants__["d" /* BELOW */] ? __WEBPACK_IMPORTED_MODULE_5__common_constants__["d" /* BOTTOM */] : anchor; - - label.reflow(box); - label.box.alignTo(this.markerBox(), anchor); - label.reflow(label.box); - } - }; - - LinePoint.prototype.createHighlight = function createHighlight () { - var markers = this.options.highlight.markers; - var defaultColor = this.markerBorder().color; - var options = this.options.markers; - var size = options.size + (options.border.width || 0) + (markers.border.width || 0); - - var shadow = new __WEBPACK_IMPORTED_MODULE_1__core__["t" /* ShapeElement */]({ - type: options.type, - width: size, - height: size, - rotation: options.rotation, - background: markers.color || defaultColor, - border: { - color: markers.border.color, - width: markers.border.width, - opacity: Object(__WEBPACK_IMPORTED_MODULE_6__common__["Q" /* valueOrDefault */])(markers.border.opacity, 1) - }, - opacity: Object(__WEBPACK_IMPORTED_MODULE_6__common__["Q" /* valueOrDefault */])(markers.opacity, 1) - }); - shadow.reflow(this._childBox); - - return shadow.getElement(); - }; - - LinePoint.prototype.highlightVisual = function highlightVisual () { - return (this.marker || {}).visual; - }; - - LinePoint.prototype.highlightVisualArgs = function highlightVisualArgs () { - var marker = this.marker; - var visual, rect; - - if (marker) { - rect = marker.paddingBox.toRect(); - visual = marker.visual; - } else { - var size = this.options.markers.size; - var halfSize = size / 2; - var center = this.box.center(); - rect = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect([ center.x - halfSize, center.y - halfSize ], [ size, size ]); - } - - return { - options: this.options, - rect: rect, - visual: visual - }; - }; - - LinePoint.prototype.tooltipAnchor = function tooltipAnchor () { - var markerBox = this.markerBox(); - var clipBox = this.owner.pane.clipBox(); - var showTooltip = !clipBox || clipBox.overlaps(markerBox); - - if (showTooltip) { - var x = markerBox.x2 + __WEBPACK_IMPORTED_MODULE_4__constants__["_8" /* TOOLTIP_OFFSET */]; - var horizontalAlign = __WEBPACK_IMPORTED_MODULE_5__common_constants__["r" /* LEFT */]; - var y, verticalAlign; - - if (this.aboveAxis) { - y = markerBox.y1; - verticalAlign = __WEBPACK_IMPORTED_MODULE_5__common_constants__["d" /* BOTTOM */]; - } else { - y = markerBox.y2; - verticalAlign = __WEBPACK_IMPORTED_MODULE_5__common_constants__["B" /* TOP */]; - } - - return { - point: new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](x, y), - align: { - horizontal: horizontalAlign, - vertical: verticalAlign - } - }; - } - }; - - LinePoint.prototype.formatValue = function formatValue (format) { - return this.owner.formatPointValue(this, format); - }; - - LinePoint.prototype.overlapsBox = function overlapsBox (box) { - var markerBox = this.markerBox(); - return markerBox.overlaps(box); - }; - - LinePoint.prototype.unclipElements = function unclipElements () { - if (this.label) { - this.label.options.noclip = true; - } - - if (this.note) { - this.note.options.noclip = true; - } - }; - - return LinePoint; -}(__WEBPACK_IMPORTED_MODULE_1__core__["d" /* ChartElement */])); - -LinePoint.prototype.defaults = { - vertical: true, - markers: { - visible: true, - background: __WEBPACK_IMPORTED_MODULE_5__common_constants__["E" /* WHITE */], - size: __WEBPACK_IMPORTED_MODULE_4__constants__["E" /* LINE_MARKER_SIZE */], - type: __WEBPACK_IMPORTED_MODULE_5__common_constants__["f" /* CIRCLE */], - border: { - width: 2 - }, - opacity: 1 - }, - labels: { - visible: false, - position: __WEBPACK_IMPORTED_MODULE_4__constants__["a" /* ABOVE */], - margin: Object(__WEBPACK_IMPORTED_MODULE_6__common__["s" /* getSpacing */])(3), - padding: Object(__WEBPACK_IMPORTED_MODULE_6__common__["s" /* getSpacing */])(4), - animation: { - type: __WEBPACK_IMPORTED_MODULE_4__constants__["s" /* FADEIN */], - delay: __WEBPACK_IMPORTED_MODULE_4__constants__["x" /* INITIAL_ANIMATION_DURATION */] - } - }, - notes: { - label: {} - }, - highlight: { - markers: { - border: { - color: "#fff", - width: 2 - } - }, - zIndex: __WEBPACK_IMPORTED_MODULE_5__common_constants__["p" /* HIGHLIGHT_ZINDEX */] - }, - errorBars: { - line: { - width: 1 - } - } -}; - -Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])(LinePoint.prototype, __WEBPACK_IMPORTED_MODULE_2__mixins_point_events_mixin__["a" /* default */]); -Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])(LinePoint.prototype, __WEBPACK_IMPORTED_MODULE_3__mixins_note_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (LinePoint); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var LineSegment = (function (ChartElement) { - function LineSegment(linePoints, series, seriesIx) { - ChartElement.call(this); - - this.linePoints = linePoints; - this.series = series; - this.seriesIx = seriesIx; - } - - if ( ChartElement ) LineSegment.__proto__ = ChartElement; - LineSegment.prototype = Object.create( ChartElement && ChartElement.prototype ); - LineSegment.prototype.constructor = LineSegment; - - LineSegment.prototype.points = function points () { - return this.toGeometryPoints(this.linePoints); - }; - - LineSegment.prototype.toGeometryPoints = function toGeometryPoints (points) { - var result = []; - for (var i = 0, length = points.length; i < length; i++) { - if (points[i] && points[i].visible !== false) { - result.push(points[i]._childBox.toRect().center()); - } - } - - return result; - }; - - LineSegment.prototype.createVisual = function createVisual () { - var ref = this; - var options = ref.options; - var series = ref.series; - var color = series.color; - var defaults = series._defaults; - - if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["A" /* isFunction */])(color) && defaults) { - color = defaults.color; - } - - var line = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromPoints(this.points(), { - stroke: { - color: color, - width: series.width, - opacity: series.opacity, - dashType: series.dashType - }, - zIndex: series.zIndex - }); - - if (options.closed) { - line.close(); - } - - this.visual = line; - }; - - LineSegment.prototype.aliasFor = function aliasFor (e, coords) { - return this.parent.getNearestPoint(coords.x, coords.y, this.seriesIx); - }; - - return LineSegment; -}(__WEBPACK_IMPORTED_MODULE_1__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["M" /* setDefaultOptions */])(LineSegment, { - closed: false -}); - -/* harmony default export */ __webpack_exports__["a"] = (LineSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/line-chart/spline-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__line_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - -var SplineSegment = (function (LineSegment) { - function SplineSegment () { - LineSegment.apply(this, arguments); - } - - if ( LineSegment ) SplineSegment.__proto__ = LineSegment; - SplineSegment.prototype = Object.create( LineSegment && LineSegment.prototype ); - SplineSegment.prototype.constructor = SplineSegment; - - SplineSegment.prototype.createVisual = function createVisual () { - var series = this.series; - var defaults = series._defaults; - var color = series.color; - - if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["A" /* isFunction */])(color) && defaults) { - color = defaults.color; - } - - var curveProcessor = new __WEBPACK_IMPORTED_MODULE_2__core__["e" /* CurveProcessor */](this.options.closed); - var segments = curveProcessor.process(this.points()); - var curve = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path({ - stroke: { - color: color, - width: series.width, - opacity: series.opacity, - dashType: series.dashType - }, - zIndex: series.zIndex - }); - - curve.segments.push.apply(curve.segments, segments); - - this.visual = curve; - }; - - return SplineSegment; -}(__WEBPACK_IMPORTED_MODULE_1__line_segment__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (SplineSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/line-chart/step-line-mixin.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); - - - - - -var StepLineMixin = { - calculateStepPoints: function(points) { - var categoryAxis = this.parent.plotArea.seriesCategoryAxis(this.series); - var ref = categoryAxis.options; - var justified = ref.justified; - var vertical = ref.vertical; - var reverse = ref.reverse; - - var stepAxis = vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */]; - var axis = vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - var stepDir = reverse ? 2 : 1; - var dir = stepDir; - - var previousPoint = toGeometryPoint(points[0], stepAxis, stepDir, axis, dir); - var result = [ previousPoint ]; - - for (var idx = 1; idx < points.length; idx++) { - var point = toGeometryPoint(points[idx], stepAxis, stepDir, axis, dir); - - if (previousPoint[stepAxis] !== point[stepAxis]) { - var stepPoint = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(); - stepPoint[stepAxis] = previousPoint[stepAxis]; - stepPoint[axis] = point[axis]; - - result.push(stepPoint, point); - } - - previousPoint = point; - } - - if (!justified) { - result.push(toGeometryPoint(Object(__WEBPACK_IMPORTED_MODULE_1__common__["E" /* last */])(points), stepAxis, stepDir, axis, reverse ? 1 : 2)); - } else if (previousPoint !== Object(__WEBPACK_IMPORTED_MODULE_1__common__["E" /* last */])(result)) { - result.push(previousPoint); - } - - return result; - - } -}; - -function toGeometryPoint(lintPoint, stepAxis, stepDir, axis, dir) { - var box = lintPoint.box; - var result = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(); - - result[stepAxis] = box[stepAxis + stepDir]; - result[axis] = box[axis + dir]; - - return result; -} - -/* harmony default export */ __webpack_exports__["a"] = (StepLineMixin); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/line-chart/step-line-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__line_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__step_line_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/step-line-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - -var StepLineSegment = (function (LineSegment) { - function StepLineSegment () { - LineSegment.apply(this, arguments); - } - - if ( LineSegment ) StepLineSegment.__proto__ = LineSegment; - StepLineSegment.prototype = Object.create( LineSegment && LineSegment.prototype ); - StepLineSegment.prototype.constructor = StepLineSegment; - - StepLineSegment.prototype.points = function points () { - return this.calculateStepPoints(this.linePoints); - }; - - return StepLineSegment; -}(__WEBPACK_IMPORTED_MODULE_0__line_segment__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])(StepLineSegment.prototype, __WEBPACK_IMPORTED_MODULE_1__step_line_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (StepLineSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/mixins/clip-animation-mixin.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__animations_clip_animation__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/animations/clip-animation.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_any_has_z_index__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/any-has-z-index.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var ClipAnimationMixin = { - createAnimation: function() { - var root = this.getRoot(); - if (root && (root.options || {}).transitions !== false) { - var box = root.box; - var clipPath = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(box.toRect()); - this.visual.clip(clipPath); - this.animation = new __WEBPACK_IMPORTED_MODULE_1__animations_clip_animation__["a" /* default */](clipPath, { - box: box - }); - if (Object(__WEBPACK_IMPORTED_MODULE_2__utils_any_has_z_index__["a" /* default */])(this.options.series)) { - this._setChildrenAnimation(clipPath); - } - } - }, - - _setChildrenAnimation: function(clipPath) { - var points = this.animationPoints(); - - for (var idx = 0; idx < points.length; idx++) { - var point = points[idx]; - if (point && point.visual && Object(__WEBPACK_IMPORTED_MODULE_3__common__["l" /* defined */])(point.visual.options.zIndex)) { - point.visual.clip(clipPath); - } - } - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (ClipAnimationMixin); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/mixins/line-chart-mixin.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var LineChartMixin = { - renderSegments: function() { - var this$1 = this; - - var ref = this; - var options = ref.options; - var seriesPoints = ref.seriesPoints; - var series = options.series; - var seriesCount = seriesPoints.length; - var lastSegment; - - this._segments = []; - - for (var seriesIx = 0; seriesIx < seriesCount; seriesIx++) { - var currentSeries = series[seriesIx]; - var sortedPoints = this$1.sortPoints(seriesPoints[seriesIx]); - var pointCount = sortedPoints.length; - var linePoints = []; - - for (var pointIx = 0; pointIx < pointCount; pointIx++) { - var point = sortedPoints[pointIx]; - if (point) { - linePoints.push(point); - } else if (this$1.seriesMissingValues(currentSeries) !== __WEBPACK_IMPORTED_MODULE_0__constants__["A" /* INTERPOLATE */]) { - if (linePoints.length > 1) { - lastSegment = this$1.createSegment( - linePoints, currentSeries, seriesIx, lastSegment - ); - this$1._addSegment(lastSegment); - } - linePoints = []; - } - } - - if (linePoints.length > 1) { - lastSegment = this$1.createSegment( - linePoints, currentSeries, seriesIx, lastSegment - ); - this$1._addSegment(lastSegment); - } - } - - this.children.unshift.apply(this.children, this._segments); - }, - - _addSegment: function(segment) { - this._segments.push(segment); - segment.parent = this; - }, - - sortPoints: function(points) { - return points; - }, - - seriesMissingValues: function(series) { - var missingValues = series.missingValues; - var assumeZero = !missingValues && this.options.isStacked; - - return assumeZero ? __WEBPACK_IMPORTED_MODULE_0__constants__["_19" /* ZERO */] : missingValues || __WEBPACK_IMPORTED_MODULE_0__constants__["A" /* INTERPOLATE */]; - }, - - getNearestPoint: function(x, y, seriesIx) { - var target = new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](x, y); - var allPoints = this.seriesPoints[seriesIx]; - var nearestPointDistance = __WEBPACK_IMPORTED_MODULE_2__common_constants__["s" /* MAX_VALUE */]; - var nearestPoint; - - for (var i = 0; i < allPoints.length; i++) { - var point = allPoints[i]; - - if (point && Object(__WEBPACK_IMPORTED_MODULE_3__common__["l" /* defined */])(point.value) && point.value !== null && point.visible !== false) { - var pointBox = point.box; - var pointDistance = pointBox.center().distanceTo(target); - - if (pointDistance < nearestPointDistance) { - nearestPoint = point; - nearestPointDistance = pointDistance; - } - } - } - - return nearestPoint; - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (LineChartMixin); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/mixins/note-mixin.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - -var NoteMixin = { - createNote: function() { - var options = this.options.notes; - var text = this.noteText || options.label.text; - - if (options.visible !== false && Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(text) && text !== null) { - this.note = new __WEBPACK_IMPORTED_MODULE_0__core__["j" /* Note */]({ - value: this.value, - text: text, - dataItem: this.dataItem, - category: this.category, - series: this.series - }, this.options.notes, this.owner.chartService); - - this.append(this.note); - } - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (NoteMixin); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/mixins/pie-chart-mixin.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils.js"); - - - -var PieChartMixin = { - createLegendItem: function(value, point, options) { - var legendOptions = this.options.legend || {}; - var labelsOptions = legendOptions.labels || {}; - var inactiveItems = legendOptions.inactiveItems || {}; - var inactiveItemsLabels = inactiveItems.labels || {}; - - if (options && options.visibleInLegend !== false) { - var pointVisible = options.visible !== false; - var labelTemplate = pointVisible ? Object(__WEBPACK_IMPORTED_MODULE_0__common__["t" /* getTemplate */])(labelsOptions) : - Object(__WEBPACK_IMPORTED_MODULE_0__common__["t" /* getTemplate */])(inactiveItemsLabels) || Object(__WEBPACK_IMPORTED_MODULE_0__common__["t" /* getTemplate */])(labelsOptions); - var text = options.category; - - if (labelTemplate) { - text = labelTemplate({ - text: text, - series: options.series, - dataItem: options.dataItem, - percentage: options.percentage, - value: value - }); - } - - var itemLabelOptions, markerColor; - if (pointVisible) { - itemLabelOptions = {}; - markerColor = point.color; - } else { - itemLabelOptions = { - color: inactiveItemsLabels.color, - font: inactiveItemsLabels.font - }; - markerColor = (inactiveItems.markers || {}).color; - } - - if (Object(__WEBPACK_IMPORTED_MODULE_1__utils__["j" /* hasValue */])(text) && text !== "") { - this.legendItems.push({ - pointIndex: options.index, - text: text, - series: options.series, - markerColor: markerColor, - labels: itemLabelOptions - }); - } - } - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (PieChartMixin); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/mixins/plotarea-events-mixin.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); - - -var PlotAreaEventsMixin = { - hover: function(chart, e) { - this._dispatchEvent(chart, e, __WEBPACK_IMPORTED_MODULE_0__constants__["M" /* PLOT_AREA_HOVER */]); - }, - - click: function(chart, e) { - this._dispatchEvent(chart, e, __WEBPACK_IMPORTED_MODULE_0__constants__["L" /* PLOT_AREA_CLICK */]); - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (PlotAreaEventsMixin); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/mixins/point-events-mixin.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - -var PointEventsMixin = { - click: function(chart, e) { - return chart.trigger( - __WEBPACK_IMPORTED_MODULE_0__constants__["_2" /* SERIES_CLICK */], - this.eventArgs(e) - ); - }, - - hover: function(chart, e) { - return chart.trigger( - __WEBPACK_IMPORTED_MODULE_0__constants__["_3" /* SERIES_HOVER */], - this.eventArgs(e) - ); - }, - - eventArgs: function(e) { - return { - value: this.value, - percentage: this.percentage, - stackValue: this.stackValue, - category: this.category, - series: this.series, - dataItem: this.dataItem, - runningTotal: this.runningTotal, - total: this.total, - element: Object(__WEBPACK_IMPORTED_MODULE_1__common__["r" /* eventElement */])(e), - originalEvent: e, - point: this - }; - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (PointEventsMixin); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/ohlc-chart/ohlc-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__candlestick_chart_candlestick_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/candlestick-chart/candlestick-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ohlc_point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/ohlc-chart/ohlc-point.js"); - - - -var OHLCChart = (function (CandlestickChart) { - function OHLCChart () { - CandlestickChart.apply(this, arguments); - } - - if ( CandlestickChart ) OHLCChart.__proto__ = CandlestickChart; - OHLCChart.prototype = Object.create( CandlestickChart && CandlestickChart.prototype ); - OHLCChart.prototype.constructor = OHLCChart; - - OHLCChart.prototype.pointType = function pointType () { - return __WEBPACK_IMPORTED_MODULE_1__ohlc_point__["a" /* default */]; - }; - - return OHLCChart; -}(__WEBPACK_IMPORTED_MODULE_0__candlestick_chart_candlestick_chart__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (OHLCChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/ohlc-chart/ohlc-point.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__candlestick_chart_candlestick__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/candlestick-chart/candlestick.js"); - - -var OHLCPoint = (function (Candlestick) { - function OHLCPoint () { - Candlestick.apply(this, arguments); - } - - if ( Candlestick ) OHLCPoint.__proto__ = Candlestick; - OHLCPoint.prototype = Object.create( Candlestick && Candlestick.prototype ); - OHLCPoint.prototype.constructor = OHLCPoint; - - OHLCPoint.prototype.reflow = function reflow (box) { - var ref = this; - var options = ref.options; - var value = ref.value; - var chart = ref.owner; - var valueAxis = chart.seriesValueAxis(options); - var oPoints = []; - var cPoints = []; - var lhPoints = []; - - var lhSlot = valueAxis.getSlot(value.low, value.high); - var oSlot = valueAxis.getSlot(value.open, value.open); - var cSlot = valueAxis.getSlot(value.close, value.close); - - oSlot.x1 = cSlot.x1 = lhSlot.x1 = box.x1; - oSlot.x2 = cSlot.x2 = lhSlot.x2 = box.x2; - - var mid = lhSlot.center().x; - - oPoints.push([ oSlot.x1, oSlot.y1 ]); - oPoints.push([ mid, oSlot.y1 ]); - cPoints.push([ mid, cSlot.y1 ]); - cPoints.push([ cSlot.x2, cSlot.y1 ]); - lhPoints.push([ mid, lhSlot.y1 ]); - lhPoints.push([ mid, lhSlot.y2 ]); - - this.lines = [ - oPoints, cPoints, lhPoints - ]; - - this.box = lhSlot.clone().wrap(oSlot.clone().wrap(cSlot)); - - this.reflowNote(); - }; - - OHLCPoint.prototype.createBody = function createBody () {}; - - return OHLCPoint; -}(__WEBPACK_IMPORTED_MODULE_0__candlestick_chart_candlestick__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (OHLCPoint); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/accept-key.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = acceptKey; -function acceptKey(e, mouseKey) { - var key = (mouseKey || "").toLowerCase(); - var event = e.event; - var accept = (key === "none" && !(event.ctrlKey || event.shiftKey || event.altKey)) || event[key + "Key"]; - - return accept; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/mousewheel-zoom.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_chart_axis_ranges__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/to-chart-axis-ranges.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var MousewheelZoom = (function (Class) { - function MousewheelZoom(chart, options) { - Class.call(this); - - this.chart = chart; - this.options = Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])({}, this.options, options); - } - - if ( Class ) MousewheelZoom.__proto__ = Class; - MousewheelZoom.prototype = Object.create( Class && Class.prototype ); - MousewheelZoom.prototype.constructor = MousewheelZoom; - - MousewheelZoom.prototype.updateRanges = function updateRanges (delta) { - var lock = (this.options.lock || "").toLowerCase(); - var axisRanges = []; - var axes = this.chart._plotArea.axes; - - for (var idx = 0; idx < axes.length; idx++) { - var axis = axes[idx]; - var vertical = axis.options.vertical; - - if (!(lock === __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */] && !vertical) && !(lock === __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */] && vertical)) { - var range = axis.zoomRange(-delta); - - if (range) { - axisRanges.push({ - axis: axis, - range: range - }); - } - } - } - - this.axisRanges = axisRanges; - return Object(__WEBPACK_IMPORTED_MODULE_0__to_chart_axis_ranges__["a" /* default */])(axisRanges); - }; - - MousewheelZoom.prototype.zoom = function zoom () { - var axisRanges = this.axisRanges; - if (axisRanges && axisRanges.length) { - var plotArea = this.chart._plotArea; - for (var idx = 0; idx < axisRanges.length; idx++) { - var axisRange = axisRanges[idx]; - plotArea.updateAxisOptions(axisRange.axis, axisRange.range); - } - plotArea.redraw(plotArea.panes); - } - }; - - MousewheelZoom.prototype.destroy = function destroy () { - delete this.chart; - }; - - return MousewheelZoom; -}(__WEBPACK_IMPORTED_MODULE_2__common__["a" /* Class */])); - -/* harmony default export */ __webpack_exports__["a"] = (MousewheelZoom); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/pannable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__accept_key__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/accept-key.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__to_chart_axis_ranges__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/to-chart-axis-ranges.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var Pannable = (function (Class) { - function Pannable(plotArea, options) { - Class.call(this); - - this.plotArea = plotArea; - this.options = Object(__WEBPACK_IMPORTED_MODULE_3__common__["k" /* deepExtend */])({}, this.options, options); - } - - if ( Class ) Pannable.__proto__ = Class; - Pannable.prototype = Object.create( Class && Class.prototype ); - Pannable.prototype.constructor = Pannable; - - Pannable.prototype.start = function start (e) { - this._active = Object(__WEBPACK_IMPORTED_MODULE_0__accept_key__["a" /* default */])(e, this.options.key); - return this._active; - }; - - Pannable.prototype.move = function move (e) { - if (this._active) { - var axisRanges = this.axisRanges = this._panAxes(e, __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]).concat(this._panAxes(e, __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */])); - if (axisRanges.length) { - this.axisRanges = axisRanges; - return Object(__WEBPACK_IMPORTED_MODULE_1__to_chart_axis_ranges__["a" /* default */])(axisRanges); - } - } - }; - - Pannable.prototype.end = function end () { - var active = this._active; - this._active = false; - - return active; - }; - - Pannable.prototype.pan = function pan () { - var ref = this; - var plotArea = ref.plotArea; - var axisRanges = ref.axisRanges; - if (axisRanges.length) { - for (var idx = 0; idx < axisRanges.length; idx++) { - var range = axisRanges[idx]; - plotArea.updateAxisOptions(range.axis, range.range); - } - plotArea.redraw(plotArea.panes); - } - }; - - Pannable.prototype.destroy = function destroy () { - delete this.plotArea; - }; - - Pannable.prototype._panAxes = function _panAxes (e, position) { - var plotArea = this.plotArea; - var delta = -e[position].delta; - var lock = (this.options.lock || "").toLowerCase(); - var updatedAxes = []; - - if (delta !== 0 && (lock || "").toLowerCase() !== position) { - var axes = plotArea.axes; - for (var idx = 0; idx < axes.length; idx++) { - var axis = axes[idx]; - - if (position === __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */] && !axis.options.vertical || position === __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] && axis.options.vertical) { - var range = axis.pan(delta); - - if (range) { - range.limitRange = true; - updatedAxes.push({ - axis: axis, - range: range - }); - } - } - } - } - - return updatedAxes; - }; - - return Pannable; -}(__WEBPACK_IMPORTED_MODULE_3__common__["a" /* Class */])); - -Pannable.prototype.options = { - key: "none", - lock: "none" -}; - -/* harmony default export */ __webpack_exports__["a"] = (Pannable); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/to-chart-axis-ranges.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = toChartAxisRanges; -function toChartAxisRanges(axisRanges) { - var ranges = {}; - for (var idx = 0; idx < axisRanges.length; idx++) { - var axisRange = axisRanges[idx]; - if (axisRange.axis.options.name) { - ranges[axisRange.axis.options.name] = { - min: axisRange.range.min, - max: axisRange.range.max - }; - } - } - return ranges; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/zoom-selection.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__accept_key__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/accept-key.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__to_chart_axis_ranges__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pan-and-zoom/to-chart-axis-ranges.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var ZoomSelection = (function (Class) { - function ZoomSelection(chart, options) { - Class.call(this); - - this.chart = chart; - this.options = Object(__WEBPACK_IMPORTED_MODULE_3__common__["k" /* deepExtend */])({}, this.options, options); - this.createElement(); - } - - if ( Class ) ZoomSelection.__proto__ = Class; - ZoomSelection.prototype = Object.create( Class && Class.prototype ); - ZoomSelection.prototype.constructor = ZoomSelection; - - ZoomSelection.prototype.createElement = function createElement () { - var marquee = this._marquee = document.createElement("div"); - marquee.className = "k-marquee"; - var marqueeColor = document.createElement("div"); - marqueeColor.className = "k-marquee-color"; - marquee.appendChild(marqueeColor); - }; - - ZoomSelection.prototype.removeElement = function removeElement () { - if (this._marquee.parentNode) { - this._marquee.parentNode.removeChild(this._marquee); - } - }; - - ZoomSelection.prototype.setStyles = function setStyles (styles) { - Object(__WEBPACK_IMPORTED_MODULE_3__common__["p" /* elementStyles */])(this._marquee, styles); - }; - - ZoomSelection.prototype.start = function start (e) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__accept_key__["a" /* default */])(e, this.options.key)) { - var chart = this.chart; - var point = chart._eventCoordinates(e); - var zoomPane = this._zoomPane = chart._plotArea.paneByPoint(point); - if (zoomPane && zoomPane.clipBox()) { - var clipBox = zoomPane.clipBox().clone(); - var offset = this._elementOffset(); - - clipBox.translate(offset.left, offset.top); - this._zoomPaneClipBox = clipBox; - - document.body.appendChild(this._marquee); - this.setStyles({ - left: e.pageX + 1, - top: e.pageY + 1, - width: 0, - height: 0 - }); - - return true; - } - } - return false; - }; - - ZoomSelection.prototype._elementOffset = function _elementOffset () { - var chartElement = this.chart.element; - var ref = Object(__WEBPACK_IMPORTED_MODULE_3__common__["p" /* elementStyles */])(chartElement, [ "paddingLeft", "paddingTop" ]); - var paddingLeft = ref.paddingLeft; - var paddingTop = ref.paddingTop; - var offset = Object(__WEBPACK_IMPORTED_MODULE_3__common__["n" /* elementOffset */])(chartElement); - - return { - left: paddingLeft + offset.left, - top: paddingTop + offset.top - }; - }; - - ZoomSelection.prototype.move = function move (e) { - var zoomPane = this._zoomPane; - if (zoomPane) { - this.setStyles(this._selectionPosition(e)); - } - }; - - ZoomSelection.prototype.end = function end (e) { - var zoomPane = this._zoomPane; - if (zoomPane) { - var elementOffset = this._elementOffset(); - var selectionPosition = this._selectionPosition(e); - selectionPosition.left -= elementOffset.left; - selectionPosition.top -= elementOffset.top; - - var start = { x: selectionPosition.left, y: selectionPosition.top }; - var end = { x: selectionPosition.left + selectionPosition.width, y: selectionPosition.top + selectionPosition.height }; - this._updateAxisRanges(start, end); - - this.removeElement(); - delete this._zoomPane; - - return Object(__WEBPACK_IMPORTED_MODULE_1__to_chart_axis_ranges__["a" /* default */])(this.axisRanges); - } - }; - - ZoomSelection.prototype.zoom = function zoom () { - var axisRanges = this.axisRanges; - if (axisRanges && axisRanges.length) { - var plotArea = this.chart._plotArea; - for (var idx = 0; idx < axisRanges.length; idx++) { - var axisRange = axisRanges[idx]; - plotArea.updateAxisOptions(axisRange.axis, axisRange.range); - } - plotArea.redraw(plotArea.panes); - } - }; - - ZoomSelection.prototype.destroy = function destroy () { - this.removeElement(); - delete this._marquee; - delete this.chart; - }; - - ZoomSelection.prototype._updateAxisRanges = function _updateAxisRanges (start, end) { - var lock = (this.options.lock || "").toLowerCase(); - var axisRanges = []; - - var axes = this._zoomPane.axes; - for (var idx = 0; idx < axes.length; idx++) { - var axis = axes[idx]; - var vertical = axis.options.vertical; - if (!(lock === __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */] && !vertical) && !(lock === __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] && vertical)) { - var range = axis.pointsRange(start, end); - if (range) { - axisRanges.push({ - axis: axis, - range: range - }); - } - } - } - - this.axisRanges = axisRanges; - }; - - ZoomSelection.prototype._selectionPosition = function _selectionPosition (e) { - var clipBox = this._zoomPaneClipBox; - var startLocation = { - x: e.x.startLocation, - y: e.y.startLocation - }; - var pageX = e.x.location; - var pageY = e.y.location; - var lock = (this.options.lock || "").toLowerCase(); - var left = Math.min(startLocation.x, pageX); - var top = Math.min(startLocation.y, pageY); - var width = Math.abs(startLocation.x - pageX); - var height = Math.abs(startLocation.y - pageY); - - if (lock === __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]) { - left = clipBox.x1; - width = clipBox.width(); - } - if (lock === __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */]) { - top = clipBox.y1; - height = clipBox.height(); - } - - if (pageX > clipBox.x2) { - width = clipBox.x2 - startLocation.x; - } - - if (pageX < clipBox.x1) { - width = startLocation.x - clipBox.x1; - } - - if (pageY > clipBox.y2) { - height = clipBox.y2 - startLocation.y; - } - - if (pageY < clipBox.y1) { - height = startLocation.y - clipBox.y1; - } - - return { - left: Math.max(left, clipBox.x1), - top: Math.max(top, clipBox.y1), - width: width, - height: height - }; - }; - - return ZoomSelection; -}(__WEBPACK_IMPORTED_MODULE_3__common__["a" /* Class */])); - -ZoomSelection.prototype.options = { - key: "shift", - lock: "none" -}; - -/* harmony default export */ __webpack_exports__["a"] = (ZoomSelection); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/pane.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__chart_container__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/chart-container.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var Pane = (function (BoxElement) { - function Pane(options) { - BoxElement.call(this, options); - - this.id = paneID(); - - this.createTitle(); - - this.content = new __WEBPACK_IMPORTED_MODULE_0__core__["d" /* ChartElement */](); - - this.chartContainer = new __WEBPACK_IMPORTED_MODULE_1__chart_container__["a" /* default */]({}, this); - this.append(this.content); - - this.axes = []; - this.charts = []; - } - - if ( BoxElement ) Pane.__proto__ = BoxElement; - Pane.prototype = Object.create( BoxElement && BoxElement.prototype ); - Pane.prototype.constructor = Pane; - - Pane.prototype.createTitle = function createTitle () { - var titleOptions = this.options.title; - if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["C" /* isObject */])(titleOptions)) { - titleOptions = Object(__WEBPACK_IMPORTED_MODULE_3__common__["k" /* deepExtend */])({}, titleOptions, { - align: titleOptions.position, - position: __WEBPACK_IMPORTED_MODULE_2__common_constants__["B" /* TOP */] - }); - } - - this.title = __WEBPACK_IMPORTED_MODULE_0__core__["v" /* Title */].buildTitle(titleOptions, this, Pane.prototype.options.title); - }; - - Pane.prototype.appendAxis = function appendAxis (axis) { - this.content.append(axis); - this.axes.push(axis); - axis.pane = this; - }; - - Pane.prototype.appendChart = function appendChart (chart) { - if (this.chartContainer.parent !== this.content) { - this.content.append(this.chartContainer); - } - - this.charts.push(chart); - this.chartContainer.append(chart); - chart.pane = this; - }; - - Pane.prototype.empty = function empty () { - var this$1 = this; - - var plotArea = this.parent; - - if (plotArea) { - for (var i = 0; i < this.axes.length; i++) { - plotArea.removeAxis(this$1.axes[i]); - } - - for (var i$1 = 0; i$1 < this.charts.length; i$1++) { - plotArea.removeChart(this$1.charts[i$1]); - } - } - - this.axes = []; - this.charts = []; - - this.content.destroy(); - this.content.children = []; - this.chartContainer.children = []; - }; - - Pane.prototype.reflow = function reflow (targetBox) { - // Content (such as charts) is rendered, but excluded from reflows - var content; - if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["E" /* last */])(this.children) === this.content) { - content = this.children.pop(); - } - - BoxElement.prototype.reflow.call(this, targetBox); - - if (content) { - this.children.push(content); - } - - if (this.title) { - this.contentBox.y1 += this.title.box.height(); - } - }; - - Pane.prototype.visualStyle = function visualStyle () { - var style = BoxElement.prototype.visualStyle.call(this); - style.zIndex = -10; - - return style; - }; - - Pane.prototype.renderComplete = function renderComplete () { - if (this.options.visible) { - this.createGridLines(); - } - }; - - Pane.prototype.stackRoot = function stackRoot () { - return this; - }; - - Pane.prototype.clipRoot = function clipRoot () { - return this; - }; - - Pane.prototype.createGridLines = function createGridLines () { - var axes = this.axes; - var allAxes = axes.concat(this.parent.axes); - var vGridLines = []; - var hGridLines = []; - - // TODO - // Is full combination really necessary? - for (var i = 0; i < axes.length; i++) { - var axis = axes[i]; - var vertical = axis.options.vertical; - var gridLines = vertical ? vGridLines : hGridLines; - for (var j = 0; j < allAxes.length; j++) { - if (gridLines.length === 0) { - var altAxis = allAxes[j]; - if (vertical !== altAxis.options.vertical) { - Object(__WEBPACK_IMPORTED_MODULE_3__common__["g" /* append */])(gridLines, axis.createGridLines(altAxis)); - } - } - } - } - }; - - Pane.prototype.refresh = function refresh () { - this.visual.clear(); - - this.content.parent = null; - this.content.createGradient = this.createGradient.bind(this); - this.content.renderVisual(); - this.content.parent = this; - - if (this.title) { - this.visual.append(this.title.visual); - } - - this.visual.append(this.content.visual); - - this.renderComplete(); - }; - - Pane.prototype.chartsBox = function chartsBox () { - var axes = this.axes; - var length = axes.length; - var chartsBox = new __WEBPACK_IMPORTED_MODULE_0__core__["a" /* Box */](); - - for (var idx = 0; idx < length; idx++) { - var axis = axes[idx]; - var axisValueField = axis.options.vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - var lineBox = axis.lineBox(); - chartsBox[axisValueField + 1] = lineBox[axisValueField + 1]; - chartsBox[axisValueField + 2] = lineBox[axisValueField + 2]; - } - - if (chartsBox.x2 === 0) { - var allAxes = this.parent.axes; - var length$1 = allAxes.length; - - for (var idx$1 = 0; idx$1 < length$1; idx$1++) { - var axis$1 = allAxes[idx$1]; - if (!axis$1.options.vertical) { - var lineBox$1 = axis$1.lineBox(); - chartsBox.x1 = lineBox$1.x1; - chartsBox.x2 = lineBox$1.x2; - } - } - } - return chartsBox; - }; - - Pane.prototype.clipBox = function clipBox () { - return this.chartContainer.clipBox; - }; - - return Pane; -}(__WEBPACK_IMPORTED_MODULE_0__core__["b" /* BoxElement */])); - -var ID = 1; - -function paneID() { - return "pane" + ID++; -} - -Pane.prototype.isStackRoot = true; - -Object(__WEBPACK_IMPORTED_MODULE_3__common__["M" /* setDefaultOptions */])(Pane, { - zIndex: -1, - shrinkToFit: true, - title: { - align: __WEBPACK_IMPORTED_MODULE_2__common_constants__["r" /* LEFT */] - }, - visible: true -}); - -/* harmony default export */ __webpack_exports__["a"] = (Pane); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/pie-chart/pie-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__pie_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pie-chart/pie-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_pie_chart_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/pie-chart-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - -var PIE_SECTOR_ANIM_DELAY = 70; - -var PieChart = (function (ChartElement) { - function PieChart(plotArea, options) { - ChartElement.call(this, options); - - this.plotArea = plotArea; - this.chartService = plotArea.chartService; - this.points = []; - this.legendItems = []; - this.render(); - } - - if ( ChartElement ) PieChart.__proto__ = ChartElement; - PieChart.prototype = Object.create( ChartElement && ChartElement.prototype ); - PieChart.prototype.constructor = PieChart; - - PieChart.prototype.render = function render () { - this.traverseDataPoints(this.addValue.bind(this)); - }; - - PieChart.prototype.traverseDataPoints = function traverseDataPoints (callback) { - var this$1 = this; - - var ref = this; - var options = ref.options; - var seriesColors = ref.plotArea.options.seriesColors; if ( seriesColors === void 0 ) seriesColors = []; - var colorsCount = seriesColors.length; - var series = options.series; - var seriesCount = series.length; - - for (var seriesIx = 0; seriesIx < seriesCount; seriesIx++) { - var currentSeries = series[seriesIx]; - var data = currentSeries.data; - var ref$1 = Object(__WEBPACK_IMPORTED_MODULE_5__utils__["b" /* bindSegments */])(currentSeries); - var total = ref$1.total; - var points = ref$1.points; - var count = ref$1.count; - var anglePerValue = 360 / total; - var constantAngle = (void 0); - if (!isFinite(anglePerValue)) { - constantAngle = 360 / count; - } - var currentAngle = (void 0); - - if (Object(__WEBPACK_IMPORTED_MODULE_7__common__["l" /* defined */])(currentSeries.startAngle)) { - currentAngle = currentSeries.startAngle; - } else { - currentAngle = options.startAngle; - } - - if (seriesIx !== seriesCount - 1) { - if (currentSeries.labels.position === __WEBPACK_IMPORTED_MODULE_4__constants__["J" /* OUTSIDE_END */]) { - currentSeries.labels.position = __WEBPACK_IMPORTED_MODULE_6__common_constants__["e" /* CENTER */]; - } - } - - for (var i = 0; i < points.length; i++) { - var pointData = points[i]; - if (!pointData) { - continue; - } - - var fields = pointData.fields; - var value = pointData.value; - var visible = pointData.visible; - var angle = value !== 0 ? (constantAngle || (value * anglePerValue)) : 0; - var explode = data.length !== 1 && Boolean(fields.explode); - - if (!Object(__WEBPACK_IMPORTED_MODULE_7__common__["A" /* isFunction */])(currentSeries.color)) { - currentSeries.color = fields.color || seriesColors[i % colorsCount]; - } - - callback(pointData.valueFields.value, new __WEBPACK_IMPORTED_MODULE_3__core__["q" /* Ring */](null, 0, 0, currentAngle, angle), { - owner: this$1, - category: Object(__WEBPACK_IMPORTED_MODULE_7__common__["l" /* defined */])(fields.category) ? fields.category : "", - index: i, - series: currentSeries, - seriesIx: seriesIx, - dataItem: data[i], - percentage: total !== 0 ? value / total : 0, - explode: explode, - visibleInLegend: fields.visibleInLegend, - visible: visible, - zIndex: seriesCount - seriesIx, - animationDelay: this$1.animationDelay(i, seriesIx, seriesCount) - }); - - if (visible !== false) { - currentAngle += angle; - } - } - } - }; - - PieChart.prototype.evalSegmentOptions = function evalSegmentOptions (options, value, fields) { - var series = fields.series; - - Object(__WEBPACK_IMPORTED_MODULE_5__utils__["f" /* evalOptions */])(options, { - value: value, - series: series, - dataItem: fields.dataItem, - category: fields.category, - percentage: fields.percentage - }, { defaults: series._defaults, excluded: [ "data", "content", "template", "visual", "toggle" ] }); - }; - - PieChart.prototype.addValue = function addValue (value, sector, fields) { - var segmentOptions = Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])({}, fields.series, { index: fields.index }); - this.evalSegmentOptions(segmentOptions, value, fields); - - this.createLegendItem(value, segmentOptions, fields); - - if (fields.visible === false) { - return; - } - - var segment = new __WEBPACK_IMPORTED_MODULE_1__pie_segment__["a" /* default */](value, sector, segmentOptions); - Object.assign(segment, fields); - this.append(segment); - this.points.push(segment); - }; - - PieChart.prototype.reflow = function reflow (targetBox) { - var ref = this; - var options = ref.options; - var points = ref.points; - var seriesConfigs = ref.seriesConfigs; if ( seriesConfigs === void 0 ) seriesConfigs = []; - var count = points.length; - var box = targetBox.clone(); - var space = 5; - var minWidth = Math.min(box.width(), box.height()); - var halfMinWidth = minWidth / 2; - var defaultPadding = minWidth - minWidth * 0.85; - var newBox = new __WEBPACK_IMPORTED_MODULE_3__core__["a" /* Box */](box.x1, box.y1, box.x1 + minWidth, box.y1 + minWidth); - var newBoxCenter = newBox.center(); - var boxCenter = box.center(); - var seriesCount = options.series.length; - var leftSideLabels = []; - var rightSideLabels = []; - var padding = Object(__WEBPACK_IMPORTED_MODULE_7__common__["Q" /* valueOrDefault */])(options.padding, defaultPadding); - - padding = padding > halfMinWidth - space ? halfMinWidth - space : padding; - newBox.translate(boxCenter.x - newBoxCenter.x, boxCenter.y - newBoxCenter.y); - - var radius = halfMinWidth - padding; - var center = new __WEBPACK_IMPORTED_MODULE_3__core__["l" /* Point */]( - radius + newBox.x1 + padding, - radius + newBox.y1 + padding - ); - - for (var i = 0; i < count; i++) { - var segment = points[i]; - var sector = segment.sector; - var seriesIndex = segment.seriesIx; - sector.radius = radius; - sector.center = center; - - if (seriesConfigs.length) { - var seriesConfig = seriesConfigs[seriesIndex]; - sector.innerRadius = seriesConfig.innerRadius; - sector.radius = seriesConfig.radius; - } - - if (seriesIndex === seriesCount - 1 && segment.explode) { - sector.center = sector.clone().setRadius(sector.radius * 0.15).point(sector.middle()); - } - - segment.reflow(newBox); - - var label = segment.label; - if (label) { - if (label.options.position === __WEBPACK_IMPORTED_MODULE_4__constants__["J" /* OUTSIDE_END */]) { - if (seriesIndex === seriesCount - 1) { - if (label.orientation === __WEBPACK_IMPORTED_MODULE_6__common_constants__["z" /* RIGHT */]) { - rightSideLabels.push(label); - } else { - leftSideLabels.push(label); - } - } - } - } - } - - if (leftSideLabels.length > 0) { - leftSideLabels.sort(this.labelComparator(true)); - this.leftLabelsReflow(leftSideLabels); - } - - if (rightSideLabels.length > 0) { - rightSideLabels.sort(this.labelComparator(false)); - this.rightLabelsReflow(rightSideLabels); - } - - this.box = newBox; - }; - - PieChart.prototype.leftLabelsReflow = function leftLabelsReflow (labels) { - var distances = this.distanceBetweenLabels(labels); - - this.distributeLabels(distances, labels); - }; - - PieChart.prototype.rightLabelsReflow = function rightLabelsReflow (labels) { - var distances = this.distanceBetweenLabels(labels); - - this.distributeLabels(distances, labels); - }; - - PieChart.prototype.distanceBetweenLabels = function distanceBetweenLabels (labels) { - var segment = Object(__WEBPACK_IMPORTED_MODULE_7__common__["E" /* last */])(this.points); - var sector = segment.sector; - var count = labels.length - 1; - var lr = sector.radius + segment.options.labels.distance; - var distances = []; - var firstBox = labels[0].box; - var distance = Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(firstBox.y1 - (sector.center.y - lr - firstBox.height() - firstBox.height() / 2)); - - distances.push(distance); - - for (var i = 0; i < count; i++) { - var secondBox = labels[i + 1].box; - - firstBox = labels[i].box; - distance = Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(secondBox.y1 - firstBox.y2); - distances.push(distance); - } - distance = Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(sector.center.y + lr - labels[count].box.y2 - labels[count].box.height() / 2); - distances.push(distance); - - return distances; - }; - - PieChart.prototype.distributeLabels = function distributeLabels (distances, labels) { - var this$1 = this; - - var count = distances.length; - var left, right, remaining; - - for (var i = 0; i < count; i++) { - remaining = -distances[i]; - left = right = i; - - while (remaining > 0 && (left >= 0 || right < count)) { - remaining = this$1._takeDistance(distances, i, --left, remaining); - remaining = this$1._takeDistance(distances, i, ++right, remaining); - } - } - - this.reflowLabels(distances, labels); - }; - - PieChart.prototype._takeDistance = function _takeDistance (distances, anchor, position, amount) { - var result = amount; - if (distances[position] > 0) { - var available = Math.min(distances[position], result); - result -= available; - distances[position] -= available; - distances[anchor] += available; - } - - return result; - }; - - PieChart.prototype.reflowLabels = function reflowLabels (distances, labels) { - var this$1 = this; - - var segment = Object(__WEBPACK_IMPORTED_MODULE_7__common__["E" /* last */])(this.points); - var sector = segment.sector; - var labelOptions = segment.options.labels; - var labelsCount = labels.length; - var labelDistance = labelOptions.distance; - var boxY = sector.center.y - (sector.radius + labelDistance) - labels[0].box.height(); - var boxX; - - distances[0] += 2; - for (var i = 0; i < labelsCount; i++) { - var label = labels[i]; - var box = label.box; - - boxY += distances[i]; - boxX = this$1.hAlignLabel( - box.x2, - sector.clone().expand(labelDistance), - boxY, - boxY + box.height(), - label.orientation === __WEBPACK_IMPORTED_MODULE_6__common_constants__["z" /* RIGHT */]); - - if (label.orientation === __WEBPACK_IMPORTED_MODULE_6__common_constants__["z" /* RIGHT */]) { - if (labelOptions.align !== __WEBPACK_IMPORTED_MODULE_6__common_constants__["f" /* CIRCLE */]) { - boxX = sector.radius + sector.center.x + labelDistance; - } - label.reflow(new __WEBPACK_IMPORTED_MODULE_3__core__["a" /* Box */](boxX + box.width(), boxY, boxX, boxY)); - } else { - if (labelOptions.align !== __WEBPACK_IMPORTED_MODULE_6__common_constants__["f" /* CIRCLE */]) { - boxX = sector.center.x - sector.radius - labelDistance; - } - label.reflow(new __WEBPACK_IMPORTED_MODULE_3__core__["a" /* Box */](boxX - box.width(), boxY, boxX, boxY)); - } - - boxY += box.height(); - } - }; - - PieChart.prototype.createVisual = function createVisual () { - var this$1 = this; - - var ref = this; - var connectors = ref.options.connectors; - var points = ref.points; - var count = points.length; - var space = 4; - - ChartElement.prototype.createVisual.call(this); - - this._connectorLines = []; - - for (var i = 0; i < count; i++) { - var segment = points[i]; - var sector = segment.sector; - var label = segment.label; - var angle = sector.middle(); - var connectorsColor = (segment.options.connectors || {}).color || connectors.color; - - if (label) { - var connectorLine = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path({ - stroke: { - color: connectorsColor, - width: connectors.width - }, - animation: { - type: __WEBPACK_IMPORTED_MODULE_4__constants__["s" /* FADEIN */], - delay: segment.animationDelay - } - }); - - if (label.options.position === __WEBPACK_IMPORTED_MODULE_4__constants__["J" /* OUTSIDE_END */]) { - var box = label.box; - var centerPoint = sector.center; - var start = sector.point(angle); - var middle = new __WEBPACK_IMPORTED_MODULE_3__core__["l" /* Point */](box.x1, box.center().y); - var sr = (void 0), end = (void 0), crossing = (void 0); - - start = sector.clone().expand(connectors.padding).point(angle); - connectorLine.moveTo(start.x, start.y); - // TODO: Extract into a method to remove duplication - if (label.orientation === __WEBPACK_IMPORTED_MODULE_6__common_constants__["z" /* RIGHT */]) { - end = new __WEBPACK_IMPORTED_MODULE_3__core__["l" /* Point */](box.x1 - connectors.padding, box.center().y); - crossing = intersection(centerPoint, start, middle, end); - middle = new __WEBPACK_IMPORTED_MODULE_3__core__["l" /* Point */](end.x - space, end.y); - crossing = crossing || middle; - crossing.x = Math.min(crossing.x, middle.x); - - if (this$1.pointInCircle(crossing, sector.center, sector.radius + space) || - crossing.x < sector.center.x) { - sr = sector.center.x + sector.radius + space; - if (segment.options.labels.align !== __WEBPACK_IMPORTED_MODULE_4__constants__["k" /* COLUMN */]) { - if (sr < middle.x) { - connectorLine.lineTo(sr, start.y); - } else { - connectorLine.lineTo(start.x + space * 2, start.y); - } - } else { - connectorLine.lineTo(sr, start.y); - } - connectorLine.lineTo(middle.x, end.y); - } else { - crossing.y = end.y; - connectorLine.lineTo(crossing.x, crossing.y); - } - } else { - end = new __WEBPACK_IMPORTED_MODULE_3__core__["l" /* Point */](box.x2 + connectors.padding, box.center().y); - crossing = intersection(centerPoint, start, middle, end); - middle = new __WEBPACK_IMPORTED_MODULE_3__core__["l" /* Point */](end.x + space, end.y); - crossing = crossing || middle; - crossing.x = Math.max(crossing.x, middle.x); - - if (this$1.pointInCircle(crossing, sector.center, sector.radius + space) || - crossing.x > sector.center.x) { - sr = sector.center.x - sector.radius - space; - if (segment.options.labels.align !== __WEBPACK_IMPORTED_MODULE_4__constants__["k" /* COLUMN */]) { - if (sr > middle.x) { - connectorLine.lineTo(sr, start.y); - } else { - connectorLine.lineTo(start.x - space * 2, start.y); - } - } else { - connectorLine.lineTo(sr, start.y); - } - connectorLine.lineTo(middle.x, end.y); - } else { - crossing.y = end.y; - connectorLine.lineTo(crossing.x, crossing.y); - } - } - - connectorLine.lineTo(end.x, end.y); - - this$1._connectorLines.push(connectorLine); - this$1.visual.append(connectorLine); - } - } - } - }; - - PieChart.prototype.labelComparator = function labelComparator (reverse) { - var reverseValue = reverse ? -1 : 1; - - return function(a, b) { - var first = (a.parent.sector.middle() + 270) % 360; - var second = (b.parent.sector.middle() + 270) % 360; - return (first - second) * reverseValue; - }; - }; - - PieChart.prototype.hAlignLabel = function hAlignLabel (originalX, sector, y1, y2, direction) { - var radius = sector.radius; - var sector_center = sector.center; - var cx = sector_center.x; - var cy = sector_center.y; - var t = Math.min(Math.abs(cy - y1), Math.abs(cy - y2)); - - if (t > radius) { - return originalX; - } - - return cx + Math.sqrt((radius * radius) - (t * t)) * (direction ? 1 : -1); - }; - - PieChart.prototype.pointInCircle = function pointInCircle (point, center, radius) { - return Math.pow(center.x - point.x, 2) + Math.pow(center.y - point.y, 2) < Math.pow(radius, 2); - }; - - PieChart.prototype.formatPointValue = function formatPointValue (point, format) { - return this.chartService.format.auto(format, point.value); - }; - - PieChart.prototype.animationDelay = function animationDelay (categoryIndex) { - return categoryIndex * PIE_SECTOR_ANIM_DELAY; - }; - - return PieChart; -}(__WEBPACK_IMPORTED_MODULE_3__core__["d" /* ChartElement */])); - -function intersection(a1, a2, b1, b2) { - var uat = (b2.x - b1.x) * (a1.y - b1.y) - (b2.y - b1.y) * (a1.x - b1.x); - var ub = (b2.y - b1.y) * (a2.x - a1.x) - (b2.x - b1.x) * (a2.y - a1.y); - - var result; - if (ub !== 0) { - var ua = (uat / ub); - - result = new __WEBPACK_IMPORTED_MODULE_3__core__["l" /* Point */]( - a1.x + ua * (a2.x - a1.x), - a1.y + ua * (a2.y - a1.y) - ); - } - - return result; -} - -Object(__WEBPACK_IMPORTED_MODULE_7__common__["M" /* setDefaultOptions */])(PieChart, { - startAngle: 90, - connectors: { - width: 2, - color: "#939393", - padding: 8 - }, - inactiveItems: { - markers: {}, - labels: {} - } -}); - -Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])(PieChart.prototype, __WEBPACK_IMPORTED_MODULE_2__mixins_pie_chart_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (PieChart); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/pie-chart/pie-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_point_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/point-events-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_has_gradient_overlay__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/has-gradient-overlay.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - -var PieSegment = (function (ChartElement) { - function PieSegment(value, sector, options) { - ChartElement.call(this, options); - - this.value = value; - this.sector = sector; - } - - if ( ChartElement ) PieSegment.__proto__ = ChartElement; - PieSegment.prototype = Object.create( ChartElement && ChartElement.prototype ); - PieSegment.prototype.constructor = PieSegment; - - PieSegment.prototype.render = function render () { - var labels = this.options.labels; - var chartService = this.owner.chartService; - var labelText = this.value; - - if (this._rendered || this.visible === false) { - return; - } - this._rendered = true; - - var labelTemplate = Object(__WEBPACK_IMPORTED_MODULE_6__common__["t" /* getTemplate */])(labels); - if (labelTemplate) { - labelText = labelTemplate({ - dataItem: this.dataItem, - category: this.category, - value: this.value, - series: this.series, - percentage: this.percentage - }); - } else if (labels.format) { - labelText = chartService.format.auto(labels.format, labelText); - } - - if (labels.visible && (labelText || labelText === 0)) { - if (labels.position === __WEBPACK_IMPORTED_MODULE_5__common_constants__["e" /* CENTER */] || labels.position === __WEBPACK_IMPORTED_MODULE_3__constants__["z" /* INSIDE_END */]) { - if (!labels.color) { - var brightnessValue = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["b" /* Color */](this.options.color).percBrightness(); - if (brightnessValue > 180) { - labels.color = __WEBPACK_IMPORTED_MODULE_5__common_constants__["c" /* BLACK */]; - } else { - labels.color = __WEBPACK_IMPORTED_MODULE_5__common_constants__["E" /* WHITE */]; - } - } - if (!labels.background) { - labels.background = this.options.color; - } - } else { - var themeLabels = chartService.theme.seriesDefaults.labels; - labels.color = labels.color || themeLabels.color; - labels.background = labels.background || themeLabels.background; - } - - - this.label = new __WEBPACK_IMPORTED_MODULE_1__core__["u" /* TextBox */](labelText, Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({}, labels, { - align: __WEBPACK_IMPORTED_MODULE_5__common_constants__["e" /* CENTER */], - vAlign: "", - animation: { - type: __WEBPACK_IMPORTED_MODULE_3__constants__["s" /* FADEIN */], - delay: this.animationDelay - } - })); - - this.append(this.label); - } - }; - - PieSegment.prototype.reflow = function reflow (targetBox) { - this.render(); - this.box = targetBox; - this.reflowLabel(); - }; - - PieSegment.prototype.reflowLabel = function reflowLabel () { - var ref = this; - var labelsOptions = ref.options.labels; - var label = ref.label; - var sector = this.sector.clone(); - var labelsDistance = labelsOptions.distance; - var angle = sector.middle(); - - if (label) { - var labelHeight = label.box.height(); - var labelWidth = label.box.width(); - var lp; - - if (labelsOptions.position === __WEBPACK_IMPORTED_MODULE_5__common_constants__["e" /* CENTER */]) { - sector.radius = Math.abs((sector.radius - labelHeight) / 2) + labelHeight; - lp = sector.point(angle); - label.reflow(new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */](lp.x, lp.y - labelHeight / 2, lp.x, lp.y)); - } else if (labelsOptions.position === __WEBPACK_IMPORTED_MODULE_3__constants__["z" /* INSIDE_END */]) { - sector.radius = sector.radius - labelHeight / 2; - lp = sector.point(angle); - label.reflow(new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */](lp.x, lp.y - labelHeight / 2, lp.x, lp.y)); - } else { - var x1; - lp = sector.clone().expand(labelsDistance).point(angle); - if (lp.x >= sector.center.x) { - x1 = lp.x + labelWidth; - label.orientation = __WEBPACK_IMPORTED_MODULE_5__common_constants__["z" /* RIGHT */]; - } else { - x1 = lp.x - labelWidth; - label.orientation = __WEBPACK_IMPORTED_MODULE_5__common_constants__["r" /* LEFT */]; - } - label.reflow(new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */](x1, lp.y - labelHeight, lp.x, lp.y)); - } - } - }; - - PieSegment.prototype.createVisual = function createVisual () { - var this$1 = this; - - var ref = this; - var sector = ref.sector; - var options = ref.options; - - ChartElement.prototype.createVisual.call(this); - - if (this.value) { - if (options.visual) { - var startAngle = (sector.startAngle + 180) % 360; - var visual = options.visual({ - category: this.category, - dataItem: this.dataItem, - value: this.value, - series: this.series, - percentage: this.percentage, - center: new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(sector.center.x, sector.center.y), - radius: sector.radius, - innerRadius: sector.innerRadius, - startAngle: startAngle, - endAngle: startAngle + sector.angle, - options: options, - sender: this.getSender(), - createVisual: function () { - var group = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group(); - this$1.createSegmentVisual(group); - - return group; - } - }); - - if (visual) { - this.visual.append(visual); - } - } else { - this.createSegmentVisual(this.visual); - } - } - }; - - PieSegment.prototype.createSegmentVisual = function createSegmentVisual (group) { - var ref = this; - var sector = ref.sector; - var options = ref.options; - var borderOptions = options.border || {}; - var border = borderOptions.width > 0 ? { - stroke: { - color: borderOptions.color, - width: borderOptions.width, - opacity: borderOptions.opacity, - dashType: borderOptions.dashType - } - } : {}; - var color = options.color; - var fill = { - color: color, - opacity: options.opacity - }; - var visual = this.createSegment(sector, Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({ - fill: fill, - stroke: { - opacity: options.opacity - }, - zIndex: options.zIndex - }, border)); - - group.append(visual); - - if (Object(__WEBPACK_IMPORTED_MODULE_4__utils_has_gradient_overlay__["a" /* default */])(options)) { - group.append(this.createGradientOverlay(visual, { - baseColor: color, - fallbackFill: fill - }, Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({ - center: [ sector.center.x, sector.center.y ], - innerRadius: sector.innerRadius, - radius: sector.radius, - userSpace: true - }, options.overlay))); - } - }; - - PieSegment.prototype.createSegment = function createSegment (sector, options) { - if (options.singleSegment) { - return new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Circle(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Circle(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(sector.center.x, sector.center.y), sector.radius), options); - } - - return __WEBPACK_IMPORTED_MODULE_1__core__["s" /* ShapeBuilder */].current.createRing(sector, options); - }; - - PieSegment.prototype.createAnimation = function createAnimation () { - var ref = this; - var options = ref.options; - var center = ref.sector.center; - - Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])(options, { - animation: { - center: [ center.x, center.y ], - delay: this.animationDelay - } - }); - - ChartElement.prototype.createAnimation.call(this); - }; - - PieSegment.prototype.createHighlight = function createHighlight (options) { - var highlight = this.options.highlight || {}; - var border = highlight.border || {}; - - return this.createSegment(this.sector, Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({}, options, { - fill: { - color: highlight.color, - opacity: highlight.opacity - }, - stroke: { - opacity: border.opacity, - width: border.width, - color: border.color - } - })); - }; - - PieSegment.prototype.highlightVisual = function highlightVisual () { - return this.visual.children[0]; - }; - - PieSegment.prototype.highlightVisualArgs = function highlightVisualArgs () { - var sector = this.sector; - - return { - options: this.options, - radius: sector.radius, - innerRadius: sector.innerRadius, - center: new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(sector.center.x, sector.center.y), - startAngle: sector.startAngle, - endAngle: sector.angle + sector.startAngle, - visual: this.visual - }; - }; - - PieSegment.prototype.tooltipAnchor = function tooltipAnchor () { - var sector = this.sector.clone().expand(__WEBPACK_IMPORTED_MODULE_3__constants__["_8" /* TOOLTIP_OFFSET */]); - var midAndle = sector.middle(); - var midPoint = sector.point(midAndle); - - return { - point: midPoint, - align: tooltipAlignment(midAndle + 180) - }; - }; - - PieSegment.prototype.formatValue = function formatValue (format) { - return this.owner.formatPointValue(this, format); - }; - - return PieSegment; -}(__WEBPACK_IMPORTED_MODULE_1__core__["d" /* ChartElement */])); - -var RAD_30 = Object(__WEBPACK_IMPORTED_MODULE_6__common__["L" /* round */])(Object(__WEBPACK_IMPORTED_MODULE_6__common__["J" /* rad */])(30), __WEBPACK_IMPORTED_MODULE_5__common_constants__["l" /* DEFAULT_PRECISION */]); -var RAD_60 = Object(__WEBPACK_IMPORTED_MODULE_6__common__["L" /* round */])(Object(__WEBPACK_IMPORTED_MODULE_6__common__["J" /* rad */])(60), __WEBPACK_IMPORTED_MODULE_5__common_constants__["l" /* DEFAULT_PRECISION */]); - -function tooltipAlignment(angle) { - var radians = Object(__WEBPACK_IMPORTED_MODULE_6__common__["J" /* rad */])(angle); - var sine = Object(__WEBPACK_IMPORTED_MODULE_6__common__["L" /* round */])(Math.sin(radians), __WEBPACK_IMPORTED_MODULE_5__common_constants__["l" /* DEFAULT_PRECISION */]); - var cosine = Object(__WEBPACK_IMPORTED_MODULE_6__common__["L" /* round */])(Math.cos(radians), __WEBPACK_IMPORTED_MODULE_5__common_constants__["l" /* DEFAULT_PRECISION */]); - - - var horizontal; - if (Math.abs(sine) > RAD_60) { - horizontal = __WEBPACK_IMPORTED_MODULE_5__common_constants__["e" /* CENTER */]; - } else if (cosine < 0) { - horizontal = __WEBPACK_IMPORTED_MODULE_5__common_constants__["z" /* RIGHT */]; - } else { - horizontal = __WEBPACK_IMPORTED_MODULE_5__common_constants__["r" /* LEFT */]; - } - - var vertical; - if (Math.abs(sine) < RAD_30) { - vertical = __WEBPACK_IMPORTED_MODULE_5__common_constants__["e" /* CENTER */]; - } else if (sine < 0) { - vertical = __WEBPACK_IMPORTED_MODULE_5__common_constants__["d" /* BOTTOM */]; - } else { - vertical = __WEBPACK_IMPORTED_MODULE_5__common_constants__["B" /* TOP */]; - } - - return { - horizontal: horizontal, - vertical: vertical - }; -} - -Object(__WEBPACK_IMPORTED_MODULE_6__common__["M" /* setDefaultOptions */])(PieSegment, { - color: __WEBPACK_IMPORTED_MODULE_5__common_constants__["E" /* WHITE */], - overlay: { - gradient: "roundedBevel" - }, - border: { - width: 0.5 - }, - labels: { - visible: false, - distance: 35, - font: __WEBPACK_IMPORTED_MODULE_5__common_constants__["j" /* DEFAULT_FONT */], - margin: Object(__WEBPACK_IMPORTED_MODULE_6__common__["s" /* getSpacing */])(0.5), - align: __WEBPACK_IMPORTED_MODULE_5__common_constants__["f" /* CIRCLE */], - zIndex: 1, - position: __WEBPACK_IMPORTED_MODULE_3__constants__["J" /* OUTSIDE_END */] - }, - animation: { - type: __WEBPACK_IMPORTED_MODULE_3__constants__["K" /* PIE */] - }, - highlight: { - visible: true, - border: { - width: 1 - } - }, - visible: true -}); - -Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])(PieSegment.prototype, __WEBPACK_IMPORTED_MODULE_2__mixins_point_events_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (PieSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/plotarea/categorical-plotarea.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__plotarea_base__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/plotarea-base.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__axis_group_range_tracker__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/axis-group-range-tracker.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_plotarea_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/plotarea-events-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__aggregates_series_aggregator__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/aggregates/series-aggregator.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__aggregates_default_aggregates__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/aggregates/default-aggregates.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__series_binder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/series-binder.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__bar_chart_bar_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__range_bar_chart_range_bar_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-bar-chart/range-bar-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__bullet_chart_bullet_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bullet-chart/bullet-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__line_chart_line_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__area_chart_area_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/area-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__range_area_chart_range_area_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/range-area-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__ohlc_chart_ohlc_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/ohlc-chart/ohlc-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__candlestick_chart_candlestick_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/candlestick-chart/candlestick-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__box_plot_chart_box_plot_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/box-plot-chart/box-plot-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__waterfall_chart_waterfall_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/waterfall-chart/waterfall-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - - - - - - - - - - - - - - - -var AREA_SERIES = [ __WEBPACK_IMPORTED_MODULE_18__constants__["b" /* AREA */], __WEBPACK_IMPORTED_MODULE_18__constants__["_9" /* VERTICAL_AREA */], __WEBPACK_IMPORTED_MODULE_18__constants__["T" /* RANGE_AREA */], __WEBPACK_IMPORTED_MODULE_18__constants__["_13" /* VERTICAL_RANGE_AREA */] ]; -var OUT_OF_RANGE_SERIES = [ __WEBPACK_IMPORTED_MODULE_18__constants__["D" /* LINE */], __WEBPACK_IMPORTED_MODULE_18__constants__["_12" /* VERTICAL_LINE */] ].concat(AREA_SERIES); - -var CategoricalPlotArea = (function (PlotAreaBase) { - function CategoricalPlotArea () { - PlotAreaBase.apply(this, arguments); - } - - if ( PlotAreaBase ) CategoricalPlotArea.__proto__ = PlotAreaBase; - CategoricalPlotArea.prototype = Object.create( PlotAreaBase && PlotAreaBase.prototype ); - CategoricalPlotArea.prototype.constructor = CategoricalPlotArea; - - CategoricalPlotArea.prototype.initFields = function initFields (series) { - var this$1 = this; - - this.namedCategoryAxes = {}; - this.namedValueAxes = {}; - this.valueAxisRangeTracker = new __WEBPACK_IMPORTED_MODULE_1__axis_group_range_tracker__["a" /* default */](); - - if (series.length > 0) { - this.invertAxes = Object(__WEBPACK_IMPORTED_MODULE_20__common__["x" /* inArray */])( - series[0].type, [ __WEBPACK_IMPORTED_MODULE_18__constants__["c" /* BAR */], __WEBPACK_IMPORTED_MODULE_18__constants__["h" /* BULLET */], __WEBPACK_IMPORTED_MODULE_18__constants__["_12" /* VERTICAL_LINE */], __WEBPACK_IMPORTED_MODULE_18__constants__["_9" /* VERTICAL_AREA */], __WEBPACK_IMPORTED_MODULE_18__constants__["_13" /* VERTICAL_RANGE_AREA */], - __WEBPACK_IMPORTED_MODULE_18__constants__["U" /* RANGE_BAR */], __WEBPACK_IMPORTED_MODULE_18__constants__["w" /* HORIZONTAL_WATERFALL */], __WEBPACK_IMPORTED_MODULE_18__constants__["_10" /* VERTICAL_BOX_PLOT */] ] - ); - - for (var i = 0; i < series.length; i++) { - var stack = series[i].stack; - if (stack && stack.type === "100%") { - this$1.stack100 = true; - break; - } - } - } - - }; - - CategoricalPlotArea.prototype.render = function render (panes) { - if ( panes === void 0 ) panes = this.panes; - - this.createCategoryAxes(panes); - this.aggregateCategories(panes); - this.createCategoryAxesLabels(panes); - this.createCharts(panes); - this.createValueAxes(panes); - }; - - CategoricalPlotArea.prototype.removeAxis = function removeAxis (axis) { - var axisName = axis.options.name; - - PlotAreaBase.prototype.removeAxis.call(this, axis); - - if (axis instanceof __WEBPACK_IMPORTED_MODULE_16__core__["c" /* CategoryAxis */]) { - delete this.namedCategoryAxes[axisName]; - } else { - this.valueAxisRangeTracker.reset(axisName); - delete this.namedValueAxes[axisName]; - } - - if (axis === this.categoryAxis) { - delete this.categoryAxis; - } - - if (axis === this.valueAxis) { - delete this.valueAxis; - } - }; - - CategoricalPlotArea.prototype.createCharts = function createCharts (panes) { - var this$1 = this; - - var seriesByPane = this.groupSeriesByPane(); - - for (var i = 0; i < panes.length; i++) { - var pane = panes[i]; - var paneSeries = seriesByPane[pane.options.name || "default"] || []; - this$1.addToLegend(paneSeries); - - var visibleSeries = this$1.filterVisibleSeries(paneSeries); - if (!visibleSeries) { - continue; - } - - var groups = this$1.groupSeriesByCategoryAxis(visibleSeries); - for (var groupIx = 0; groupIx < groups.length; groupIx++) { - this$1.createChartGroup(groups[groupIx], pane); - } - } - }; - - CategoricalPlotArea.prototype.createChartGroup = function createChartGroup (series, pane) { - this.createAreaChart( - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["g" /* filterSeriesByType */])(series, [ __WEBPACK_IMPORTED_MODULE_18__constants__["b" /* AREA */], __WEBPACK_IMPORTED_MODULE_18__constants__["_9" /* VERTICAL_AREA */] ]), pane - ); - - this.createRangeAreaChart( - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["g" /* filterSeriesByType */])(series, [ __WEBPACK_IMPORTED_MODULE_18__constants__["T" /* RANGE_AREA */], __WEBPACK_IMPORTED_MODULE_18__constants__["_13" /* VERTICAL_RANGE_AREA */] ]), pane - ); - - this.createBarChart( - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["g" /* filterSeriesByType */])(series, [ __WEBPACK_IMPORTED_MODULE_18__constants__["k" /* COLUMN */], __WEBPACK_IMPORTED_MODULE_18__constants__["c" /* BAR */] ]), pane - ); - - this.createRangeBarChart( - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["g" /* filterSeriesByType */])(series, [ __WEBPACK_IMPORTED_MODULE_18__constants__["V" /* RANGE_COLUMN */], __WEBPACK_IMPORTED_MODULE_18__constants__["U" /* RANGE_BAR */] ]), pane - ); - - this.createBulletChart( - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["g" /* filterSeriesByType */])(series, [ __WEBPACK_IMPORTED_MODULE_18__constants__["h" /* BULLET */], __WEBPACK_IMPORTED_MODULE_18__constants__["_11" /* VERTICAL_BULLET */] ]), pane - ); - - this.createCandlestickChart( - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["g" /* filterSeriesByType */])(series, __WEBPACK_IMPORTED_MODULE_18__constants__["i" /* CANDLESTICK */]), pane - ); - - this.createBoxPlotChart( - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["g" /* filterSeriesByType */])(series, [ __WEBPACK_IMPORTED_MODULE_18__constants__["f" /* BOX_PLOT */], __WEBPACK_IMPORTED_MODULE_18__constants__["_10" /* VERTICAL_BOX_PLOT */] ]), pane - ); - - this.createOHLCChart( - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["g" /* filterSeriesByType */])(series, __WEBPACK_IMPORTED_MODULE_18__constants__["I" /* OHLC */]), pane - ); - - this.createWaterfallChart( - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["g" /* filterSeriesByType */])(series, [ __WEBPACK_IMPORTED_MODULE_18__constants__["_14" /* WATERFALL */], __WEBPACK_IMPORTED_MODULE_18__constants__["w" /* HORIZONTAL_WATERFALL */] ]), pane - ); - - this.createLineChart( - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["g" /* filterSeriesByType */])(series, [ __WEBPACK_IMPORTED_MODULE_18__constants__["D" /* LINE */], __WEBPACK_IMPORTED_MODULE_18__constants__["_12" /* VERTICAL_LINE */] ]), pane - ); - }; - - CategoricalPlotArea.prototype.aggregateCategories = function aggregateCategories (panes) { - var this$1 = this; - - var series = this.srcSeries || this.series; - var processedSeries = []; - this._currentPointsCache = {}; - this._seriesPointsCache = this._seriesPointsCache || {}; - - for (var i = 0; i < series.length; i++) { - var currentSeries = series[i]; - var categoryAxis = this$1.seriesCategoryAxis(currentSeries); - var axisPane = this$1.findPane(categoryAxis.options.pane); - var dateAxis = Object(__WEBPACK_IMPORTED_MODULE_17__utils__["e" /* equalsIgnoreCase */])(categoryAxis.options.type, __WEBPACK_IMPORTED_MODULE_19__common_constants__["i" /* DATE */]); - - if ((dateAxis || currentSeries.categoryField) && Object(__WEBPACK_IMPORTED_MODULE_20__common__["x" /* inArray */])(axisPane, panes)) { - currentSeries = this$1.aggregateSeries(currentSeries, categoryAxis); - } else { - currentSeries = this$1.filterSeries(currentSeries, categoryAxis); - } - - processedSeries.push(currentSeries); - } - - this._seriesPointsCache = this._currentPointsCache; - this._currentPointsCache = null; - - this.srcSeries = series; - this.series = processedSeries; - }; - - CategoricalPlotArea.prototype.filterSeries = function filterSeries (series, categoryAxis) { - var dataLength = (series.data || {}).length; - categoryAxis._seriesMax = Math.max(categoryAxis._seriesMax || 0, dataLength); - - if (!(Object(__WEBPACK_IMPORTED_MODULE_20__common__["B" /* isNumber */])(categoryAxis.options.min) || Object(__WEBPACK_IMPORTED_MODULE_20__common__["B" /* isNumber */])(categoryAxis.options.max))) { - return series; - } - - var range = categoryAxis.currentRangeIndices(); - var outOfRangePoints = Object(__WEBPACK_IMPORTED_MODULE_20__common__["x" /* inArray */])(series.type, OUT_OF_RANGE_SERIES); - var currentSeries = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, series); - - currentSeries.data = (currentSeries.data || []).slice(range.min, range.max + 1); - - if (outOfRangePoints) { - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["d" /* createOutOfRangePoints */])(currentSeries, range, dataLength, function (idx) { return ({ - item: series.data[idx], - category: categoryAxis.categoryAt(idx, true), - categoryIx: idx - range.min - }); }); - } - - return currentSeries; - }; - - CategoricalPlotArea.prototype.seriesSourcePoints = function seriesSourcePoints (series, categoryAxis) { - var this$1 = this; - - var key = (series.index) + ";" + (categoryAxis.categoriesHash()); - if (this._seriesPointsCache[key]) { - this._currentPointsCache[key] = this._seriesPointsCache[key]; - return this._seriesPointsCache[key]; - } - - var axisOptions = categoryAxis.options; - var srcCategories = axisOptions.srcCategories; - var dateAxis = Object(__WEBPACK_IMPORTED_MODULE_17__utils__["e" /* equalsIgnoreCase */])(axisOptions.type, __WEBPACK_IMPORTED_MODULE_19__common_constants__["i" /* DATE */]); - var srcData = series.data; - var getFn = dateAxis ? __WEBPACK_IMPORTED_MODULE_17__utils__["h" /* getDateField */] : __WEBPACK_IMPORTED_MODULE_17__utils__["i" /* getField */]; - var result = []; - if (!dateAxis) { - categoryAxis.mapCategories();//fixes major performance issue caused by searching for the index for large data - } - - for (var idx = 0; idx < srcData.length; idx++) { - var category = (void 0); - if (series.categoryField) { - category = getFn(series.categoryField, srcData[idx], this$1.chartService.intl); - } else { - category = srcCategories[idx]; - } - - if (Object(__WEBPACK_IMPORTED_MODULE_20__common__["l" /* defined */])(category) && category !== null) { - var categoryIx = categoryAxis.totalIndex(category); - result[categoryIx] = result[categoryIx] || { items: [], category: category }; - result[categoryIx].items.push(idx); - } - } - - this._currentPointsCache[key] = result; - - return result; - }; - - CategoricalPlotArea.prototype.aggregateSeries = function aggregateSeries (series, categoryAxis) { - var srcData = series.data; - if (!srcData.length) { - return series; - } - - var srcPoints = this.seriesSourcePoints(series, categoryAxis); - var result = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, series); - var aggregator = new __WEBPACK_IMPORTED_MODULE_3__aggregates_series_aggregator__["a" /* default */](Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, series), __WEBPACK_IMPORTED_MODULE_5__series_binder__["a" /* default */].current, __WEBPACK_IMPORTED_MODULE_4__aggregates_default_aggregates__["a" /* default */].current); - var data = result.data = []; - var dataItems = categoryAxis.options.dataItems || []; - - var range = categoryAxis.currentRangeIndices(); - var totalCount = categoryAxis.totalCount(); - var categoryItem = function (idx) { - var categoryIdx = idx - range.min; - var point = srcPoints[idx]; - if (!point) { - point = srcPoints[idx] = {}; - } - - point.categoryIx = categoryIdx; - - if (!point.item) { - var category = categoryAxis.categoryAt(idx, true); - point.category = category; - point.item = aggregator.aggregatePoints(point.items, category); - } - - return point; - }; - - for (var idx = range.min; idx <= range.max; idx++) { - var point = categoryItem(idx); - data[point.categoryIx] = point.item; - - if (point.items && point.items.length) { - dataItems[point.categoryIx] = point.item; - } - } - - if (Object(__WEBPACK_IMPORTED_MODULE_20__common__["x" /* inArray */])(result.type, OUT_OF_RANGE_SERIES)) { - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["d" /* createOutOfRangePoints */])(result, range, totalCount, categoryItem); - } - - categoryAxis.options.dataItems = dataItems; - - return result; - }; - - CategoricalPlotArea.prototype.appendChart = function appendChart (chart, pane) { - var series = chart.options.series; - var categoryAxis = this.seriesCategoryAxis(series[0]); - var categories = categoryAxis.options.categories; - var categoriesToAdd = Math.max(0, Object(__WEBPACK_IMPORTED_MODULE_17__utils__["c" /* categoriesCount */])(series) - categories.length); - - if (categoriesToAdd > 0) {//consider setting an option to axis instead of adding fake categories - categories = categoryAxis.options.categories = categoryAxis.options.categories.slice(0); - while (categoriesToAdd--) { - categories.push(""); - } - } - - this.valueAxisRangeTracker.update(chart.valueAxisRanges); - - PlotAreaBase.prototype.appendChart.call(this, chart, pane); - }; - - // TODO: Refactor, optionally use series.pane option - CategoricalPlotArea.prototype.seriesPaneName = function seriesPaneName (series) { - var options = this.options; - var axisName = series.axis; - var axisOptions = [].concat(options.valueAxis); - var axis = Object(__WEBPACK_IMPORTED_MODULE_20__common__["v" /* grep */])(axisOptions, function(a) { return a.name === axisName; })[0]; - var panes = options.panes || [ {} ]; - var defaultPaneName = (panes[0] || {}).name || "default"; - var paneName = (axis || {}).pane || defaultPaneName; - - return paneName; - }; - - CategoricalPlotArea.prototype.seriesCategoryAxis = function seriesCategoryAxis (series) { - var axisName = series.categoryAxis; - var axis = axisName ? this.namedCategoryAxes[axisName] : this.categoryAxis; - - if (!axis) { - throw new Error("Unable to locate category axis with name " + axisName); - } - - return axis; - }; - - CategoricalPlotArea.prototype.stackableChartOptions = function stackableChartOptions (firstSeries, pane) { - var stack = firstSeries.stack; - var isStacked100 = stack && stack.type === "100%"; - var clip = pane.options.clip; - - return { - isStacked: stack, - isStacked100: isStacked100, - clip: clip - }; - }; - - CategoricalPlotArea.prototype.groupSeriesByCategoryAxis = function groupSeriesByCategoryAxis (series) { - var categoryAxes = []; - var unique = {}; - for (var idx = 0; idx < series.length; idx++) { - var name = series[idx].categoryAxis || "$$default$$"; - if (!unique.hasOwnProperty(name)) { - unique[name] = true; - categoryAxes.push(name); - } - } - - var groups = []; - for (var axisIx = 0; axisIx < categoryAxes.length; axisIx++) { - var axis = categoryAxes[axisIx]; - var axisSeries = groupSeries(series, axis, axisIx); - if (axisSeries.length === 0) { - continue; - } - - groups.push(axisSeries); - } - - return groups; - }; - - CategoricalPlotArea.prototype.createBarChart = function createBarChart (series, pane) { - if (series.length === 0) { - return; - } - - var firstSeries = series[0]; - var barChart = new __WEBPACK_IMPORTED_MODULE_6__bar_chart_bar_chart__["a" /* default */](this, Object.assign({ - series: series, - invertAxes: this.invertAxes, - gap: firstSeries.gap, - spacing: firstSeries.spacing - }, this.stackableChartOptions(firstSeries, pane))); - - this.appendChart(barChart, pane); - }; - - CategoricalPlotArea.prototype.createRangeBarChart = function createRangeBarChart (series, pane) { - if (series.length === 0) { - return; - } - - var firstSeries = series[0]; - var rangeColumnChart = new __WEBPACK_IMPORTED_MODULE_7__range_bar_chart_range_bar_chart__["a" /* default */](this, { - series: series, - invertAxes: this.invertAxes, - gap: firstSeries.gap, - spacing: firstSeries.spacing - }); - - this.appendChart(rangeColumnChart, pane); - }; - - CategoricalPlotArea.prototype.createBulletChart = function createBulletChart (series, pane) { - if (series.length === 0) { - return; - } - - var firstSeries = series[0]; - var bulletChart = new __WEBPACK_IMPORTED_MODULE_8__bullet_chart_bullet_chart__["a" /* default */](this, { - series: series, - invertAxes: this.invertAxes, - gap: firstSeries.gap, - spacing: firstSeries.spacing, - clip: pane.options.clip - }); - - this.appendChart(bulletChart, pane); - }; - - CategoricalPlotArea.prototype.createLineChart = function createLineChart (series, pane) { - if (series.length === 0) { - return; - } - - var firstSeries = series[0]; - var lineChart = new __WEBPACK_IMPORTED_MODULE_9__line_chart_line_chart__["a" /* default */](this, Object.assign({ - invertAxes: this.invertAxes, - series: series - }, this.stackableChartOptions(firstSeries, pane))); - - this.appendChart(lineChart, pane); - }; - - CategoricalPlotArea.prototype.createAreaChart = function createAreaChart (series, pane) { - if (series.length === 0) { - return; - } - - var firstSeries = series[0]; - var areaChart = new __WEBPACK_IMPORTED_MODULE_10__area_chart_area_chart__["a" /* default */](this, Object.assign({ - invertAxes: this.invertAxes, - series: series - }, this.stackableChartOptions(firstSeries, pane))); - - this.appendChart(areaChart, pane); - }; - - CategoricalPlotArea.prototype.createRangeAreaChart = function createRangeAreaChart (series, pane) { - if (series.length === 0) { - return; - } - - var rangeAreaChart = new __WEBPACK_IMPORTED_MODULE_11__range_area_chart_range_area_chart__["a" /* default */](this, { - invertAxes: this.invertAxes, - series: series, - clip: pane.options.clip - }); - - this.appendChart(rangeAreaChart, pane); - }; - - CategoricalPlotArea.prototype.createOHLCChart = function createOHLCChart (series, pane) { - if (series.length === 0) { - return; - } - - var firstSeries = series[0]; - var chart = new __WEBPACK_IMPORTED_MODULE_12__ohlc_chart_ohlc_chart__["a" /* default */](this, { - invertAxes: this.invertAxes, - gap: firstSeries.gap, - series: series, - spacing: firstSeries.spacing, - clip: pane.options.clip - }); - - this.appendChart(chart, pane); - }; - - CategoricalPlotArea.prototype.createCandlestickChart = function createCandlestickChart (series, pane) { - if (series.length === 0) { - return; - } - - var firstSeries = series[0]; - var chart = new __WEBPACK_IMPORTED_MODULE_13__candlestick_chart_candlestick_chart__["a" /* default */](this, { - invertAxes: this.invertAxes, - gap: firstSeries.gap, - series: series, - spacing: firstSeries.spacing, - clip: pane.options.clip - }); - - this.appendChart(chart, pane); - }; - - CategoricalPlotArea.prototype.createBoxPlotChart = function createBoxPlotChart (series, pane) { - if (series.length === 0) { - return; - } - - var firstSeries = series[0]; - var chart = new __WEBPACK_IMPORTED_MODULE_14__box_plot_chart_box_plot_chart__["a" /* default */](this, { - invertAxes: this.invertAxes, - gap: firstSeries.gap, - series: series, - spacing: firstSeries.spacing, - clip: pane.options.clip - }); - - this.appendChart(chart, pane); - }; - - CategoricalPlotArea.prototype.createWaterfallChart = function createWaterfallChart (series, pane) { - if (series.length === 0) { - return; - } - - var firstSeries = series[0]; - var waterfallChart = new __WEBPACK_IMPORTED_MODULE_15__waterfall_chart_waterfall_chart__["a" /* default */](this, { - series: series, - invertAxes: this.invertAxes, - gap: firstSeries.gap, - spacing: firstSeries.spacing - }); - - this.appendChart(waterfallChart, pane); - }; - - CategoricalPlotArea.prototype.axisRequiresRounding = function axisRequiresRounding (categoryAxisName, categoryAxisIndex) { - var this$1 = this; - - var centeredSeries = Object(__WEBPACK_IMPORTED_MODULE_17__utils__["g" /* filterSeriesByType */])(this.series, __WEBPACK_IMPORTED_MODULE_18__constants__["p" /* EQUALLY_SPACED_SERIES */]); - - for (var seriesIx = 0; seriesIx < this.series.length; seriesIx++) { - var currentSeries = this$1.series[seriesIx]; - if (Object(__WEBPACK_IMPORTED_MODULE_20__common__["x" /* inArray */])(currentSeries.type, AREA_SERIES)) { - var line = currentSeries.line; - if (line && line.style === __WEBPACK_IMPORTED_MODULE_18__constants__["_7" /* STEP */]) { - centeredSeries.push(currentSeries); - } - } - } - - for (var seriesIx$1 = 0; seriesIx$1 < centeredSeries.length; seriesIx$1++) { - var seriesAxis = centeredSeries[seriesIx$1].categoryAxis || ""; - if (seriesAxis === categoryAxisName || (!seriesAxis && categoryAxisIndex === 0)) { - return true; - } - } - }; - - CategoricalPlotArea.prototype.aggregatedAxis = function aggregatedAxis (categoryAxisName, categoryAxisIndex) { - var series = this.series; - - for (var seriesIx = 0; seriesIx < series.length; seriesIx++) { - var seriesAxis = series[seriesIx].categoryAxis || ""; - if ((seriesAxis === categoryAxisName || (!seriesAxis && categoryAxisIndex === 0)) && series[seriesIx].categoryField) { - return true; - } - } - }; - - CategoricalPlotArea.prototype.createCategoryAxesLabels = function createCategoryAxesLabels () { - var axes = this.axes; - for (var i = 0; i < axes.length; i++) { - if (axes[i] instanceof __WEBPACK_IMPORTED_MODULE_16__core__["c" /* CategoryAxis */]) { - axes[i].createLabels(); - } - } - }; - - CategoricalPlotArea.prototype.createCategoryAxes = function createCategoryAxes (panes) { - var this$1 = this; - - var invertAxes = this.invertAxes; - var definitions = [].concat(this.options.categoryAxis); - var axes = []; - - for (var i = 0; i < definitions.length; i++) { - var axisOptions = definitions[i]; - var axisPane = this$1.findPane(axisOptions.pane); - - if (Object(__WEBPACK_IMPORTED_MODULE_20__common__["x" /* inArray */])(axisPane, panes)) { - var name = axisOptions.name; - var categories = axisOptions.categories; if ( categories === void 0 ) categories = []; - axisOptions = Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({ - vertical: invertAxes, - reverse: !invertAxes && this$1.chartService.rtl, - axisCrossingValue: invertAxes ? __WEBPACK_IMPORTED_MODULE_19__common_constants__["s" /* MAX_VALUE */] : 0 - }, axisOptions); - - if (!Object(__WEBPACK_IMPORTED_MODULE_20__common__["l" /* defined */])(axisOptions.justified)) { - axisOptions.justified = this$1.isJustified(); - } - - if (this$1.axisRequiresRounding(name, i)) { - axisOptions.justified = false; - } - - var categoryAxis = (void 0); - - if (Object(__WEBPACK_IMPORTED_MODULE_17__utils__["k" /* isDateAxis */])(axisOptions, categories[0])) { - categoryAxis = new __WEBPACK_IMPORTED_MODULE_16__core__["f" /* DateCategoryAxis */](axisOptions, this$1.chartService); - } else { - categoryAxis = new __WEBPACK_IMPORTED_MODULE_16__core__["c" /* CategoryAxis */](axisOptions, this$1.chartService); - } - - definitions[i].categories = categoryAxis.options.srcCategories; - - if (name) { - if (this$1.namedCategoryAxes[name]) { - throw new Error(("Category axis with name " + name + " is already defined")); - } - this$1.namedCategoryAxes[name] = categoryAxis; - } - - categoryAxis.axisIndex = i; - axes.push(categoryAxis); - this$1.appendAxis(categoryAxis); - } - } - - var primaryAxis = this.categoryAxis || axes[0]; - this.categoryAxis = primaryAxis; - - if (invertAxes) { - this.axisY = primaryAxis; - } else { - this.axisX = primaryAxis; - } - }; - - CategoricalPlotArea.prototype.isJustified = function isJustified () { - var series = this.series; - - for (var i = 0; i < series.length; i++) { - var currentSeries = series[i]; - if (!Object(__WEBPACK_IMPORTED_MODULE_20__common__["x" /* inArray */])(currentSeries.type, AREA_SERIES)) { - return false; - } - } - - return true; - }; - - CategoricalPlotArea.prototype.createValueAxes = function createValueAxes (panes) { - var this$1 = this; - - var tracker = this.valueAxisRangeTracker; - var defaultRange = tracker.query(); - var definitions = [].concat(this.options.valueAxis); - var invertAxes = this.invertAxes; - var baseOptions = { vertical: !invertAxes, reverse: invertAxes && this.chartService.rtl }; - var axes = []; - - if (this.stack100) { - baseOptions.roundToMajorUnit = false; - baseOptions.labels = { format: "P0" }; - } - - for (var i = 0; i < definitions.length; i++) { - var axisOptions = definitions[i]; - var axisPane = this$1.findPane(axisOptions.pane); - - if (Object(__WEBPACK_IMPORTED_MODULE_20__common__["x" /* inArray */])(axisPane, panes)) { - var name = axisOptions.name; - var defaultAxisRange = Object(__WEBPACK_IMPORTED_MODULE_17__utils__["e" /* equalsIgnoreCase */])(axisOptions.type, __WEBPACK_IMPORTED_MODULE_18__constants__["F" /* LOGARITHMIC */]) ? { min: 0.1, max: 1 } : { min: 0, max: 1 }; - var range = tracker.query(name) || defaultRange || defaultAxisRange; - - if (i === 0 && range && defaultRange) { - range.min = Math.min(range.min, defaultRange.min); - range.max = Math.max(range.max, defaultRange.max); - } - - var axisType = (void 0); - if (Object(__WEBPACK_IMPORTED_MODULE_17__utils__["e" /* equalsIgnoreCase */])(axisOptions.type, __WEBPACK_IMPORTED_MODULE_18__constants__["F" /* LOGARITHMIC */])) { - axisType = __WEBPACK_IMPORTED_MODULE_16__core__["i" /* LogarithmicAxis */]; - } else { - axisType = __WEBPACK_IMPORTED_MODULE_16__core__["k" /* NumericAxis */]; - } - - var valueAxis = new axisType(range.min, range.max, - Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])({}, baseOptions, axisOptions), - this$1.chartService - ); - - if (name) { - if (this$1.namedValueAxes[name]) { - throw new Error(("Value axis with name " + name + " is already defined")); - } - this$1.namedValueAxes[name] = valueAxis; - } - valueAxis.axisIndex = i; - - axes.push(valueAxis); - this$1.appendAxis(valueAxis); - } - } - - var primaryAxis = this.valueAxis || axes[0]; - this.valueAxis = primaryAxis; - - if (invertAxes) { - this.axisX = primaryAxis; - } else { - this.axisY = primaryAxis; - } - }; - - CategoricalPlotArea.prototype._dispatchEvent = function _dispatchEvent (chart, e, eventType) { - var coords = chart._eventCoordinates(e); - var point = new __WEBPACK_IMPORTED_MODULE_16__core__["l" /* Point */](coords.x, coords.y); - var pane = this.pointPane(point); - var categories = []; - var values = []; - - if (!pane) { - return; - } - - var allAxes = pane.axes; - for (var i = 0; i < allAxes.length; i++) { - var axis = allAxes[i]; - if (axis.getValue) { - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["a" /* appendIfNotNull */])(values, axis.getValue(point)); - } else { - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["a" /* appendIfNotNull */])(categories, axis.getCategory(point)); - } - } - - if (categories.length === 0) { - Object(__WEBPACK_IMPORTED_MODULE_17__utils__["a" /* appendIfNotNull */])(categories, this.categoryAxis.getCategory(point)); - } - - if (categories.length > 0 && values.length > 0) { - chart.trigger(eventType, { - element: Object(__WEBPACK_IMPORTED_MODULE_20__common__["r" /* eventElement */])(e), - originalEvent: e, - category: Object(__WEBPACK_IMPORTED_MODULE_17__utils__["l" /* singleItemOrArray */])(categories), - value: Object(__WEBPACK_IMPORTED_MODULE_17__utils__["l" /* singleItemOrArray */])(values) - }); - } - }; - - CategoricalPlotArea.prototype.pointPane = function pointPane (point) { - var panes = this.panes; - - for (var i = 0; i < panes.length; i++) { - var currentPane = panes[i]; - if (currentPane.contentBox.containsPoint(point)) { - return currentPane; - } - } - }; - - CategoricalPlotArea.prototype.updateAxisOptions = function updateAxisOptions$1 (axis, options) { - updateAxisOptions(this.options, axis, options); - updateAxisOptions(this.originalOptions, axis, options); - }; - - return CategoricalPlotArea; -}(__WEBPACK_IMPORTED_MODULE_0__plotarea_base__["a" /* default */])); - -function updateAxisOptions(targetOptions, axis, options) { - var axesOptions = axis instanceof __WEBPACK_IMPORTED_MODULE_16__core__["c" /* CategoryAxis */] ? [].concat(targetOptions.categoryAxis) : [].concat(targetOptions.valueAxis); - Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])(axesOptions[axis.axisIndex], options); -} - -function groupSeries(series, axis, axisIx) { - return Object(__WEBPACK_IMPORTED_MODULE_20__common__["v" /* grep */])(series, function(s) { - return (axisIx === 0 && !s.categoryAxis) || (s.categoryAxis === axis); - }); -} - -Object(__WEBPACK_IMPORTED_MODULE_20__common__["M" /* setDefaultOptions */])(CategoricalPlotArea, { - categoryAxis: {}, - valueAxis: {} -}); - -Object(__WEBPACK_IMPORTED_MODULE_20__common__["k" /* deepExtend */])(CategoricalPlotArea.prototype, __WEBPACK_IMPORTED_MODULE_2__mixins_plotarea_events_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (CategoricalPlotArea); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/plotarea/donut-plotarea.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__pie_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/pie-plotarea.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__donut_chart_donut_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/donut-chart/donut-chart.js"); - - - -var DonutPlotArea = (function (PiePlotArea) { - function DonutPlotArea () { - PiePlotArea.apply(this, arguments); - } - - if ( PiePlotArea ) DonutPlotArea.__proto__ = PiePlotArea; - DonutPlotArea.prototype = Object.create( PiePlotArea && PiePlotArea.prototype ); - DonutPlotArea.prototype.constructor = DonutPlotArea; - - DonutPlotArea.prototype.render = function render () { - this.createDonutChart(this.series); - }; - - DonutPlotArea.prototype.createDonutChart = function createDonutChart (series) { - var firstSeries = series[0]; - var donutChart = new __WEBPACK_IMPORTED_MODULE_1__donut_chart_donut_chart__["a" /* default */](this, { - series: series, - padding: firstSeries.padding, - connectors: firstSeries.connectors, - legend: this.options.legend - }); - - this.appendChart(donutChart); - }; - - return DonutPlotArea; -}(__WEBPACK_IMPORTED_MODULE_0__pie_plotarea__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (DonutPlotArea); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/plotarea/funnel-plotarea.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__plotarea_base__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/plotarea-base.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__funnel_chart_funnel_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/funnel-chart/funnel-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var FunnelPlotArea = (function (PlotAreaBase) { - function FunnelPlotArea () { - PlotAreaBase.apply(this, arguments); - } - - if ( PlotAreaBase ) FunnelPlotArea.__proto__ = PlotAreaBase; - FunnelPlotArea.prototype = Object.create( PlotAreaBase && PlotAreaBase.prototype ); - FunnelPlotArea.prototype.constructor = FunnelPlotArea; - - FunnelPlotArea.prototype.render = function render () { - this.createFunnelChart(this.series); - }; - - FunnelPlotArea.prototype.createFunnelChart = function createFunnelChart (series) { - var firstSeries = series[0]; - var funnelChart = new __WEBPACK_IMPORTED_MODULE_1__funnel_chart_funnel_chart__["a" /* default */](this, { - series: series, - legend: this.options.legend, - neckRatio: firstSeries.neckRatio, - dynamicHeight: firstSeries.dynamicHeight, - dynamicSlope: firstSeries.dynamicSlope, - segmentSpacing: firstSeries.segmentSpacing, - highlight: firstSeries.highlight - }); - - this.appendChart(funnelChart); - }; - - FunnelPlotArea.prototype.appendChart = function appendChart (chart, pane) { - PlotAreaBase.prototype.appendChart.call(this, chart, pane); - Object(__WEBPACK_IMPORTED_MODULE_2__common__["g" /* append */])(this.options.legend.items, chart.legendItems); - }; - - return FunnelPlotArea; -}(__WEBPACK_IMPORTED_MODULE_0__plotarea_base__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (FunnelPlotArea); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/plotarea/pie-plotarea.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__plotarea_base__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/plotarea-base.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__pie_chart_pie_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pie-chart/pie-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var PiePlotArea = (function (PlotAreaBase) { - function PiePlotArea () { - PlotAreaBase.apply(this, arguments); - } - - if ( PlotAreaBase ) PiePlotArea.__proto__ = PlotAreaBase; - PiePlotArea.prototype = Object.create( PlotAreaBase && PlotAreaBase.prototype ); - PiePlotArea.prototype.constructor = PiePlotArea; - - PiePlotArea.prototype.render = function render () { - this.createPieChart(this.series); - }; - - PiePlotArea.prototype.createPieChart = function createPieChart (series) { - var firstSeries = series[0]; - var pieChart = new __WEBPACK_IMPORTED_MODULE_1__pie_chart_pie_chart__["a" /* default */](this, { - series: series, - padding: firstSeries.padding, - startAngle: firstSeries.startAngle, - connectors: firstSeries.connectors, - legend: this.options.legend - }); - - this.appendChart(pieChart); - }; - - PiePlotArea.prototype.appendChart = function appendChart (chart, pane) { - PlotAreaBase.prototype.appendChart.call(this, chart, pane); - Object(__WEBPACK_IMPORTED_MODULE_2__common__["g" /* append */])(this.options.legend.items, chart.legendItems); - }; - - return PiePlotArea; -}(__WEBPACK_IMPORTED_MODULE_0__plotarea_base__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (PiePlotArea); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/plotarea/plotarea-base.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__crosshair_crosshair__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/crosshair/crosshair.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__pane__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/pane.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - -var PlotAreaBase = (function (ChartElement) { - function PlotAreaBase(series, options, chartService) { - ChartElement.call(this, options); - - this.initFields(series, options); - this.series = series; - this.initSeries(); - this.charts = []; - this.options.legend.items = []; - this.axes = []; - this.crosshairs = []; - this.chartService = chartService; - this.originalOptions = options; - - this.createPanes(); - this.render(); - this.createCrosshairs(); - } - - if ( ChartElement ) PlotAreaBase.__proto__ = ChartElement; - PlotAreaBase.prototype = Object.create( ChartElement && ChartElement.prototype ); - PlotAreaBase.prototype.constructor = PlotAreaBase; - - PlotAreaBase.prototype.initFields = function initFields () { }; - - PlotAreaBase.prototype.initSeries = function initSeries () { - var series = this.series; - - for (var i = 0; i < series.length; i++) { - series[i].index = i; - } - }; - - PlotAreaBase.prototype.createPanes = function createPanes () { - var this$1 = this; - - var defaults = { title: { color: (this.options.title || {}).color } }; - var panes = []; - var paneOptions = this.options.panes || []; - var panesLength = Math.max(paneOptions.length, 1); - - function setTitle(options, defaults) { - if (Object(__WEBPACK_IMPORTED_MODULE_6__common__["D" /* isString */])(options.title)) { - options.title = { - text: options.title - }; - } - - options.title = Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({}, defaults.title, options.title); - } - - for (var i = 0; i < panesLength; i++) { - var options = paneOptions[i] || {}; - setTitle(options, defaults); - - var currentPane = new __WEBPACK_IMPORTED_MODULE_3__pane__["a" /* default */](options); - currentPane.paneIndex = i; - - panes.push(currentPane); - this$1.append(currentPane); - } - - this.panes = panes; - }; - - PlotAreaBase.prototype.createCrosshairs = function createCrosshairs (panes) { - var this$1 = this; - if ( panes === void 0 ) panes = this.panes; - - for (var i = 0; i < panes.length; i++) { - var pane = panes[i]; - for (var j = 0; j < pane.axes.length; j++) { - var axis = pane.axes[j]; - if (axis.options.crosshair && axis.options.crosshair.visible) { - var currentCrosshair = new __WEBPACK_IMPORTED_MODULE_2__crosshair_crosshair__["a" /* default */](this$1.chartService, axis, axis.options.crosshair); - - this$1.crosshairs.push(currentCrosshair); - pane.content.append(currentCrosshair); - } - } - } - }; - - PlotAreaBase.prototype.removeCrosshairs = function removeCrosshairs (pane) { - var crosshairs = this.crosshairs; - var axes = pane.axes; - - for (var i = crosshairs.length - 1; i >= 0; i--) { - for (var j = 0; j < axes.length; j++) { - if (crosshairs[i].axis === axes[j]) { - crosshairs.splice(i, 1); - break; - } - } - } - }; - - PlotAreaBase.prototype.hideCrosshairs = function hideCrosshairs () { - var crosshairs = this.crosshairs; - for (var idx = 0; idx < crosshairs.length; idx++) { - crosshairs[idx].hide(); - } - }; - - PlotAreaBase.prototype.findPane = function findPane (name) { - var panes = this.panes; - var matchingPane; - - for (var i = 0; i < panes.length; i++) { - if (panes[i].options.name === name) { - matchingPane = panes[i]; - break; - } - } - - return matchingPane || panes[0]; - }; - - PlotAreaBase.prototype.findPointPane = function findPointPane (point) { - var panes = this.panes; - var matchingPane; - - for (var i = 0; i < panes.length; i++) { - if (panes[i].box.containsPoint(point)) { - matchingPane = panes[i]; - break; - } - } - - return matchingPane; - }; - - PlotAreaBase.prototype.appendAxis = function appendAxis (axis) { - var pane = this.findPane(axis.options.pane); - - pane.appendAxis(axis); - this.axes.push(axis); - axis.plotArea = this; - }; - - PlotAreaBase.prototype.removeAxis = function removeAxis (axisToRemove) { - var this$1 = this; - - var filteredAxes = []; - - for (var i = 0; i < this.axes.length; i++) { - var axis = this$1.axes[i]; - if (axisToRemove !== axis) { - filteredAxes.push(axis); - } else { - axis.destroy(); - } - } - - this.axes = filteredAxes; - }; - - PlotAreaBase.prototype.appendChart = function appendChart (chart, pane) { - this.charts.push(chart); - if (pane) { - pane.appendChart(chart); - } else { - this.append(chart); - } - }; - - PlotAreaBase.prototype.removeChart = function removeChart (chartToRemove) { - var this$1 = this; - - var filteredCharts = []; - - for (var i = 0; i < this.charts.length; i++) { - var chart = this$1.charts[i]; - if (chart !== chartToRemove) { - filteredCharts.push(chart); - } else { - chart.destroy(); - } - } - - this.charts = filteredCharts; - }; - - PlotAreaBase.prototype.addToLegend = function addToLegend (series) { - var count = series.length; - var legend = this.options.legend; - var labels = legend.labels || {}; - var inactiveItems = legend.inactiveItems || {}; - var inactiveItemsLabels = inactiveItems.labels || {}; - var data = []; - - for (var i = 0; i < count; i++) { - var currentSeries = series[i]; - var seriesVisible = currentSeries.visible !== false; - if (currentSeries.visibleInLegend === false) { - continue; - } - - var text = currentSeries.name; - var labelTemplate = seriesVisible ? Object(__WEBPACK_IMPORTED_MODULE_6__common__["t" /* getTemplate */])(labels) : Object(__WEBPACK_IMPORTED_MODULE_6__common__["t" /* getTemplate */])(inactiveItemsLabels) || Object(__WEBPACK_IMPORTED_MODULE_6__common__["t" /* getTemplate */])(labels); - if (labelTemplate) { - text = labelTemplate({ - text: Object(__WEBPACK_IMPORTED_MODULE_4__utils__["j" /* hasValue */])(text) ? text : "", - series: currentSeries - }); - } - - var defaults = currentSeries._defaults; - var color = currentSeries.color; - if (Object(__WEBPACK_IMPORTED_MODULE_6__common__["A" /* isFunction */])(color) && defaults) { - color = defaults.color; - } - - var itemLabelOptions = (void 0), markerColor = (void 0); - if (seriesVisible) { - itemLabelOptions = {}; - markerColor = color; - } else { - itemLabelOptions = { - color: inactiveItemsLabels.color, - font: inactiveItemsLabels.font - }; - markerColor = inactiveItems.markers.color; - } - - if (Object(__WEBPACK_IMPORTED_MODULE_4__utils__["j" /* hasValue */])(text) && text !== "") { - data.push({ - text: text, - labels: itemLabelOptions, - markerColor: markerColor, - series: currentSeries, - active: seriesVisible - }); - } - } - - Object(__WEBPACK_IMPORTED_MODULE_6__common__["g" /* append */])(legend.items, data); - }; - - PlotAreaBase.prototype.groupAxes = function groupAxes (panes) { - var xAxes = []; - var yAxes = []; - - for (var paneIx = 0; paneIx < panes.length; paneIx++) { - var paneAxes = panes[paneIx].axes; - for (var axisIx = 0; axisIx < paneAxes.length; axisIx++) { - var axis = paneAxes[axisIx]; - if (axis.options.vertical) { - yAxes.push(axis); - } else { - xAxes.push(axis); - } - } - } - - return { x: xAxes, y: yAxes, any: xAxes.concat(yAxes) }; - }; - - PlotAreaBase.prototype.groupSeriesByPane = function groupSeriesByPane () { - var this$1 = this; - - var series = this.series; - var seriesByPane = {}; - - for (var i = 0; i < series.length; i++) { - var currentSeries = series[i]; - var pane = this$1.seriesPaneName(currentSeries); - - if (seriesByPane[pane]) { - seriesByPane[pane].push(currentSeries); - } else { - seriesByPane[pane] = [ currentSeries ]; - } - } - - return seriesByPane; - }; - - PlotAreaBase.prototype.filterVisibleSeries = function filterVisibleSeries (series) { - var result = []; - - for (var i = 0; i < series.length; i++) { - var currentSeries = series[i]; - if (currentSeries.visible !== false) { - result.push(currentSeries); - } - } - - return result; - }; - - PlotAreaBase.prototype.reflow = function reflow (targetBox) { - var options = this.options.plotArea; - var panes = this.panes; - var margin = Object(__WEBPACK_IMPORTED_MODULE_6__common__["s" /* getSpacing */])(options.margin); - - this.box = targetBox.clone().unpad(margin); - this.reflowPanes(); - - this.reflowAxes(panes); - this.reflowCharts(panes); - }; - - PlotAreaBase.prototype.redraw = function redraw (panes) { - var this$1 = this; - - var panesArray = [].concat(panes); - this.initSeries(); - - //prevents leak during partial redraws. the cached gradients observers retain reference to the destroyed elements. - var root = this.getRoot(); - if (root) { - root.cleanGradients(); - } - - for (var i = 0; i < panesArray.length; i++) { - this$1.removeCrosshairs(panesArray[i]); - panesArray[i].empty(); - } - - this.render(panesArray); - this.reflowAxes(this.panes); - this.reflowCharts(panesArray); - - this.createCrosshairs(panesArray); - - for (var i$1 = 0; i$1 < panesArray.length; i$1++) { - panesArray[i$1].refresh(); - } - }; - - PlotAreaBase.prototype.axisCrossingValues = function axisCrossingValues (axis, crossingAxes) { - var options = axis.options; - var crossingValues = [].concat( - options.axisCrossingValues || options.axisCrossingValue - ); - var valuesToAdd = crossingAxes.length - crossingValues.length; - var defaultValue = crossingValues[0] || 0; - - for (var i = 0; i < valuesToAdd; i++) { - crossingValues.push(defaultValue); - } - - return crossingValues; - }; - - PlotAreaBase.prototype.alignAxisTo = function alignAxisTo (axis, targetAxis, crossingValue, targetCrossingValue) { - var slot = axis.getSlot(crossingValue, crossingValue, true); - var slotEdge = axis.options.reverse ? 2 : 1; - var targetSlot = targetAxis.getSlot(targetCrossingValue, targetCrossingValue, true); - var targetEdge = targetAxis.options.reverse ? 2 : 1; - var axisBox = axis.box.translate( - targetSlot[__WEBPACK_IMPORTED_MODULE_5__common_constants__["G" /* X */] + targetEdge] - slot[__WEBPACK_IMPORTED_MODULE_5__common_constants__["G" /* X */] + slotEdge], - targetSlot[__WEBPACK_IMPORTED_MODULE_5__common_constants__["H" /* Y */] + targetEdge] - slot[__WEBPACK_IMPORTED_MODULE_5__common_constants__["H" /* Y */] + slotEdge] - ); - - if (axis.pane !== targetAxis.pane) { - axisBox.translate(0, axis.pane.box.y1 - targetAxis.pane.box.y1); - } - - axis.reflow(axisBox); - }; - - PlotAreaBase.prototype.alignAxes = function alignAxes (xAxes, yAxes) { - var this$1 = this; - - var xAnchor = xAxes[0]; - var yAnchor = yAxes[0]; - var xAnchorCrossings = this.axisCrossingValues(xAnchor, yAxes); - var yAnchorCrossings = this.axisCrossingValues(yAnchor, xAxes); - var leftAnchors = {}; - var rightAnchors = {}; - var topAnchors = {}; - var bottomAnchors = {}; - - for (var i = 0; i < yAxes.length; i++) { - var axis = yAxes[i]; - var pane = axis.pane; - var paneId = pane.id; - var visible = axis.options.visible !== false; - - // Locate pane anchor, if any, and use its axisCrossingValues - var anchor = paneAnchor(xAxes, pane) || xAnchor; - var anchorCrossings = xAnchorCrossings; - - if (anchor !== xAnchor) { - anchorCrossings = this$1.axisCrossingValues(anchor, yAxes); - } - - this$1.alignAxisTo(axis, anchor, yAnchorCrossings[i], anchorCrossings[i]); - - if (axis.options._overlap) { - continue; - } - - if (Object(__WEBPACK_IMPORTED_MODULE_6__common__["L" /* round */])(axis.lineBox().x1) === Object(__WEBPACK_IMPORTED_MODULE_6__common__["L" /* round */])(anchor.lineBox().x1)) { - // Push the axis to the left the previous y-axis so they don't overlap - if (leftAnchors[paneId]) { - axis.reflow(axis.box - .alignTo(leftAnchors[paneId].box, __WEBPACK_IMPORTED_MODULE_5__common_constants__["r" /* LEFT */]) - .translate(-axis.options.margin, 0) - ); - } - - if (visible) { - leftAnchors[paneId] = axis; - } - } - - if (Object(__WEBPACK_IMPORTED_MODULE_6__common__["L" /* round */])(axis.lineBox().x2) === Object(__WEBPACK_IMPORTED_MODULE_6__common__["L" /* round */])(anchor.lineBox().x2)) { - // Flip the labels on the right if we're at the right end of the pane - if (!axis._mirrored) { - axis.options.labels.mirror = !axis.options.labels.mirror; - axis._mirrored = true; - } - this$1.alignAxisTo(axis, anchor, yAnchorCrossings[i], anchorCrossings[i]); - - // Push the axis to the right the previous y-axis so they don't overlap - if (rightAnchors[paneId]) { - axis.reflow(axis.box - .alignTo(rightAnchors[paneId].box, __WEBPACK_IMPORTED_MODULE_5__common_constants__["z" /* RIGHT */]) - .translate(axis.options.margin, 0) - ); - } - - if (visible) { - rightAnchors[paneId] = axis; - } - } - - if (i !== 0 && yAnchor.pane === axis.pane) { - axis.alignTo(yAnchor); - axis.reflow(axis.box); - } - } - - for (var i$1 = 0; i$1 < xAxes.length; i$1++) { - var axis$1 = xAxes[i$1]; - var pane$1 = axis$1.pane; - var paneId$1 = pane$1.id; - var visible$1 = axis$1.options.visible !== false; - - // Locate pane anchor and use its axisCrossingValues - var anchor$1 = paneAnchor(yAxes, pane$1) || yAnchor; - var anchorCrossings$1 = yAnchorCrossings; - if (anchor$1 !== yAnchor) { - anchorCrossings$1 = this$1.axisCrossingValues(anchor$1, xAxes); - } - - this$1.alignAxisTo(axis$1, anchor$1, xAnchorCrossings[i$1], anchorCrossings$1[i$1]); - - if (axis$1.options._overlap) { - continue; - } - - if (Object(__WEBPACK_IMPORTED_MODULE_6__common__["L" /* round */])(axis$1.lineBox().y1) === Object(__WEBPACK_IMPORTED_MODULE_6__common__["L" /* round */])(anchor$1.lineBox().y1)) { - // Flip the labels on top if we're at the top of the pane - if (!axis$1._mirrored) { - axis$1.options.labels.mirror = !axis$1.options.labels.mirror; - axis$1._mirrored = true; - } - this$1.alignAxisTo(axis$1, anchor$1, xAnchorCrossings[i$1], anchorCrossings$1[i$1]); - - // Push the axis above the previous x-axis so they don't overlap - if (topAnchors[paneId$1]) { - axis$1.reflow(axis$1.box - .alignTo(topAnchors[paneId$1].box, __WEBPACK_IMPORTED_MODULE_5__common_constants__["B" /* TOP */]) - .translate(0, -axis$1.options.margin) - ); - } - - if (visible$1) { - topAnchors[paneId$1] = axis$1; - } - } - - if (Object(__WEBPACK_IMPORTED_MODULE_6__common__["L" /* round */])(axis$1.lineBox().y2, __WEBPACK_IMPORTED_MODULE_5__common_constants__["g" /* COORD_PRECISION */]) === Object(__WEBPACK_IMPORTED_MODULE_6__common__["L" /* round */])(anchor$1.lineBox().y2, __WEBPACK_IMPORTED_MODULE_5__common_constants__["g" /* COORD_PRECISION */])) { - // Push the axis below the previous x-axis so they don't overlap - if (bottomAnchors[paneId$1]) { - axis$1.reflow(axis$1.box - .alignTo(bottomAnchors[paneId$1].box, __WEBPACK_IMPORTED_MODULE_5__common_constants__["d" /* BOTTOM */]) - .translate(0, axis$1.options.margin) - ); - } - - if (visible$1) { - bottomAnchors[paneId$1] = axis$1; - } - } - - if (i$1 !== 0) { - axis$1.alignTo(xAnchor); - axis$1.reflow(axis$1.box); - } - } - }; - - PlotAreaBase.prototype.shrinkAxisWidth = function shrinkAxisWidth (panes) { - var axes = this.groupAxes(panes).any; - var axisBox = axisGroupBox(axes); - var overflowX = 0; - - for (var i = 0; i < panes.length; i++) { - var currentPane = panes[i]; - - if (currentPane.axes.length > 0) { - overflowX = Math.max( - overflowX, - axisBox.width() - currentPane.contentBox.width() - ); - } - } - - if (overflowX !== 0) { - for (var i$1 = 0; i$1 < axes.length; i$1++) { - var currentAxis = axes[i$1]; - - if (!currentAxis.options.vertical) { - currentAxis.reflow(currentAxis.box.shrink(overflowX, 0)); - } - } - } - }; - - PlotAreaBase.prototype.shrinkAxisHeight = function shrinkAxisHeight (panes) { - var shrinked; - - for (var i = 0; i < panes.length; i++) { - var currentPane = panes[i]; - var axes = currentPane.axes; - var overflowY = Math.max(0, axisGroupBox(axes).height() - currentPane.contentBox.height()); - - if (overflowY !== 0) { - for (var j = 0; j < axes.length; j++) { - var currentAxis = axes[j]; - - if (currentAxis.options.vertical) { - currentAxis.reflow( - currentAxis.box.shrink(0, overflowY) - ); - } - } - shrinked = true; - } - } - - return shrinked; - }; - - PlotAreaBase.prototype.fitAxes = function fitAxes (panes) { - var axes = this.groupAxes(panes).any; - var offsetX = 0; - - for (var i = 0; i < panes.length; i++) { - var currentPane = panes[i]; - var paneAxes = currentPane.axes; - var paneBox = currentPane.contentBox; - - if (paneAxes.length > 0) { - var axisBox = axisGroupBox(paneAxes); - // OffsetY is calculated and applied per pane - var offsetY = Math.max(paneBox.y1 - axisBox.y1, paneBox.y2 - axisBox.y2); - - // OffsetX is calculated and applied globally - offsetX = Math.max(offsetX, paneBox.x1 - axisBox.x1); - - - for (var j = 0; j < paneAxes.length; j++) { - var currentAxis = paneAxes[j]; - - currentAxis.reflow( - currentAxis.box.translate(0, offsetY) - ); - } - } - } - - for (var i$1 = 0; i$1 < axes.length; i$1++) { - var currentAxis$1 = axes[i$1]; - - currentAxis$1.reflow( - currentAxis$1.box.translate(offsetX, 0) - ); - } - }; - - PlotAreaBase.prototype.reflowAxes = function reflowAxes (panes) { - var this$1 = this; - - var axes = this.groupAxes(panes); - - for (var i = 0; i < panes.length; i++) { - this$1.reflowPaneAxes(panes[i]); - } - - if (axes.x.length > 0 && axes.y.length > 0) { - this.alignAxes(axes.x, axes.y); - this.shrinkAxisWidth(panes); - - this.autoRotateAxisLabels(axes); - - this.alignAxes(axes.x, axes.y); - if (this.shrinkAxisWidth(panes)) { - this.alignAxes(axes.x, axes.y); - } - - this.shrinkAxisHeight(panes); - this.alignAxes(axes.x, axes.y); - - if (this.shrinkAxisHeight(panes)) { - this.alignAxes(axes.x, axes.y); - } - - this.fitAxes(panes); - } - }; - - PlotAreaBase.prototype.autoRotateAxisLabels = function autoRotateAxisLabels (groupedAxes) { - var this$1 = this; - - var ref = this; - var axes = ref.axes; - var panes = ref.panes; - var rotated; - - for (var idx = 0; idx < axes.length; idx++) { - var axis = axes[idx]; - if (axis.autoRotateLabels()) { - rotated = true; - } - } - - if (rotated) { - for (var idx$1 = 0; idx$1 < panes.length; idx$1++) { - this$1.reflowPaneAxes(panes[idx$1]); - } - - if (groupedAxes.x.length > 0 && groupedAxes.y.length > 0) { - this.alignAxes(groupedAxes.x, groupedAxes.y); - this.shrinkAxisWidth(panes); - } - } - }; - - PlotAreaBase.prototype.reflowPaneAxes = function reflowPaneAxes (pane) { - var axes = pane.axes; - var length = axes.length; - - if (length > 0) { - for (var i = 0; i < length; i++) { - axes[i].reflow(pane.contentBox); - } - } - }; - - PlotAreaBase.prototype.reflowCharts = function reflowCharts (panes) { - var charts = this.charts; - var count = charts.length; - var box = this.box; - - for (var i = 0; i < count; i++) { - var chartPane = charts[i].pane; - if (!chartPane || Object(__WEBPACK_IMPORTED_MODULE_6__common__["x" /* inArray */])(chartPane, panes)) { - charts[i].reflow(box); - } - } - }; - - PlotAreaBase.prototype.reflowPanes = function reflowPanes () { - var ref = this; - var box = ref.box; - var panes = ref.panes; - var panesLength = panes.length; - var remainingHeight = box.height(); - var remainingPanes = panesLength; - var autoHeightPanes = 0; - var top = box.y1; - - for (var i = 0; i < panesLength; i++) { - var currentPane = panes[i]; - var height = currentPane.options.height; - - currentPane.options.width = box.width(); - - if (!currentPane.options.height) { - autoHeightPanes++; - } else { - if (height.indexOf && height.indexOf("%")) { - var percents = parseInt(height, 10) / 100; - currentPane.options.height = percents * box.height(); - } - - currentPane.reflow(box.clone()); - - remainingHeight -= currentPane.options.height; - } - } - - for (var i$1 = 0; i$1 < panesLength; i$1++) { - var currentPane$1 = panes[i$1]; - - if (!currentPane$1.options.height) { - currentPane$1.options.height = remainingHeight / autoHeightPanes; - } - } - - for (var i$2 = 0; i$2 < panesLength; i$2++) { - var currentPane$2 = panes[i$2]; - var paneBox = box - .clone() - .move(box.x1, top); - - currentPane$2.reflow(paneBox); - - remainingPanes--; - top += currentPane$2.options.height; - } - }; - - PlotAreaBase.prototype.backgroundBox = function backgroundBox () { - var axes = this.axes; - var axesCount = axes.length; - var box; - - for (var i = 0; i < axesCount; i++) { - var axisA = axes[i]; - - for (var j = 0; j < axesCount; j++) { - var axisB = axes[j]; - - if (axisA.options.vertical !== axisB.options.vertical) { - var lineBox = axisA.lineBox().clone().wrap(axisB.lineBox()); - - if (!box) { - box = lineBox; - } else { - box = box.wrap(lineBox); - } - } - } - } - - return box || this.box; - }; - - PlotAreaBase.prototype.chartsBoxes = function chartsBoxes () { - var panes = this.panes; - var boxes = []; - - for (var idx = 0; idx < panes.length; idx++) { - boxes.push(panes[idx].chartsBox()); - } - - return boxes; - }; - - PlotAreaBase.prototype.addBackgroundPaths = function addBackgroundPaths (multipath) { - var boxes = this.chartsBoxes(); - for (var idx = 0; idx < boxes.length; idx++) { - multipath.paths.push(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(boxes[idx].toRect())); - } - }; - - PlotAreaBase.prototype.backgroundContainsPoint = function backgroundContainsPoint (point) { - var boxes = this.chartsBoxes(); - for (var idx = 0; idx < boxes.length; idx++) { - if (boxes[idx].containsPoint(point)) { - return true; - } - } - }; - - PlotAreaBase.prototype.createVisual = function createVisual () { - ChartElement.prototype.createVisual.call(this); - - var options = this.options.plotArea; - var opacity = options.opacity; - var background = options.background; - var border = options.border; if ( border === void 0 ) border = {}; - if (isTransparent(background)) { - background = __WEBPACK_IMPORTED_MODULE_5__common_constants__["E" /* WHITE */]; - opacity = 0; - } - - var bg = this._bgVisual = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].MultiPath({ - fill: { - color: background, - opacity: opacity - }, - stroke: { - color: border.width ? border.color : "", - width: border.width, - dashType: border.dashType - }, - zIndex: -1 - }); - - this.addBackgroundPaths(bg); - - this.appendVisual(bg); - }; - - PlotAreaBase.prototype.pointsByCategoryIndex = function pointsByCategoryIndex (categoryIndex) { - var charts = this.charts; - var result = []; - - if (categoryIndex !== null) { - for (var i = 0; i < charts.length; i++) { - var chart = charts[i]; - if (chart.pane.options.name === "_navigator") { - continue; - } - - var points = charts[i].categoryPoints[categoryIndex]; - if (points && points.length) { - for (var j = 0; j < points.length; j++) { - var point = points[j]; - if (point && Object(__WEBPACK_IMPORTED_MODULE_6__common__["l" /* defined */])(point.value) && point.value !== null) { - result.push(point); - } - } - } - } - } - - return result; - }; - - PlotAreaBase.prototype.pointsBySeriesIndex = function pointsBySeriesIndex (seriesIndex) { - return this.filterPoints(function(point) { - return point.series.index === seriesIndex; - }); - }; - - PlotAreaBase.prototype.pointsBySeriesName = function pointsBySeriesName (name) { - return this.filterPoints(function(point) { - return point.series.name === name; - }); - }; - - PlotAreaBase.prototype.filterPoints = function filterPoints (callback) { - var charts = this.charts; - var result = []; - - for (var i = 0; i < charts.length; i++) { - var chart = charts[i]; - var points = chart.points; - for (var j = 0; j < points.length; j++) { - var point = points[j]; - if (point && point.visible !== false && callback(point)) { - result.push(point); - } - } - } - - return result; - }; - - PlotAreaBase.prototype.findPoint = function findPoint (callback) { - var charts = this.charts; - - for (var i = 0; i < charts.length; i++) { - var chart = charts[i]; - var points = chart.points; - for (var j = 0; j < points.length; j++) { - var point = points[j]; - if (point && point.visible !== false && callback(point)) { - return point; - } - } - } - }; - - PlotAreaBase.prototype.paneByPoint = function paneByPoint (point) { - var panes = this.panes; - - for (var i = 0; i < panes.length; i++) { - var pane = panes[i]; - if (pane.box.containsPoint(point)) { - return pane; - } - } - }; - - return PlotAreaBase; -}(__WEBPACK_IMPORTED_MODULE_1__core__["d" /* ChartElement */])); - -function axisGroupBox(axes) { - var length = axes.length; - var box; - - if (length > 0) { - for (var i = 0; i < length; i++) { - var axisBox = axes[i].contentBox(); - - if (!box) { - box = axisBox.clone(); - } else { - box.wrap(axisBox); - } - } - } - - return box || new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */](); -} - -function paneAnchor(axes, pane) { - for (var i = 0; i < axes.length; i++) { - var anchor = axes[i]; - if (anchor && anchor.pane === pane) { - return anchor; - } - } -} - -function isTransparent(color) { - return color === "" || color === null || color === "none" || color === "transparent" || !Object(__WEBPACK_IMPORTED_MODULE_6__common__["l" /* defined */])(color); -} - - -Object(__WEBPACK_IMPORTED_MODULE_6__common__["M" /* setDefaultOptions */])(PlotAreaBase, { - series: [], - plotArea: { - margin: {} - }, - background: "", - border: { - color: __WEBPACK_IMPORTED_MODULE_5__common_constants__["c" /* BLACK */], - width: 0 - }, - legend: { - inactiveItems: { - labels: { - color: "#919191" - }, - markers: { - color: "#919191" - } - } - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (PlotAreaBase); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/plotarea/plotarea-factory.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_filter_series_by_type__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/filter-series-by-type.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - -var PlotAreaFactory = (function (Class) { - function PlotAreaFactory() { - Class.call(this); - - this._registry = []; - } - - if ( Class ) PlotAreaFactory.__proto__ = Class; - PlotAreaFactory.prototype = Object.create( Class && Class.prototype ); - PlotAreaFactory.prototype.constructor = PlotAreaFactory; - - PlotAreaFactory.prototype.register = function register (type, seriesTypes) { - this._registry.push({ - type: type, - seriesTypes: seriesTypes - }); - }; - - PlotAreaFactory.prototype.create = function create (srcSeries, options, chartService) { - var registry = this._registry; - var match = registry[0]; - var series; - - for (var idx = 0; idx < registry.length; idx++) { - var entry = registry[idx]; - series = Object(__WEBPACK_IMPORTED_MODULE_0__utils_filter_series_by_type__["a" /* default */])(srcSeries, entry.seriesTypes); - - if (series.length > 0) { - match = entry; - break; - } - } - - return new match.type(series, options, chartService); - }; - - return PlotAreaFactory; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -PlotAreaFactory.current = new PlotAreaFactory(); - -/* harmony default export */ __webpack_exports__["a"] = (PlotAreaFactory); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/plotarea/polar-plotarea-base.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__plotarea_base__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/plotarea-base.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__axis_group_range_tracker__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/axis-group-range-tracker.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); - - - - - - - - - -var DEFAULT_PADDING = 0.15; - -var PolarPlotAreaBase = (function (PlotAreaBase) { - function PolarPlotAreaBase () { - PlotAreaBase.apply(this, arguments); - } - - if ( PlotAreaBase ) PolarPlotAreaBase.__proto__ = PlotAreaBase; - PolarPlotAreaBase.prototype = Object.create( PlotAreaBase && PlotAreaBase.prototype ); - PolarPlotAreaBase.prototype.constructor = PolarPlotAreaBase; - - PolarPlotAreaBase.prototype.initFields = function initFields () { - this.valueAxisRangeTracker = new __WEBPACK_IMPORTED_MODULE_1__axis_group_range_tracker__["a" /* default */](); - }; - - PolarPlotAreaBase.prototype.render = function render () { - this.addToLegend(this.series); - this.createPolarAxis(); - this.createCharts(); - this.createValueAxis(); - }; - - PolarPlotAreaBase.prototype.alignAxes = function alignAxes () { - var axis = this.valueAxis; - var range = axis.range(); - var crossingValue = axis.options.reverse ? range.max : range.min; - var slot = axis.getSlot(crossingValue); - var center = this.polarAxis.getSlot(0).center; - var axisBox = axis.box.translate( - center.x - slot.x1, - center.y - slot.y1 - ); - - axis.reflow(axisBox); - }; - - PolarPlotAreaBase.prototype.createValueAxis = function createValueAxis () { - var tracker = this.valueAxisRangeTracker; - var defaultRange = tracker.query(); - var axisOptions = this.valueAxisOptions({ - roundToMajorUnit: false, - zIndex: -1 - }); - var axisType, axisDefaultRange; - - if (axisOptions.type === __WEBPACK_IMPORTED_MODULE_3__constants__["F" /* LOGARITHMIC */]) { - axisType = __WEBPACK_IMPORTED_MODULE_2__core__["o" /* RadarLogarithmicAxis */]; - axisDefaultRange = { min: 0.1, max: 1 }; - } else { - axisType = __WEBPACK_IMPORTED_MODULE_2__core__["p" /* RadarNumericAxis */]; - axisDefaultRange = { min: 0, max: 1 }; - } - - var range = tracker.query(name) || defaultRange || axisDefaultRange; - - if (range && defaultRange) { - range.min = Math.min(range.min, defaultRange.min); - range.max = Math.max(range.max, defaultRange.max); - } - - var valueAxis = new axisType( - range.min, range.max, - axisOptions, - this.chartService - ); - - this.valueAxis = valueAxis; - this.appendAxis(valueAxis); - }; - - PolarPlotAreaBase.prototype.reflowAxes = function reflowAxes () { - var ref = this; - var options = ref.options.plotArea; - var valueAxis = ref.valueAxis; - var polarAxis = ref.polarAxis; - var box = ref.box; - var defaultPadding = Math.min(box.width(), box.height()) * DEFAULT_PADDING; - var padding = Object(__WEBPACK_IMPORTED_MODULE_4__common__["s" /* getSpacing */])(options.padding || {}, defaultPadding); - var paddingBox = box.clone().unpad(padding); - var axisBox = paddingBox.clone(); - - axisBox.y2 = axisBox.y1 + Math.min(axisBox.width(), axisBox.height()); - axisBox.align(paddingBox, __WEBPACK_IMPORTED_MODULE_5__common_constants__["H" /* Y */], __WEBPACK_IMPORTED_MODULE_5__common_constants__["e" /* CENTER */]); - - var valueAxisBox = axisBox.clone().shrink(0, axisBox.height() / 2); - - polarAxis.reflow(axisBox); - valueAxis.reflow(valueAxisBox); - var heightDiff = valueAxis.lineBox().height() - valueAxis.box.height(); - valueAxis.reflow(valueAxis.box.unpad({ top: heightDiff })); - - this.axisBox = axisBox; - this.alignAxes(axisBox); - }; - - PolarPlotAreaBase.prototype.backgroundBox = function backgroundBox () { - return this.box; - }; - - return PolarPlotAreaBase; -}(__WEBPACK_IMPORTED_MODULE_0__plotarea_base__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (PolarPlotAreaBase); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/plotarea/polar-plotarea.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__polar_plotarea_base__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/polar-plotarea-base.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__plotarea_base__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/plotarea-base.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__polar_line_chart_polar_line_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/polar-line-chart/polar-line-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__polar_scatter_chart_polar_scatter_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/polar-scatter-chart/polar-scatter-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__polar_area_chart_polar_area_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/polar-area-chart/polar-area-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__mixins_plotarea_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/plotarea-events-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/filter-series-by-type.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - - - - - -var PolarPlotArea = (function (PolarPlotAreaBase) { - function PolarPlotArea () { - PolarPlotAreaBase.apply(this, arguments); - } - - if ( PolarPlotAreaBase ) PolarPlotArea.__proto__ = PolarPlotAreaBase; - PolarPlotArea.prototype = Object.create( PolarPlotAreaBase && PolarPlotAreaBase.prototype ); - PolarPlotArea.prototype.constructor = PolarPlotArea; - - PolarPlotArea.prototype.createPolarAxis = function createPolarAxis () { - var polarAxis = new __WEBPACK_IMPORTED_MODULE_6__core__["m" /* PolarAxis */](this.options.xAxis, this.chartService); - - this.polarAxis = polarAxis; - this.axisX = polarAxis; - this.appendAxis(polarAxis); - }; - - PolarPlotArea.prototype.valueAxisOptions = function valueAxisOptions (defaults) { - return Object(__WEBPACK_IMPORTED_MODULE_10__common__["k" /* deepExtend */])(defaults, { - majorGridLines: { type: __WEBPACK_IMPORTED_MODULE_9__common_constants__["a" /* ARC */] }, - minorGridLines: { type: __WEBPACK_IMPORTED_MODULE_9__common_constants__["a" /* ARC */] } - }, this.options.yAxis); - }; - - PolarPlotArea.prototype.createValueAxis = function createValueAxis () { - PolarPlotAreaBase.prototype.createValueAxis.call(this); - this.axisY = this.valueAxis; - }; - - PolarPlotArea.prototype.appendChart = function appendChart (chart, pane) { - this.valueAxisRangeTracker.update(chart.yAxisRanges); - - __WEBPACK_IMPORTED_MODULE_1__plotarea_base__["a" /* default */].prototype.appendChart.call(this, chart, pane); - }; - - PolarPlotArea.prototype.createCharts = function createCharts () { - var series = this.filterVisibleSeries(this.series); - var pane = this.panes[0]; - - this.createLineChart( - Object(__WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__["a" /* default */])(series, [ __WEBPACK_IMPORTED_MODULE_7__constants__["O" /* POLAR_LINE */] ]), - pane - ); - - this.createScatterChart( - Object(__WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__["a" /* default */])(series, [ __WEBPACK_IMPORTED_MODULE_7__constants__["P" /* POLAR_SCATTER */] ]), - pane - ); - - this.createAreaChart( - Object(__WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__["a" /* default */])(series, [ __WEBPACK_IMPORTED_MODULE_7__constants__["N" /* POLAR_AREA */] ]), - pane - ); - }; - - PolarPlotArea.prototype.createLineChart = function createLineChart (series, pane) { - if (series.length === 0) { - return; - } - - var lineChart = new __WEBPACK_IMPORTED_MODULE_2__polar_line_chart_polar_line_chart__["a" /* default */](this, { series: series }); - - this.appendChart(lineChart, pane); - }; - - PolarPlotArea.prototype.createScatterChart = function createScatterChart (series, pane) { - if (series.length === 0) { - return; - } - - var scatterChart = new __WEBPACK_IMPORTED_MODULE_3__polar_scatter_chart_polar_scatter_chart__["a" /* default */](this, { series: series }); - - this.appendChart(scatterChart, pane); - }; - - PolarPlotArea.prototype.createAreaChart = function createAreaChart (series, pane) { - if (series.length === 0) { - return; - } - - var areaChart = new __WEBPACK_IMPORTED_MODULE_4__polar_area_chart_polar_area_chart__["a" /* default */](this, { series: series }); - - this.appendChart(areaChart, pane); - }; - - PolarPlotArea.prototype._dispatchEvent = function _dispatchEvent (chart, e, eventType) { - var coords = chart._eventCoordinates(e); - var point = new __WEBPACK_IMPORTED_MODULE_6__core__["l" /* Point */](coords.x, coords.y); - var xValue = this.axisX.getValue(point); - var yValue = this.axisY.getValue(point); - - if (xValue !== null && yValue !== null) { - chart.trigger(eventType, { - element: Object(__WEBPACK_IMPORTED_MODULE_10__common__["r" /* eventElement */])(e), - x: xValue, - y: yValue - }); - } - }; - - PolarPlotArea.prototype.createCrosshairs = function createCrosshairs () {}; - - return PolarPlotArea; -}(__WEBPACK_IMPORTED_MODULE_0__polar_plotarea_base__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_10__common__["M" /* setDefaultOptions */])(PolarPlotArea, { - xAxis: {}, - yAxis: {} -}); - -Object(__WEBPACK_IMPORTED_MODULE_10__common__["k" /* deepExtend */])(PolarPlotArea.prototype, __WEBPACK_IMPORTED_MODULE_5__mixins_plotarea_events_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (PolarPlotArea); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/plotarea/radar-plotarea.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__polar_plotarea_base__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/polar-plotarea-base.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__categorical_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/categorical-plotarea.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__radar_area_chart_radar_area_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/radar-area-chart/radar-area-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__radar_line_chart_radar_line_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/radar-line-chart/radar-line-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__radar_bar_chart_radar_bar_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/radar-bar-chart/radar-bar-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__mixins_plotarea_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/plotarea-events-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/filter-series-by-type.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - - - - - -var RadarPlotArea = (function (PolarPlotAreaBase) { - function RadarPlotArea () { - PolarPlotAreaBase.apply(this, arguments); - } - - if ( PolarPlotAreaBase ) RadarPlotArea.__proto__ = PolarPlotAreaBase; - RadarPlotArea.prototype = Object.create( PolarPlotAreaBase && PolarPlotAreaBase.prototype ); - RadarPlotArea.prototype.constructor = RadarPlotArea; - - RadarPlotArea.prototype.createPolarAxis = function createPolarAxis () { - var categoryAxis = new __WEBPACK_IMPORTED_MODULE_6__core__["n" /* RadarCategoryAxis */](this.options.categoryAxis, this.chartService); - - this.polarAxis = categoryAxis; - this.categoryAxis = categoryAxis; - this.appendAxis(categoryAxis); - this.aggregateCategories(); - this.createCategoryAxesLabels(); - }; - - RadarPlotArea.prototype.valueAxisOptions = function valueAxisOptions (defaults) { - if (this._hasBarCharts) { - Object(__WEBPACK_IMPORTED_MODULE_10__common__["k" /* deepExtend */])(defaults, { - majorGridLines: { type: __WEBPACK_IMPORTED_MODULE_9__common_constants__["a" /* ARC */] }, - minorGridLines: { type: __WEBPACK_IMPORTED_MODULE_9__common_constants__["a" /* ARC */] } - }); - } - - if (this._isStacked100) { - Object(__WEBPACK_IMPORTED_MODULE_10__common__["k" /* deepExtend */])(defaults, { - roundToMajorUnit: false, - labels: { format: "P0" } - }); - } - - return Object(__WEBPACK_IMPORTED_MODULE_10__common__["k" /* deepExtend */])(defaults, this.options.valueAxis); - }; - - RadarPlotArea.prototype.aggregateCategories = function aggregateCategories () { - // No separate panes in radar charts - __WEBPACK_IMPORTED_MODULE_1__categorical_plotarea__["a" /* default */].prototype.aggregateCategories.call(this, this.panes); - }; - - RadarPlotArea.prototype.createCategoryAxesLabels = function createCategoryAxesLabels () { - __WEBPACK_IMPORTED_MODULE_1__categorical_plotarea__["a" /* default */].prototype.createCategoryAxesLabels.call(this, this.panes); - }; - - RadarPlotArea.prototype.filterSeries = function filterSeries (currentSeries) { - // Not supported for radar charts - return currentSeries; - }; - - RadarPlotArea.prototype.createCharts = function createCharts () { - var series = this.filterVisibleSeries(this.series); - var pane = this.panes[0]; - - this.createAreaChart( - Object(__WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__["a" /* default */])(series, [ __WEBPACK_IMPORTED_MODULE_7__constants__["Q" /* RADAR_AREA */] ]), - pane - ); - - this.createLineChart( - Object(__WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__["a" /* default */])(series, [ __WEBPACK_IMPORTED_MODULE_7__constants__["S" /* RADAR_LINE */] ]), - pane - ); - - this.createBarChart( - Object(__WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__["a" /* default */])(series, [ __WEBPACK_IMPORTED_MODULE_7__constants__["R" /* RADAR_COLUMN */] ]), - pane - ); - }; - - RadarPlotArea.prototype.chartOptions = function chartOptions (series) { - var options = { series: series }; - var firstSeries = series[0]; - if (firstSeries) { - var filteredSeries = this.filterVisibleSeries(series); - var stack = firstSeries.stack; - options.isStacked = stack && filteredSeries.length > 1; - options.isStacked100 = stack && stack.type === "100%" && filteredSeries.length > 1; - - if (options.isStacked100) { - this._isStacked100 = true; - } - } - - return options; - }; - - RadarPlotArea.prototype.createAreaChart = function createAreaChart (series, pane) { - if (series.length === 0) { - return; - } - - var areaChart = new __WEBPACK_IMPORTED_MODULE_2__radar_area_chart_radar_area_chart__["a" /* default */](this, this.chartOptions(series)); - this.appendChart(areaChart, pane); - }; - - RadarPlotArea.prototype.createLineChart = function createLineChart (series, pane) { - if (series.length === 0) { - return; - } - - var lineChart = new __WEBPACK_IMPORTED_MODULE_3__radar_line_chart_radar_line_chart__["a" /* default */](this, this.chartOptions(series)); - this.appendChart(lineChart, pane); - }; - - RadarPlotArea.prototype.createBarChart = function createBarChart (series, pane) { - if (series.length === 0) { - return; - } - - var firstSeries = series[0]; - var options = this.chartOptions(series); - options.gap = firstSeries.gap; - options.spacing = firstSeries.spacing; - - var barChart = new __WEBPACK_IMPORTED_MODULE_4__radar_bar_chart_radar_bar_chart__["a" /* default */](this, options); - this.appendChart(barChart, pane); - - this._hasBarCharts = true; - }; - - RadarPlotArea.prototype.seriesCategoryAxis = function seriesCategoryAxis () { - return this.categoryAxis; - }; - - RadarPlotArea.prototype._dispatchEvent = function _dispatchEvent (chart, e, eventType) { - var coords = chart._eventCoordinates(e); - var point = new __WEBPACK_IMPORTED_MODULE_6__core__["l" /* Point */](coords.x, coords.y); - var category = this.categoryAxis.getCategory(point); - var value = this.valueAxis.getValue(point); - - if (category !== null && value !== null) { - chart.trigger(eventType, { - element: Object(__WEBPACK_IMPORTED_MODULE_10__common__["r" /* eventElement */])(e), - category: category, - value: value - }); - } - }; - - RadarPlotArea.prototype.createCrosshairs = function createCrosshairs () {}; - - return RadarPlotArea; -}(__WEBPACK_IMPORTED_MODULE_0__polar_plotarea_base__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_10__common__["k" /* deepExtend */])(RadarPlotArea.prototype, __WEBPACK_IMPORTED_MODULE_5__mixins_plotarea_events_mixin__["a" /* default */], { - appendChart: __WEBPACK_IMPORTED_MODULE_1__categorical_plotarea__["a" /* default */].prototype.appendChart, - aggregateSeries: __WEBPACK_IMPORTED_MODULE_1__categorical_plotarea__["a" /* default */].prototype.aggregateSeries, - seriesSourcePoints: __WEBPACK_IMPORTED_MODULE_1__categorical_plotarea__["a" /* default */].prototype.seriesSourcePoints -}); - -Object(__WEBPACK_IMPORTED_MODULE_10__common__["M" /* setDefaultOptions */])(RadarPlotArea, { - categoryAxis: { - categories: [] - }, - valueAxis: {} -}); - -/* harmony default export */ __webpack_exports__["a"] = (RadarPlotArea); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/plotarea/xy-plotarea.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__plotarea_base__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/plotarea-base.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__axis_group_range_tracker__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/axis-group-range-tracker.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_plotarea_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/plotarea-events-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__scatter_charts_scatter_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/scatter-charts/scatter-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__scatter_charts_scatter_line_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/scatter-charts/scatter-line-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__bubble_chart_bubble_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bubble-chart/bubble-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__series_binder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/series-binder.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/filter-series-by-type.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_equals_ignore_case__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/equals-ignore-case.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_single_item_or_array__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/single-item-or-array.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - - - - - - - - -var XYPlotArea = (function (PlotAreaBase) { - function XYPlotArea () { - PlotAreaBase.apply(this, arguments); - } - - if ( PlotAreaBase ) XYPlotArea.__proto__ = PlotAreaBase; - XYPlotArea.prototype = Object.create( PlotAreaBase && PlotAreaBase.prototype ); - XYPlotArea.prototype.constructor = XYPlotArea; - - XYPlotArea.prototype.initFields = function initFields () { - this.namedXAxes = {}; - this.namedYAxes = {}; - - this.xAxisRangeTracker = new __WEBPACK_IMPORTED_MODULE_1__axis_group_range_tracker__["a" /* default */](); - this.yAxisRangeTracker = new __WEBPACK_IMPORTED_MODULE_1__axis_group_range_tracker__["a" /* default */](); - }; - - XYPlotArea.prototype.render = function render (panes) { - var this$1 = this; - if ( panes === void 0 ) panes = this.panes; - - var seriesByPane = this.groupSeriesByPane(); - - for (var i = 0; i < panes.length; i++) { - var pane = panes[i]; - var paneSeries = seriesByPane[pane.options.name || "default"] || []; - this$1.addToLegend(paneSeries); - var filteredSeries = this$1.filterVisibleSeries(paneSeries); - - if (!filteredSeries) { - continue; - } - - this$1.createScatterChart( - Object(__WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__["a" /* default */])(filteredSeries, __WEBPACK_IMPORTED_MODULE_11__constants__["X" /* SCATTER */]), - pane - ); - - this$1.createScatterLineChart( - Object(__WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__["a" /* default */])(filteredSeries, __WEBPACK_IMPORTED_MODULE_11__constants__["Y" /* SCATTER_LINE */]), - pane - ); - - this$1.createBubbleChart( - Object(__WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__["a" /* default */])(filteredSeries, __WEBPACK_IMPORTED_MODULE_11__constants__["g" /* BUBBLE */]), - pane - ); - } - - this.createAxes(panes); - }; - - XYPlotArea.prototype.appendChart = function appendChart (chart, pane) { - this.xAxisRangeTracker.update(chart.xAxisRanges); - this.yAxisRangeTracker.update(chart.yAxisRanges); - - PlotAreaBase.prototype.appendChart.call(this, chart, pane); - }; - - XYPlotArea.prototype.removeAxis = function removeAxis (axis) { - var axisName = axis.options.name; - - PlotAreaBase.prototype.removeAxis.call(this, axis); - - if (axis.options.vertical) { - this.yAxisRangeTracker.reset(axisName); - delete this.namedYAxes[axisName]; - } else { - this.xAxisRangeTracker.reset(axisName); - delete this.namedXAxes[axisName]; - } - - if (axis === this.axisX) { - delete this.axisX; - } - - if (axis === this.axisY) { - delete this.axisY; - } - }; - - // TODO: Refactor, optionally use series.pane option - XYPlotArea.prototype.seriesPaneName = function seriesPaneName (series) { - var options = this.options; - var xAxisName = series.xAxis; - var xAxisOptions = [].concat(options.xAxis); - var xAxis = Object(__WEBPACK_IMPORTED_MODULE_13__common__["v" /* grep */])(xAxisOptions, function(a) { return a.name === xAxisName; })[0]; - var yAxisName = series.yAxis; - var yAxisOptions = [].concat(options.yAxis); - var yAxis = Object(__WEBPACK_IMPORTED_MODULE_13__common__["v" /* grep */])(yAxisOptions, function(a) { return a.name === yAxisName; })[0]; - var panes = options.panes || [ {} ]; - var defaultPaneName = panes[0].name || "default"; - var paneName = (xAxis || {}).pane || (yAxis || {}).pane || defaultPaneName; - - return paneName; - }; - - XYPlotArea.prototype.createScatterChart = function createScatterChart (series, pane) { - if (series.length > 0) { - this.appendChart( - new __WEBPACK_IMPORTED_MODULE_3__scatter_charts_scatter_chart__["a" /* default */](this, { series: series, clip: pane.options.clip }), - pane - ); - } - }; - - XYPlotArea.prototype.createScatterLineChart = function createScatterLineChart (series, pane) { - if (series.length > 0) { - this.appendChart( - new __WEBPACK_IMPORTED_MODULE_4__scatter_charts_scatter_line_chart__["a" /* default */](this, { series: series, clip: pane.options.clip }), - pane - ); - } - }; - - XYPlotArea.prototype.createBubbleChart = function createBubbleChart (series, pane) { - if (series.length > 0) { - this.appendChart( - new __WEBPACK_IMPORTED_MODULE_5__bubble_chart_bubble_chart__["a" /* default */](this, { series: series, clip: pane.options.clip }), - pane - ); - } - }; - - XYPlotArea.prototype.createXYAxis = function createXYAxis (options, vertical, axisIndex) { - var axisName = options.name; - var namedAxes = vertical ? this.namedYAxes : this.namedXAxes; - var tracker = vertical ? this.yAxisRangeTracker : this.xAxisRangeTracker; - var axisOptions = Object(__WEBPACK_IMPORTED_MODULE_13__common__["k" /* deepExtend */])({ reverse: !vertical && this.chartService.rtl }, options, { vertical: vertical }); - var isLog = Object(__WEBPACK_IMPORTED_MODULE_9__utils_equals_ignore_case__["a" /* default */])(axisOptions.type, __WEBPACK_IMPORTED_MODULE_11__constants__["F" /* LOGARITHMIC */]); - var defaultRange = tracker.query(); - var defaultAxisRange = isLog ? { min: 0.1, max: 1 } : { min: 0, max: 1 }; - var range = tracker.query(axisName) || defaultRange || defaultAxisRange; - var typeSamples = [ axisOptions.min, axisOptions.max ]; - var series = this.series; - - for (var seriesIx = 0; seriesIx < series.length; seriesIx++) { - var currentSeries = series[seriesIx]; - var seriesAxisName = currentSeries[vertical ? "yAxis" : "xAxis"]; - if ((seriesAxisName === axisOptions.name) || (axisIndex === 0 && !seriesAxisName)) { - var firstPointValue = __WEBPACK_IMPORTED_MODULE_6__series_binder__["a" /* default */].current.bindPoint(currentSeries, 0).valueFields; - typeSamples.push(firstPointValue[vertical ? "y" : "x"]); - - break; - } - } - - if (axisIndex === 0 && defaultRange) { - range.min = Math.min(range.min, defaultRange.min); - range.max = Math.max(range.max, defaultRange.max); - } - - var inferredDate; - - for (var i = 0; i < typeSamples.length; i++) { - if (typeSamples[i] instanceof Date) { - inferredDate = true; - break; - } - } - - var axisType; - if (Object(__WEBPACK_IMPORTED_MODULE_9__utils_equals_ignore_case__["a" /* default */])(axisOptions.type, __WEBPACK_IMPORTED_MODULE_12__common_constants__["i" /* DATE */]) || (!axisOptions.type && inferredDate)) { - axisType = __WEBPACK_IMPORTED_MODULE_7__core__["g" /* DateValueAxis */]; - } else if (isLog) { - axisType = __WEBPACK_IMPORTED_MODULE_7__core__["i" /* LogarithmicAxis */]; - } else { - axisType = __WEBPACK_IMPORTED_MODULE_7__core__["k" /* NumericAxis */]; - } - - var axis = new axisType(range.min, range.max, axisOptions, this.chartService); - axis.axisIndex = axisIndex; - - if (axisName) { - if (namedAxes[axisName]) { - throw new Error(((vertical ? "Y" : "X") + " axis with name " + axisName + " is already defined")); - } - namedAxes[axisName] = axis; - } - - this.appendAxis(axis); - - return axis; - }; - - XYPlotArea.prototype.createAxes = function createAxes (panes) { - var this$1 = this; - - var options = this.options; - var xAxesOptions = [].concat(options.xAxis); - var xAxes = []; - var yAxesOptions = [].concat(options.yAxis); - var yAxes = []; - - for (var idx = 0; idx < xAxesOptions.length; idx++) { - var axisPane = this$1.findPane(xAxesOptions[idx].pane); - if (Object(__WEBPACK_IMPORTED_MODULE_13__common__["x" /* inArray */])(axisPane, panes)) { - xAxes.push(this$1.createXYAxis(xAxesOptions[idx], false, idx)); - } - } - - for (var idx$1 = 0; idx$1 < yAxesOptions.length; idx$1++) { - var axisPane$1 = this$1.findPane(yAxesOptions[idx$1].pane); - if (Object(__WEBPACK_IMPORTED_MODULE_13__common__["x" /* inArray */])(axisPane$1, panes)) { - yAxes.push(this$1.createXYAxis(yAxesOptions[idx$1], true, idx$1)); - } - } - - this.axisX = this.axisX || xAxes[0]; - this.axisY = this.axisY || yAxes[0]; - }; - - XYPlotArea.prototype._dispatchEvent = function _dispatchEvent (chart, e, eventType) { - var coords = chart._eventCoordinates(e); - var point = new __WEBPACK_IMPORTED_MODULE_7__core__["l" /* Point */](coords.x, coords.y); - var allAxes = this.axes; - var length = allAxes.length; - var xValues = []; - var yValues = []; - - for (var i = 0; i < length; i++) { - var axis = allAxes[i]; - var values = axis.options.vertical ? yValues : xValues; - var currentValue = axis.getValue(point); - if (currentValue !== null) { - values.push(currentValue); - } - } - - if (xValues.length > 0 && yValues.length > 0) { - chart.trigger(eventType, { - element: Object(__WEBPACK_IMPORTED_MODULE_13__common__["r" /* eventElement */])(e), - originalEvent: e, - x: Object(__WEBPACK_IMPORTED_MODULE_10__utils_single_item_or_array__["a" /* default */])(xValues), - y: Object(__WEBPACK_IMPORTED_MODULE_10__utils_single_item_or_array__["a" /* default */])(yValues) - }); - } - }; - - XYPlotArea.prototype.updateAxisOptions = function updateAxisOptions$1 (axis, options) { - var vertical = axis.options.vertical; - var axes = this.groupAxes(this.panes); - var index = (vertical ? axes.y : axes.x).indexOf(axis); - - updateAxisOptions(this.options, index, vertical, options); - updateAxisOptions(this.originalOptions, index, vertical, options); - }; - - return XYPlotArea; -}(__WEBPACK_IMPORTED_MODULE_0__plotarea_base__["a" /* default */])); - -function updateAxisOptions(targetOptions, axisIndex, vertical, options) { - var axisOptions = ([].concat(vertical ? targetOptions.yAxis : targetOptions.xAxis))[axisIndex]; - Object(__WEBPACK_IMPORTED_MODULE_13__common__["k" /* deepExtend */])(axisOptions, options); -} - -Object(__WEBPACK_IMPORTED_MODULE_13__common__["M" /* setDefaultOptions */])(XYPlotArea, { - xAxis: {}, - yAxis: {} -}); - -Object(__WEBPACK_IMPORTED_MODULE_13__common__["k" /* deepExtend */])(XYPlotArea.prototype, __WEBPACK_IMPORTED_MODULE_2__mixins_plotarea_events_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (XYPlotArea); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/polar-area-chart/polar-area-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__polar_line_chart_polar_line_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/polar-line-chart/polar-line-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__spline_polar_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/polar-area-chart/spline-polar-area-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__polar_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/polar-area-chart/polar-area-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_has_value__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/has-value.js"); - - - - - - - - -var PolarAreaChart = (function (PolarLineChart) { - function PolarAreaChart () { - PolarLineChart.apply(this, arguments); - } - - if ( PolarLineChart ) PolarAreaChart.__proto__ = PolarLineChart; - PolarAreaChart.prototype = Object.create( PolarLineChart && PolarLineChart.prototype ); - PolarAreaChart.prototype.constructor = PolarAreaChart; - - PolarAreaChart.prototype.createSegment = function createSegment (linePoints, currentSeries, seriesIx) { - var style = (currentSeries.line || {}).style; - var segment; - - if (style === __WEBPACK_IMPORTED_MODULE_3__constants__["_5" /* SMOOTH */]) { - segment = new __WEBPACK_IMPORTED_MODULE_1__spline_polar_area_segment__["a" /* default */](linePoints, currentSeries, seriesIx); - } else { - segment = new __WEBPACK_IMPORTED_MODULE_2__polar_area_segment__["a" /* default */](linePoints, currentSeries, seriesIx); - } - return segment; - }; - - PolarAreaChart.prototype.createMissingValue = function createMissingValue (value, missingValues) { - var missingValue; - - if (Object(__WEBPACK_IMPORTED_MODULE_4__utils_has_value__["a" /* default */])(value.x) && missingValues !== __WEBPACK_IMPORTED_MODULE_3__constants__["A" /* INTERPOLATE */]) { - missingValue = { - x: value.x, - y: value.y - }; - if (missingValues === __WEBPACK_IMPORTED_MODULE_3__constants__["_19" /* ZERO */]) { - missingValue.y = 0; - } - } - - return missingValue; - }; - - PolarAreaChart.prototype.seriesMissingValues = function seriesMissingValues (series) { - return series.missingValues || __WEBPACK_IMPORTED_MODULE_3__constants__["_19" /* ZERO */]; - }; - - PolarAreaChart.prototype._hasMissingValuesGap = function _hasMissingValuesGap () { - var this$1 = this; - - var series = this.options.series; - - for (var idx = 0; idx < series.length; idx++) { - if (this$1.seriesMissingValues(series[idx]) === __WEBPACK_IMPORTED_MODULE_3__constants__["u" /* GAP */]) { - return true; - } - } - }; - - PolarAreaChart.prototype.sortPoints = function sortPoints (points) { - var this$1 = this; - - points.sort(xComparer); - - if (this._hasMissingValuesGap()) { - for (var idx = 0; idx < points.length; idx++) { - var point = points[idx]; - if (point) { - var value = point.value; - if (!Object(__WEBPACK_IMPORTED_MODULE_4__utils_has_value__["a" /* default */])(value.y) && this$1.seriesMissingValues(point.series) === __WEBPACK_IMPORTED_MODULE_3__constants__["u" /* GAP */]) { - delete points[idx]; - } - } - } - } - - return points; - }; - - return PolarAreaChart; -}(__WEBPACK_IMPORTED_MODULE_0__polar_line_chart_polar_line_chart__["a" /* default */])); - -function xComparer(a, b) { - return a.value.x - b.value.x; -} - -/* harmony default export */ __webpack_exports__["a"] = (PolarAreaChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/polar-area-chart/polar-area-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__area_chart_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/area-segment.js"); - - - -var PolarAreaSegment = (function (AreaSegment) { - function PolarAreaSegment () { - AreaSegment.apply(this, arguments); - } - - if ( AreaSegment ) PolarAreaSegment.__proto__ = AreaSegment; - PolarAreaSegment.prototype = Object.create( AreaSegment && AreaSegment.prototype ); - PolarAreaSegment.prototype.constructor = PolarAreaSegment; - - PolarAreaSegment.prototype.fillToAxes = function fillToAxes (fillPath) { - var polarAxis = this.parent.plotArea.polarAxis; - var center = polarAxis.box.center(); - var centerSegment = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Segment([ center.x, center.y ]); - - fillPath.segments.unshift(centerSegment); - fillPath.segments.push(centerSegment); - }; - - return PolarAreaSegment; -}(__WEBPACK_IMPORTED_MODULE_1__area_chart_area_segment__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (PolarAreaSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/polar-area-chart/spline-polar-area-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__area_chart_spline_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/spline-area-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); - - - -var SplinePolarAreaSegment = (function (SplineAreaSegment) { - function SplinePolarAreaSegment () { - SplineAreaSegment.apply(this, arguments); - } - - if ( SplineAreaSegment ) SplinePolarAreaSegment.__proto__ = SplineAreaSegment; - SplinePolarAreaSegment.prototype = Object.create( SplineAreaSegment && SplineAreaSegment.prototype ); - SplinePolarAreaSegment.prototype.constructor = SplinePolarAreaSegment; - - SplinePolarAreaSegment.prototype.fillToAxes = function fillToAxes (fillPath) { - var center = this._polarAxisCenter(); - fillPath.lineTo(center.x, center.y); - }; - - SplinePolarAreaSegment.prototype._polarAxisCenter = function _polarAxisCenter () { - var polarAxis = this.parent.plotArea.polarAxis; - var center = polarAxis.box.center(); - return center; - }; - - SplinePolarAreaSegment.prototype.strokeSegments = function strokeSegments () { - var segments = this._strokeSegments; - - if (!segments) { - var center = this._polarAxisCenter(); - var curveProcessor = new __WEBPACK_IMPORTED_MODULE_1__core__["e" /* CurveProcessor */](false); - var linePoints = this.points(); - - linePoints.push(center); - segments = this._strokeSegments = curveProcessor.process(linePoints); - segments.pop(); - } - - return segments; - }; - - return SplinePolarAreaSegment; -}(__WEBPACK_IMPORTED_MODULE_0__area_chart_spline_area_segment__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (SplinePolarAreaSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/polar-line-chart/polar-line-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scatter_charts_scatter_line_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/scatter-charts/scatter-line-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__polar_scatter_chart_polar_scatter_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/polar-scatter-chart/polar-scatter-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var PolarLineChart = (function (ScatterLineChart) { - function PolarLineChart () { - ScatterLineChart.apply(this, arguments); - }if ( ScatterLineChart ) PolarLineChart.__proto__ = ScatterLineChart; - PolarLineChart.prototype = Object.create( ScatterLineChart && ScatterLineChart.prototype ); - PolarLineChart.prototype.constructor = PolarLineChart; - - - - return PolarLineChart; -}(__WEBPACK_IMPORTED_MODULE_0__scatter_charts_scatter_line_chart__["a" /* default */])); - -PolarLineChart.prototype.pointSlot = __WEBPACK_IMPORTED_MODULE_1__polar_scatter_chart_polar_scatter_chart__["a" /* default */].prototype.pointSlot; - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["M" /* setDefaultOptions */])(PolarLineChart, { - clip: false -}); - -/* harmony default export */ __webpack_exports__["a"] = (PolarLineChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/polar-scatter-chart/polar-scatter-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scatter_charts_scatter_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/scatter-charts/scatter-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var PolarScatterChart = (function (ScatterChart) { - function PolarScatterChart () { - ScatterChart.apply(this, arguments); - } - - if ( ScatterChart ) PolarScatterChart.__proto__ = ScatterChart; - PolarScatterChart.prototype = Object.create( ScatterChart && ScatterChart.prototype ); - PolarScatterChart.prototype.constructor = PolarScatterChart; - - PolarScatterChart.prototype.pointSlot = function pointSlot (slotX, slotY) { - var valueRadius = slotX.center.y - slotY.y1; - var slot = __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */].onCircle(slotX.center, slotX.startAngle, valueRadius); - - return new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */](slot.x, slot.y, slot.x, slot.y); - }; - - return PolarScatterChart; -}(__WEBPACK_IMPORTED_MODULE_0__scatter_charts_scatter_chart__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["M" /* setDefaultOptions */])(PolarScatterChart, { - clip: false -}); - -/* harmony default export */ __webpack_exports__["a"] = (PolarScatterChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/radar-area-chart/radar-area-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__radar_line_chart_radar_line_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/radar-line-chart/radar-line-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__spline_radar_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/radar-area-chart/spline-radar-area-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__radar_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/radar-area-chart/radar-area-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); - - - - - - -var RadarAreaChart = (function (RadarLineChart) { - function RadarAreaChart () { - RadarLineChart.apply(this, arguments); - } - - if ( RadarLineChart ) RadarAreaChart.__proto__ = RadarLineChart; - RadarAreaChart.prototype = Object.create( RadarLineChart && RadarLineChart.prototype ); - RadarAreaChart.prototype.constructor = RadarAreaChart; - - RadarAreaChart.prototype.createSegment = function createSegment (linePoints, currentSeries, seriesIx, prevSegment) { - var isStacked = this.options.isStacked; - var style = (currentSeries.line || {}).style; - var previousSegment; - var stackPoints; - var segment; - - if (isStacked && seriesIx > 0 && prevSegment) { - stackPoints = prevSegment.linePoints.slice(0); - previousSegment = prevSegment; - } - - if (style === __WEBPACK_IMPORTED_MODULE_3__constants__["_5" /* SMOOTH */]) { - segment = new __WEBPACK_IMPORTED_MODULE_1__spline_radar_area_segment__["a" /* default */](linePoints, currentSeries, seriesIx, previousSegment, stackPoints); - segment.options.closed = true; - } else { - linePoints.push(linePoints[0]); - segment = new __WEBPACK_IMPORTED_MODULE_2__radar_area_segment__["a" /* default */](linePoints, currentSeries, seriesIx, previousSegment, stackPoints); - } - - return segment; - }; - - RadarAreaChart.prototype.seriesMissingValues = function seriesMissingValues (series) { - return series.missingValues || __WEBPACK_IMPORTED_MODULE_3__constants__["_19" /* ZERO */]; - }; - - return RadarAreaChart; -}(__WEBPACK_IMPORTED_MODULE_0__radar_line_chart_radar_line_chart__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (RadarAreaChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/radar-area-chart/radar-area-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__area_chart_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/area-segment.js"); - - -var RadarAreaSegment = (function (AreaSegment) { - function RadarAreaSegment () { - AreaSegment.apply(this, arguments); - } - - if ( AreaSegment ) RadarAreaSegment.__proto__ = AreaSegment; - RadarAreaSegment.prototype = Object.create( AreaSegment && AreaSegment.prototype ); - RadarAreaSegment.prototype.constructor = RadarAreaSegment; - - RadarAreaSegment.prototype.fillToAxes = function fillToAxes () {}; - - return RadarAreaSegment; -}(__WEBPACK_IMPORTED_MODULE_0__area_chart_area_segment__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (RadarAreaSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/radar-area-chart/spline-radar-area-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__area_chart_spline_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/spline-area-segment.js"); - - -var SplineRadarAreaSegment = (function (SplineAreaSegment) { - function SplineRadarAreaSegment () { - SplineAreaSegment.apply(this, arguments); - } - - if ( SplineAreaSegment ) SplineRadarAreaSegment.__proto__ = SplineAreaSegment; - SplineRadarAreaSegment.prototype = Object.create( SplineAreaSegment && SplineAreaSegment.prototype ); - SplineRadarAreaSegment.prototype.constructor = SplineRadarAreaSegment; - - SplineRadarAreaSegment.prototype.fillToAxes = function fillToAxes () {}; - - return SplineRadarAreaSegment; -}(__WEBPACK_IMPORTED_MODULE_0__area_chart_spline_area_segment__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (SplineRadarAreaSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/radar-bar-chart/radar-bar-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__bar_chart_bar_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__radar_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/radar-bar-chart/radar-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__layout_radar_cluster_layout__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/layout/radar-cluster-layout.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__layout_radar_stack_layout__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/layout/radar-stack-layout.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__categorical_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/categorical-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - -var RadarBarChart = (function (BarChart) { - function RadarBarChart () { - BarChart.apply(this, arguments); - } - - if ( BarChart ) RadarBarChart.__proto__ = BarChart; - RadarBarChart.prototype = Object.create( BarChart && BarChart.prototype ); - RadarBarChart.prototype.constructor = RadarBarChart; - - RadarBarChart.prototype.pointType = function pointType () { - return __WEBPACK_IMPORTED_MODULE_1__radar_segment__["a" /* default */]; - }; - - RadarBarChart.prototype.clusterType = function clusterType () { - return __WEBPACK_IMPORTED_MODULE_2__layout_radar_cluster_layout__["a" /* default */]; - }; - - RadarBarChart.prototype.stackType = function stackType () { - return __WEBPACK_IMPORTED_MODULE_3__layout_radar_stack_layout__["a" /* default */]; - }; - - RadarBarChart.prototype.categorySlot = function categorySlot (categoryAxis, categoryIx) { - return categoryAxis.getSlot(categoryIx); - }; - - RadarBarChart.prototype.pointSlot = function pointSlot (categorySlot, valueSlot) { - var slot = categorySlot.clone(); - var y = categorySlot.center.y; - - slot.radius = y - valueSlot.y1; - slot.innerRadius = y - valueSlot.y2; - - return slot; - }; - - RadarBarChart.prototype.reflowPoint = function reflowPoint (point, pointSlot) { - point.sector = pointSlot; - point.reflow(); - }; - - RadarBarChart.prototype.createAnimation = function createAnimation () { - this.options.animation.center = this.box.toRect().center(); - BarChart.prototype.createAnimation.call(this); - }; - - return RadarBarChart; -}(__WEBPACK_IMPORTED_MODULE_0__bar_chart_bar_chart__["a" /* default */])); - -RadarBarChart.prototype.reflow = __WEBPACK_IMPORTED_MODULE_4__categorical_chart__["a" /* default */].prototype.reflow; - -Object(__WEBPACK_IMPORTED_MODULE_5__common__["M" /* setDefaultOptions */])(RadarBarChart, { - clip: false, - limitPoints: false, - animation: { - type: "pie" - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (RadarBarChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/radar-bar-chart/radar-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__donut_chart_donut_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/donut-chart/donut-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - -var RadarSegment = (function (DonutSegment) { - function RadarSegment(value, options) { - DonutSegment.call(this, value, null, options); - } - - if ( DonutSegment ) RadarSegment.__proto__ = DonutSegment; - RadarSegment.prototype = Object.create( DonutSegment && DonutSegment.prototype ); - RadarSegment.prototype.constructor = RadarSegment; - - return RadarSegment; -}(__WEBPACK_IMPORTED_MODULE_0__donut_chart_donut_segment__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["M" /* setDefaultOptions */])(RadarSegment, { - overlay: { - gradient: "none" - }, - labels: { - distance: 10 - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (RadarSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/radar-line-chart/radar-line-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__line_chart_line_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__line_chart_spline_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/spline-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__line_chart_line_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - -var RadarLineChart = (function (LineChart) { - function RadarLineChart () { - LineChart.apply(this, arguments); - } - - if ( LineChart ) RadarLineChart.__proto__ = LineChart; - RadarLineChart.prototype = Object.create( LineChart && LineChart.prototype ); - RadarLineChart.prototype.constructor = RadarLineChart; - - RadarLineChart.prototype.pointSlot = function pointSlot (categorySlot, valueSlot) { - var valueRadius = categorySlot.center.y - valueSlot.y1; - var slot = __WEBPACK_IMPORTED_MODULE_3__core__["l" /* Point */].onCircle(categorySlot.center, categorySlot.middle(), valueRadius); - - return new __WEBPACK_IMPORTED_MODULE_3__core__["a" /* Box */](slot.x, slot.y, slot.x, slot.y); - }; - - RadarLineChart.prototype.createSegment = function createSegment (linePoints, currentSeries, seriesIx) { - var style = currentSeries.style; - var pointType; - - if (style === __WEBPACK_IMPORTED_MODULE_4__constants__["_5" /* SMOOTH */]) { - pointType = __WEBPACK_IMPORTED_MODULE_1__line_chart_spline_segment__["a" /* default */]; - } else { - pointType = __WEBPACK_IMPORTED_MODULE_2__line_chart_line_segment__["a" /* default */]; - } - - var segment = new pointType(linePoints, currentSeries, seriesIx); - - if (linePoints.length === currentSeries.data.length) { - segment.options.closed = true; - } - - return segment; - }; - - return RadarLineChart; -}(__WEBPACK_IMPORTED_MODULE_0__line_chart_line_chart__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_5__common__["M" /* setDefaultOptions */])(RadarLineChart, { - clip: false, - limitPoints: false -}); - -/* harmony default export */ __webpack_exports__["a"] = (RadarLineChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/range-area-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__categorical_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/categorical-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_line_chart_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/line-chart-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_clip_animation_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/clip-animation-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__range_area_point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/range-area-point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__range_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/range-area-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__spline_range_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/spline-range-area-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__step_range_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/step-range-area-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils.js"); - - - - - - - - - - - - - - - -var RangeAreaChart = (function (CategoricalChart) { - function RangeAreaChart () { - CategoricalChart.apply(this, arguments); - } - - if ( CategoricalChart ) RangeAreaChart.__proto__ = CategoricalChart; - RangeAreaChart.prototype = Object.create( CategoricalChart && CategoricalChart.prototype ); - RangeAreaChart.prototype.constructor = RangeAreaChart; - - RangeAreaChart.prototype.render = function render () { - CategoricalChart.prototype.render.call(this); - - this.renderSegments(); - }; - - RangeAreaChart.prototype.pointType = function pointType () { - return __WEBPACK_IMPORTED_MODULE_3__range_area_point__["a" /* default */]; - }; - - RangeAreaChart.prototype.createPoint = function createPoint (data, fields) { - var categoryIx = fields.categoryIx; - var category = fields.category; - var series = fields.series; - var seriesIx = fields.seriesIx; - var value = data.valueFields; - - if (!Object(__WEBPACK_IMPORTED_MODULE_11__utils__["j" /* hasValue */])(value.from) && !Object(__WEBPACK_IMPORTED_MODULE_11__utils__["j" /* hasValue */])(value.to)) { - if (this.seriesMissingValues(series) === __WEBPACK_IMPORTED_MODULE_8__constants__["_19" /* ZERO */]) { - value = { - from: 0, - to: 0 - }; - } else { - return null; - } - } - - var pointOptions = this.pointOptions(series, seriesIx); - pointOptions = this.evalPointOptions( - pointOptions, value, category, categoryIx, series, seriesIx - ); - - var color = data.fields.color || series.color; - if (Object(__WEBPACK_IMPORTED_MODULE_10__common__["A" /* isFunction */])(series.color)) { - color = pointOptions.color; - } - - var point = new __WEBPACK_IMPORTED_MODULE_3__range_area_point__["a" /* default */](value, pointOptions); - point.color = color; - - this.append(point); - - return point; - }; - - RangeAreaChart.prototype.createSegment = function createSegment (linePoints, currentSeries, seriesIx) { - var style = (currentSeries.line || {}).style; - var segmentType; - if (style === "smooth") { - segmentType = __WEBPACK_IMPORTED_MODULE_5__spline_range_area_segment__["a" /* default */]; - } else if (style === "step") { - segmentType = __WEBPACK_IMPORTED_MODULE_6__step_range_area_segment__["a" /* default */]; - } else { - segmentType = __WEBPACK_IMPORTED_MODULE_4__range_area_segment__["a" /* default */]; - } - - return new segmentType(linePoints, currentSeries, seriesIx); - }; - - RangeAreaChart.prototype.plotRange = function plotRange (point, startValue) { - if (!point) { - return [ startValue, startValue ]; - } - - return [ point.value.from, point.value.to ]; - }; - - RangeAreaChart.prototype.valueSlot = function valueSlot (valueAxis, plotRange) { - var fromSlot = valueAxis.getSlot(plotRange[0], plotRange[0], !this.options.clip); - var toSlot = valueAxis.getSlot(plotRange[1], plotRange[1], !this.options.clip); - if (fromSlot && toSlot) { - return { - from: fromSlot, - to: toSlot - }; - } - }; - - RangeAreaChart.prototype.pointSlot = function pointSlot (categorySlot, valueSlot) { - var from = valueSlot.from; - var to = valueSlot.to; - var fromSlot, toSlot; - - if (this.options.invertAxes) { - fromSlot = new __WEBPACK_IMPORTED_MODULE_7__core__["a" /* Box */](from.x1, categorySlot.y1, from.x2, categorySlot.y2); - toSlot = new __WEBPACK_IMPORTED_MODULE_7__core__["a" /* Box */](to.x1, categorySlot.y1, to.x2, categorySlot.y2); - } else { - fromSlot = new __WEBPACK_IMPORTED_MODULE_7__core__["a" /* Box */](categorySlot.x1, from.y1, categorySlot.x2, from.y2); - toSlot = new __WEBPACK_IMPORTED_MODULE_7__core__["a" /* Box */](categorySlot.x1, to.y1, categorySlot.x2, to.y2); - } - - return { - from: fromSlot, - to: toSlot - }; - }; - - RangeAreaChart.prototype.addValue = function addValue (data, fields) { - var valueFields = data.valueFields; - if (!Object(__WEBPACK_IMPORTED_MODULE_10__common__["B" /* isNumber */])(valueFields.from)) { - valueFields.from = valueFields.to; - } - - if (!Object(__WEBPACK_IMPORTED_MODULE_10__common__["B" /* isNumber */])(valueFields.to)) { - valueFields.to = valueFields.from; - } - - CategoricalChart.prototype.addValue.call(this, data, fields); - }; - - RangeAreaChart.prototype.updateRange = function updateRange (value, fields) { - if (value !== null && Object(__WEBPACK_IMPORTED_MODULE_10__common__["B" /* isNumber */])(value.from) && Object(__WEBPACK_IMPORTED_MODULE_10__common__["B" /* isNumber */])(value.to)) { - var axisName = fields.series.axis; - var axisRange = this.valueAxisRanges[axisName] = this.valueAxisRanges[axisName] || { min: __WEBPACK_IMPORTED_MODULE_9__common_constants__["s" /* MAX_VALUE */], max: __WEBPACK_IMPORTED_MODULE_9__common_constants__["t" /* MIN_VALUE */] }; - var from = value.from; - var to = value.to; - - axisRange.min = Math.min(axisRange.min, from, to); - axisRange.max = Math.max(axisRange.max, from, to); - } - }; - - RangeAreaChart.prototype.formatPointValue = function formatPointValue (point, format) { - var value = point.value; - - return this.chartService.format.auto(format, value.from, value.to); - }; - - RangeAreaChart.prototype.animationPoints = function animationPoints () { - var points = this.points; - var result = []; - for (var idx = 0; idx < points.length; idx++) { - var point = points[idx]; - if (point) { - result.push((point.fromPoint || {}).marker); - result.push((point.toPoint || {}).marker); - } - } - - return result.concat(this._segments); - }; - - return RangeAreaChart; -}(__WEBPACK_IMPORTED_MODULE_0__categorical_chart__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_10__common__["k" /* deepExtend */])(RangeAreaChart.prototype, __WEBPACK_IMPORTED_MODULE_1__mixins_line_chart_mixin__["a" /* default */], __WEBPACK_IMPORTED_MODULE_2__mixins_clip_animation_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (RangeAreaChart); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/range-area-point.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__range_line_point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/range-line-point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mixins_point_events_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/point-events-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mixins_note_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/note-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - -var AUTO = 'auto'; -var DEFAULT_FROM_FORMAT = '{0}'; -var DEFAULT_TO_FORMAT = '{1}'; - -var RangeAreaPoint = (function (ChartElement) { - function RangeAreaPoint(value, options) { - ChartElement.call(this); - - this.value = value; - this.options = options; - this.aboveAxis = Object(__WEBPACK_IMPORTED_MODULE_7__common__["Q" /* valueOrDefault */])(this.options.aboveAxis, true); - this.tooltipTracking = true; - this.initLabelsFormat(); - } - - if ( ChartElement ) RangeAreaPoint.__proto__ = ChartElement; - RangeAreaPoint.prototype = Object.create( ChartElement && ChartElement.prototype ); - RangeAreaPoint.prototype.constructor = RangeAreaPoint; - - RangeAreaPoint.prototype.render = function render () { - if (this._rendered) { - return; - } - - this._rendered = true; - - var ref = this.options; - var markers = ref.markers; - var labels = ref.labels; - var value = this.value; - - var fromPoint = this.fromPoint = new __WEBPACK_IMPORTED_MODULE_2__range_line_point__["a" /* default */](value, Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])({}, this.options, { - labels: labels.from, - markers: markers.from - })); - - var toPoint = this.toPoint = new __WEBPACK_IMPORTED_MODULE_2__range_line_point__["a" /* default */](value, Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])({}, this.options, { - labels: labels.to, - markers: markers.to - })); - - this.copyFields(fromPoint); - this.copyFields(toPoint); - - this.append(fromPoint); - this.append(toPoint); - }; - - RangeAreaPoint.prototype.reflow = function reflow (targetBox) { - this.render(); - - var fromBox = targetBox.from; - var toBox = targetBox.to; - - this.positionLabels(fromBox, toBox); - - this.fromPoint.reflow(fromBox); - this.toPoint.reflow(toBox); - - this.box = this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox()); - }; - - RangeAreaPoint.prototype.createHighlight = function createHighlight () { - var group = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group(); - group.append(this.fromPoint.createHighlight()); - group.append(this.toPoint.createHighlight()); - - return group; - }; - - RangeAreaPoint.prototype.highlightVisual = function highlightVisual () { - return this.visual; - }; - - RangeAreaPoint.prototype.highlightVisualArgs = function highlightVisualArgs () { - return { - options: this.options, - from: this.fromPoint.highlightVisualArgs(), - to: this.toPoint.highlightVisualArgs() - }; - }; - - RangeAreaPoint.prototype.tooltipAnchor = function tooltipAnchor () { - var clipBox = this.owner.pane.clipBox(); - var showTooltip = !clipBox || clipBox.overlaps(this.box); - - if (showTooltip) { - var box = this.box; - var center = box.center(); - var horizontalAlign = __WEBPACK_IMPORTED_MODULE_6__common_constants__["r" /* LEFT */]; - var x, y, verticalAlign; - - if (this.options.vertical) { - x = center.x; - y = box.y1 - __WEBPACK_IMPORTED_MODULE_5__constants__["_8" /* TOOLTIP_OFFSET */]; - verticalAlign = __WEBPACK_IMPORTED_MODULE_6__common_constants__["d" /* BOTTOM */]; - } else { - x = box.x2 + __WEBPACK_IMPORTED_MODULE_5__constants__["_8" /* TOOLTIP_OFFSET */]; - y = center.y; - verticalAlign = __WEBPACK_IMPORTED_MODULE_6__common_constants__["e" /* CENTER */]; - } - - return { - point: new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](x, y), - align: { - horizontal: horizontalAlign, - vertical: verticalAlign - } - }; - } - }; - - RangeAreaPoint.prototype.formatValue = function formatValue (format) { - return this.owner.formatPointValue(this, format); - }; - - RangeAreaPoint.prototype.overlapsBox = function overlapsBox (box) { - return this.box.overlaps(box); - }; - - RangeAreaPoint.prototype.unclipElements = function unclipElements () { - this.fromPoint.unclipElements(); - this.toPoint.unclipElements(); - }; - - RangeAreaPoint.prototype.initLabelsFormat = function initLabelsFormat () { - var labels = this.options.labels; - if (!labels.format) { - if (!labels.from || !labels.from.format) { - labels.from = Object.assign({}, labels.from, { - format: DEFAULT_FROM_FORMAT - }); - } - - if (!labels.to || !labels.to.format) { - labels.to = Object.assign({}, labels.to, { - format: DEFAULT_TO_FORMAT - }); - } - } - }; - - RangeAreaPoint.prototype.positionLabels = function positionLabels (fromBox, toBox) { - var ref = this.options; - var labels = ref.labels; - var vertical = ref.vertical; - - if (labels.position === AUTO) { - var fromLabelPosition, toLabelPosition; - if (vertical) { - if (toBox.y1 <= fromBox.y1) { - toLabelPosition = __WEBPACK_IMPORTED_MODULE_5__constants__["a" /* ABOVE */]; - fromLabelPosition = __WEBPACK_IMPORTED_MODULE_5__constants__["d" /* BELOW */]; - } else { - toLabelPosition = __WEBPACK_IMPORTED_MODULE_5__constants__["d" /* BELOW */]; - fromLabelPosition = __WEBPACK_IMPORTED_MODULE_5__constants__["a" /* ABOVE */]; - } - } else { - if (toBox.x1 <= fromBox.x1) { - toLabelPosition = __WEBPACK_IMPORTED_MODULE_6__common_constants__["r" /* LEFT */]; - fromLabelPosition = __WEBPACK_IMPORTED_MODULE_6__common_constants__["z" /* RIGHT */]; - } else { - toLabelPosition = __WEBPACK_IMPORTED_MODULE_6__common_constants__["z" /* RIGHT */]; - fromLabelPosition = __WEBPACK_IMPORTED_MODULE_6__common_constants__["r" /* LEFT */]; - } - } - - if (!labels.from || !labels.from.position) { - this.fromPoint.options.labels.position = fromLabelPosition; - } - - if (!labels.to || !labels.to.position) { - this.toPoint.options.labels.position = toLabelPosition; - } - } - }; - - RangeAreaPoint.prototype.copyFields = function copyFields (point) { - point.dataItem = this.dataItem; - point.category = this.category; - point.series = this.series; - point.color = this.color; - point.owner = this.owner; - }; - - return RangeAreaPoint; -}(__WEBPACK_IMPORTED_MODULE_1__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])(RangeAreaPoint.prototype, __WEBPACK_IMPORTED_MODULE_3__mixins_point_events_mixin__["a" /* default */]); -Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])(RangeAreaPoint.prototype, __WEBPACK_IMPORTED_MODULE_4__mixins_note_mixin__["a" /* default */]); - -RangeAreaPoint.prototype.defaults = { - markers: { - visible: false, - background: __WEBPACK_IMPORTED_MODULE_6__common_constants__["E" /* WHITE */], - size: __WEBPACK_IMPORTED_MODULE_5__constants__["E" /* LINE_MARKER_SIZE */], - type: __WEBPACK_IMPORTED_MODULE_6__common_constants__["f" /* CIRCLE */], - border: { - width: 2 - }, - opacity: 1 - }, - labels: { - visible: false, - margin: Object(__WEBPACK_IMPORTED_MODULE_7__common__["s" /* getSpacing */])(3), - padding: Object(__WEBPACK_IMPORTED_MODULE_7__common__["s" /* getSpacing */])(4), - animation: { - type: __WEBPACK_IMPORTED_MODULE_5__constants__["s" /* FADEIN */], - delay: __WEBPACK_IMPORTED_MODULE_5__constants__["x" /* INITIAL_ANIMATION_DURATION */] - }, - position: AUTO - }, - notes: { - label: {} - }, - highlight: { - markers: { - border: { - color: __WEBPACK_IMPORTED_MODULE_6__common_constants__["E" /* WHITE */], - width: 2 - } - }, - zIndex: __WEBPACK_IMPORTED_MODULE_6__common_constants__["p" /* HIGHLIGHT_ZINDEX */] - }, - tooltip: { - format: '{0} - {1}' - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (RangeAreaPoint); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/range-area-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__area_chart_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/area-chart/area-segment.js"); - - - -var RangeAreaSegment = (function (AreaSegment) { - function RangeAreaSegment () { - AreaSegment.apply(this, arguments); - } - - if ( AreaSegment ) RangeAreaSegment.__proto__ = AreaSegment; - RangeAreaSegment.prototype = Object.create( AreaSegment && AreaSegment.prototype ); - RangeAreaSegment.prototype.constructor = RangeAreaSegment; - - RangeAreaSegment.prototype.createStrokeSegments = function createStrokeSegments () { - return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints())); - }; - - RangeAreaSegment.prototype.stackSegments = function stackSegments () { - var fromSegments = this.fromSegments; - if (!this.fromSegments) { - fromSegments = this.fromSegments = this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse())); - } - - return fromSegments; - }; - - RangeAreaSegment.prototype.createStroke = function createStroke (style) { - var toPath = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path(style); - var fromPath = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path(style); - - toPath.segments.push.apply(toPath.segments, this.strokeSegments()); - fromPath.segments.push.apply(fromPath.segments, this.stackSegments()); - - this.visual.append(toPath); - this.visual.append(fromPath); - }; - - RangeAreaSegment.prototype.hasStackSegment = function hasStackSegment () { - return true; - }; - - RangeAreaSegment.prototype.fromPoints = function fromPoints () { - return this.linePoints.map(function (point) { return point.fromPoint; }); - }; - - RangeAreaSegment.prototype.toPoints = function toPoints () { - return this.linePoints.map(function (point) { return point.toPoint; }); - }; - - return RangeAreaSegment; -}(__WEBPACK_IMPORTED_MODULE_1__area_chart_area_segment__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (RangeAreaSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/range-line-point.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__line_chart_line_point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-point.js"); - - -var RangeLinePoint = (function (LinePoint) { - function RangeLinePoint () { - LinePoint.apply(this, arguments); - } - - if ( LinePoint ) RangeLinePoint.__proto__ = LinePoint; - RangeLinePoint.prototype = Object.create( LinePoint && LinePoint.prototype ); - RangeLinePoint.prototype.constructor = RangeLinePoint; - - RangeLinePoint.prototype.aliasFor = function aliasFor () { - return this.parent; - }; - - return RangeLinePoint; -}(__WEBPACK_IMPORTED_MODULE_0__line_chart_line_point__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (RangeLinePoint); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/spline-range-area-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__range_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/range-area-segment.js"); - - - - -var SplineRangeAreaSegment = (function (RangeAreaSegment) { - function SplineRangeAreaSegment () { - RangeAreaSegment.apply(this, arguments); - } - - if ( RangeAreaSegment ) SplineRangeAreaSegment.__proto__ = RangeAreaSegment; - SplineRangeAreaSegment.prototype = Object.create( RangeAreaSegment && RangeAreaSegment.prototype ); - SplineRangeAreaSegment.prototype.constructor = SplineRangeAreaSegment; - - SplineRangeAreaSegment.prototype.createStrokeSegments = function createStrokeSegments () { - return this.createCurveSegments(this.toPoints()); - }; - - SplineRangeAreaSegment.prototype.stackSegments = function stackSegments () { - var fromSegments = this.fromSegments; - if (!this.fromSegments) { - fromSegments = this.fromSegments = this.createCurveSegments(this.fromPoints().reverse()); - } - - return fromSegments; - }; - - SplineRangeAreaSegment.prototype.createCurveSegments = function createCurveSegments (points) { - var curveProcessor = new __WEBPACK_IMPORTED_MODULE_0__core__["e" /* CurveProcessor */](); - - return curveProcessor.process(this.toGeometryPoints(points)); - }; - - return SplineRangeAreaSegment; -}(__WEBPACK_IMPORTED_MODULE_1__range_area_segment__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (SplineRangeAreaSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/step-range-area-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__line_chart_step_line_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/step-line-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__range_area_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-area-chart/range-area-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - -var StepRangeAreaSegment = (function (RangeAreaSegment) { - function StepRangeAreaSegment () { - RangeAreaSegment.apply(this, arguments); - } - - if ( RangeAreaSegment ) StepRangeAreaSegment.__proto__ = RangeAreaSegment; - StepRangeAreaSegment.prototype = Object.create( RangeAreaSegment && RangeAreaSegment.prototype ); - StepRangeAreaSegment.prototype.constructor = StepRangeAreaSegment; - - StepRangeAreaSegment.prototype.createStrokeSegments = function createStrokeSegments () { - return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints())); - }; - - StepRangeAreaSegment.prototype.stackSegments = function stackSegments () { - var fromSegments = this.fromSegments; - if (!this.fromSegments) { - fromSegments = this.fromSegments = this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints())); - fromSegments.reverse(); - } - - return fromSegments; - }; - - return StepRangeAreaSegment; -}(__WEBPACK_IMPORTED_MODULE_1__range_area_segment__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])(StepRangeAreaSegment.prototype, __WEBPACK_IMPORTED_MODULE_0__line_chart_step_line_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (StepRangeAreaSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/range-bar-chart/range-bar-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__bar_chart_bar_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__range_bar__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/range-bar-chart/range-bar.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__categorical_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/categorical-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - -var RangeBarChart = (function (BarChart) { - function RangeBarChart () { - BarChart.apply(this, arguments); - } - - if ( BarChart ) RangeBarChart.__proto__ = BarChart; - RangeBarChart.prototype = Object.create( BarChart && BarChart.prototype ); - RangeBarChart.prototype.constructor = RangeBarChart; - - RangeBarChart.prototype.pointType = function pointType () { - return __WEBPACK_IMPORTED_MODULE_1__range_bar__["a" /* default */]; - }; - - RangeBarChart.prototype.pointValue = function pointValue (data) { - return data.valueFields; - }; - - RangeBarChart.prototype.formatPointValue = function formatPointValue (point, format) { - if (point.value.from === null && point.value.to === null) { - return ""; - } - - return this.chartService.format.auto(format, point.value.from, point.value.to); - }; - - RangeBarChart.prototype.plotRange = function plotRange (point) { - if (!point) { - return 0; - } - - return [ point.value.from, point.value.to ]; - }; - - RangeBarChart.prototype.updateRange = function updateRange (value, fields) { - var axisName = fields.series.axis; - var from = value.from; - var to = value.to; - var axisRange = this.valueAxisRanges[axisName]; - - if (value !== null && Object(__WEBPACK_IMPORTED_MODULE_4__common__["B" /* isNumber */])(from) && Object(__WEBPACK_IMPORTED_MODULE_4__common__["B" /* isNumber */])(to)) { - axisRange = this.valueAxisRanges[axisName] = axisRange || { min: __WEBPACK_IMPORTED_MODULE_3__common_constants__["s" /* MAX_VALUE */], max: __WEBPACK_IMPORTED_MODULE_3__common_constants__["t" /* MIN_VALUE */] }; - - axisRange.min = Math.min(axisRange.min, from); - axisRange.max = Math.max(axisRange.max, from); - - axisRange.min = Math.min(axisRange.min, to); - axisRange.max = Math.max(axisRange.max, to); - } - }; - - RangeBarChart.prototype.aboveAxis = function aboveAxis (point) { - var value = point.value; - return value.from < value.to; - }; - - return RangeBarChart; -}(__WEBPACK_IMPORTED_MODULE_0__bar_chart_bar_chart__["a" /* default */])); - -RangeBarChart.prototype.plotLimits = __WEBPACK_IMPORTED_MODULE_2__categorical_chart__["a" /* default */].prototype.plotLimits; - -/* harmony default export */ __webpack_exports__["a"] = (RangeBarChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/range-bar-chart/range-bar.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__bar_chart_bar__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__bar_chart_bar_label__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar-label.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var RangeBar = (function (Bar) { - function RangeBar () { - Bar.apply(this, arguments); - } - - if ( Bar ) RangeBar.__proto__ = Bar; - RangeBar.prototype = Object.create( Bar && Bar.prototype ); - RangeBar.prototype.constructor = RangeBar; - - RangeBar.prototype.createLabel = function createLabel () { - var labels = this.options.labels; - var fromOptions = Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])({}, labels, labels.from); - var toOptions = Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])({}, labels, labels.to); - - if (fromOptions.visible) { - this.labelFrom = this._createLabel(fromOptions); - this.append(this.labelFrom); - } - - if (toOptions.visible) { - this.labelTo = this._createLabel(toOptions); - this.append(this.labelTo); - } - }; - - RangeBar.prototype._createLabel = function _createLabel (options) { - var labelTemplate = Object(__WEBPACK_IMPORTED_MODULE_2__common__["t" /* getTemplate */])(options); - var labelText; - - if (labelTemplate) { - labelText = labelTemplate({ - dataItem: this.dataItem, - category: this.category, - value: this.value, - percentage: this.percentage, - runningTotal: this.runningTotal, - total: this.total, - series: this.series - }); - } else { - labelText = this.formatValue(options.format); - } - - return new __WEBPACK_IMPORTED_MODULE_1__bar_chart_bar_label__["a" /* default */](labelText, - Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])({ - vertical: this.options.vertical - }, - options - )); - }; - - RangeBar.prototype.reflow = function reflow (targetBox) { - this.render(); - - var ref = this; - var labelFrom = ref.labelFrom; - var labelTo = ref.labelTo; - var value = ref.value; - - this.box = targetBox; - - if (labelFrom) { - labelFrom.options.aboveAxis = value.from > value.to; - labelFrom.reflow(targetBox); - } - - if (labelTo) { - labelTo.options.aboveAxis = value.to > value.from; - labelTo.reflow(targetBox); - } - - if (this.note) { - this.note.reflow(targetBox); - } - }; - - return RangeBar; -}(__WEBPACK_IMPORTED_MODULE_0__bar_chart_bar__["a" /* default */])); - -RangeBar.prototype.defaults = Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])({}, RangeBar.prototype.defaults, { - labels: { - format: "{0} - {1}" - }, - tooltip: { - format: "{1}" - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (RangeBar); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/register-charts.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__plotarea_plotarea_factory__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/plotarea-factory.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__series_binder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/series-binder.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__aggregates_default_aggregates__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/aggregates/default-aggregates.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__plotarea_categorical_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/categorical-plotarea.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__plotarea_xy_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/xy-plotarea.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__plotarea_pie_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/pie-plotarea.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__plotarea_donut_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/donut-plotarea.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__plotarea_polar_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/polar-plotarea.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__plotarea_radar_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/radar-plotarea.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__plotarea_funnel_plotarea__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/plotarea/funnel-plotarea.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); - - - - - - - - - - - - - - -var COLOR = "color"; -var FIRST = "first"; -var FROM = "from"; -var MAX = "max"; -var MIN = "min"; -var NOTE_TEXT = "noteText"; -var SUMMARY_FIELD = "summary"; -var TO = "to"; - -__WEBPACK_IMPORTED_MODULE_0__plotarea_plotarea_factory__["a" /* default */].current.register(__WEBPACK_IMPORTED_MODULE_3__plotarea_categorical_plotarea__["a" /* default */], [ - __WEBPACK_IMPORTED_MODULE_10__constants__["c" /* BAR */], __WEBPACK_IMPORTED_MODULE_10__constants__["k" /* COLUMN */], __WEBPACK_IMPORTED_MODULE_10__constants__["D" /* LINE */], __WEBPACK_IMPORTED_MODULE_10__constants__["_12" /* VERTICAL_LINE */], __WEBPACK_IMPORTED_MODULE_10__constants__["b" /* AREA */], __WEBPACK_IMPORTED_MODULE_10__constants__["_9" /* VERTICAL_AREA */], - __WEBPACK_IMPORTED_MODULE_10__constants__["i" /* CANDLESTICK */], __WEBPACK_IMPORTED_MODULE_10__constants__["I" /* OHLC */], __WEBPACK_IMPORTED_MODULE_10__constants__["h" /* BULLET */], __WEBPACK_IMPORTED_MODULE_10__constants__["_11" /* VERTICAL_BULLET */], __WEBPACK_IMPORTED_MODULE_10__constants__["f" /* BOX_PLOT */], __WEBPACK_IMPORTED_MODULE_10__constants__["_10" /* VERTICAL_BOX_PLOT */], - __WEBPACK_IMPORTED_MODULE_10__constants__["V" /* RANGE_COLUMN */], __WEBPACK_IMPORTED_MODULE_10__constants__["U" /* RANGE_BAR */], __WEBPACK_IMPORTED_MODULE_10__constants__["_14" /* WATERFALL */], __WEBPACK_IMPORTED_MODULE_10__constants__["w" /* HORIZONTAL_WATERFALL */], __WEBPACK_IMPORTED_MODULE_10__constants__["T" /* RANGE_AREA */], __WEBPACK_IMPORTED_MODULE_10__constants__["_13" /* VERTICAL_RANGE_AREA */] -]); - -__WEBPACK_IMPORTED_MODULE_0__plotarea_plotarea_factory__["a" /* default */].current.register(__WEBPACK_IMPORTED_MODULE_4__plotarea_xy_plotarea__["a" /* default */], [ - __WEBPACK_IMPORTED_MODULE_10__constants__["X" /* SCATTER */], __WEBPACK_IMPORTED_MODULE_10__constants__["Y" /* SCATTER_LINE */], __WEBPACK_IMPORTED_MODULE_10__constants__["g" /* BUBBLE */] -]); - -__WEBPACK_IMPORTED_MODULE_0__plotarea_plotarea_factory__["a" /* default */].current.register(__WEBPACK_IMPORTED_MODULE_5__plotarea_pie_plotarea__["a" /* default */], [ __WEBPACK_IMPORTED_MODULE_10__constants__["K" /* PIE */] ]); -__WEBPACK_IMPORTED_MODULE_0__plotarea_plotarea_factory__["a" /* default */].current.register(__WEBPACK_IMPORTED_MODULE_6__plotarea_donut_plotarea__["a" /* default */], [ __WEBPACK_IMPORTED_MODULE_10__constants__["l" /* DONUT */] ]); -__WEBPACK_IMPORTED_MODULE_0__plotarea_plotarea_factory__["a" /* default */].current.register(__WEBPACK_IMPORTED_MODULE_9__plotarea_funnel_plotarea__["a" /* default */], [ __WEBPACK_IMPORTED_MODULE_10__constants__["t" /* FUNNEL */] ]); - -__WEBPACK_IMPORTED_MODULE_0__plotarea_plotarea_factory__["a" /* default */].current.register(__WEBPACK_IMPORTED_MODULE_7__plotarea_polar_plotarea__["a" /* default */], [ __WEBPACK_IMPORTED_MODULE_10__constants__["N" /* POLAR_AREA */], __WEBPACK_IMPORTED_MODULE_10__constants__["O" /* POLAR_LINE */], __WEBPACK_IMPORTED_MODULE_10__constants__["P" /* POLAR_SCATTER */] ]); -__WEBPACK_IMPORTED_MODULE_0__plotarea_plotarea_factory__["a" /* default */].current.register(__WEBPACK_IMPORTED_MODULE_8__plotarea_radar_plotarea__["a" /* default */], [ __WEBPACK_IMPORTED_MODULE_10__constants__["Q" /* RADAR_AREA */], __WEBPACK_IMPORTED_MODULE_10__constants__["R" /* RADAR_COLUMN */], __WEBPACK_IMPORTED_MODULE_10__constants__["S" /* RADAR_LINE */] ]); - -__WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["c" /* BAR */], __WEBPACK_IMPORTED_MODULE_10__constants__["k" /* COLUMN */], __WEBPACK_IMPORTED_MODULE_10__constants__["D" /* LINE */], __WEBPACK_IMPORTED_MODULE_10__constants__["_12" /* VERTICAL_LINE */], __WEBPACK_IMPORTED_MODULE_10__constants__["b" /* AREA */], __WEBPACK_IMPORTED_MODULE_10__constants__["_9" /* VERTICAL_AREA */] ], - [ __WEBPACK_IMPORTED_MODULE_11__common_constants__["D" /* VALUE */] ], [ __WEBPACK_IMPORTED_MODULE_10__constants__["j" /* CATEGORY */], COLOR, NOTE_TEXT, __WEBPACK_IMPORTED_MODULE_10__constants__["r" /* ERROR_LOW_FIELD */], __WEBPACK_IMPORTED_MODULE_10__constants__["q" /* ERROR_HIGH_FIELD */] ] -); - -__WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["V" /* RANGE_COLUMN */], __WEBPACK_IMPORTED_MODULE_10__constants__["U" /* RANGE_BAR */], __WEBPACK_IMPORTED_MODULE_10__constants__["T" /* RANGE_AREA */], __WEBPACK_IMPORTED_MODULE_10__constants__["_13" /* VERTICAL_RANGE_AREA */] ], - [ FROM, TO ], [ __WEBPACK_IMPORTED_MODULE_10__constants__["j" /* CATEGORY */], COLOR, NOTE_TEXT ] -); - -__WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["_14" /* WATERFALL */], __WEBPACK_IMPORTED_MODULE_10__constants__["w" /* HORIZONTAL_WATERFALL */] ], - [ __WEBPACK_IMPORTED_MODULE_11__common_constants__["D" /* VALUE */] ], [ __WEBPACK_IMPORTED_MODULE_10__constants__["j" /* CATEGORY */], COLOR, NOTE_TEXT, SUMMARY_FIELD ] -); - -__WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.register([ __WEBPACK_IMPORTED_MODULE_10__constants__["N" /* POLAR_AREA */], __WEBPACK_IMPORTED_MODULE_10__constants__["O" /* POLAR_LINE */], __WEBPACK_IMPORTED_MODULE_10__constants__["P" /* POLAR_SCATTER */] ], [ __WEBPACK_IMPORTED_MODULE_11__common_constants__["G" /* X */], __WEBPACK_IMPORTED_MODULE_11__common_constants__["H" /* Y */] ], [ COLOR ]); -__WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.register([ __WEBPACK_IMPORTED_MODULE_10__constants__["Q" /* RADAR_AREA */], __WEBPACK_IMPORTED_MODULE_10__constants__["R" /* RADAR_COLUMN */], __WEBPACK_IMPORTED_MODULE_10__constants__["S" /* RADAR_LINE */] ], [ __WEBPACK_IMPORTED_MODULE_11__common_constants__["D" /* VALUE */] ], [ COLOR ]); - -__WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["t" /* FUNNEL */] ], - [ __WEBPACK_IMPORTED_MODULE_11__common_constants__["D" /* VALUE */] ], [ __WEBPACK_IMPORTED_MODULE_10__constants__["j" /* CATEGORY */], COLOR, "visibleInLegend", "visible" ] -); - -__WEBPACK_IMPORTED_MODULE_2__aggregates_default_aggregates__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["c" /* BAR */], __WEBPACK_IMPORTED_MODULE_10__constants__["k" /* COLUMN */], __WEBPACK_IMPORTED_MODULE_10__constants__["D" /* LINE */], __WEBPACK_IMPORTED_MODULE_10__constants__["_12" /* VERTICAL_LINE */], __WEBPACK_IMPORTED_MODULE_10__constants__["b" /* AREA */], __WEBPACK_IMPORTED_MODULE_10__constants__["_9" /* VERTICAL_AREA */], __WEBPACK_IMPORTED_MODULE_10__constants__["_14" /* WATERFALL */], __WEBPACK_IMPORTED_MODULE_10__constants__["w" /* HORIZONTAL_WATERFALL */] ], - { value: MAX, color: FIRST, noteText: FIRST, errorLow: MIN, errorHigh: MAX } -); - -__WEBPACK_IMPORTED_MODULE_2__aggregates_default_aggregates__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["V" /* RANGE_COLUMN */], __WEBPACK_IMPORTED_MODULE_10__constants__["U" /* RANGE_BAR */], __WEBPACK_IMPORTED_MODULE_10__constants__["T" /* RANGE_AREA */], __WEBPACK_IMPORTED_MODULE_10__constants__["_13" /* VERTICAL_RANGE_AREA */] ], - { from: MIN, to: MAX, color: FIRST, noteText: FIRST } -); - -__WEBPACK_IMPORTED_MODULE_2__aggregates_default_aggregates__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["Q" /* RADAR_AREA */], __WEBPACK_IMPORTED_MODULE_10__constants__["R" /* RADAR_COLUMN */], __WEBPACK_IMPORTED_MODULE_10__constants__["S" /* RADAR_LINE */] ], - { value: MAX, color: FIRST } -); - -__WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["X" /* SCATTER */], __WEBPACK_IMPORTED_MODULE_10__constants__["Y" /* SCATTER_LINE */], __WEBPACK_IMPORTED_MODULE_10__constants__["g" /* BUBBLE */] ], - [ __WEBPACK_IMPORTED_MODULE_11__common_constants__["G" /* X */], __WEBPACK_IMPORTED_MODULE_11__common_constants__["H" /* Y */] ], [ COLOR, NOTE_TEXT, __WEBPACK_IMPORTED_MODULE_10__constants__["_16" /* X_ERROR_LOW_FIELD */], __WEBPACK_IMPORTED_MODULE_10__constants__["_15" /* X_ERROR_HIGH_FIELD */], __WEBPACK_IMPORTED_MODULE_10__constants__["_18" /* Y_ERROR_LOW_FIELD */], __WEBPACK_IMPORTED_MODULE_10__constants__["_17" /* Y_ERROR_HIGH_FIELD */] ] -); - -__WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["g" /* BUBBLE */] ], [ __WEBPACK_IMPORTED_MODULE_11__common_constants__["G" /* X */], __WEBPACK_IMPORTED_MODULE_11__common_constants__["H" /* Y */], "size" ], [ COLOR, __WEBPACK_IMPORTED_MODULE_10__constants__["j" /* CATEGORY */], NOTE_TEXT ] -); - -__WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["i" /* CANDLESTICK */], __WEBPACK_IMPORTED_MODULE_10__constants__["I" /* OHLC */] ], - [ "open", "high", "low", "close" ], [ __WEBPACK_IMPORTED_MODULE_10__constants__["j" /* CATEGORY */], COLOR, "downColor", NOTE_TEXT ] -); - -__WEBPACK_IMPORTED_MODULE_2__aggregates_default_aggregates__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["i" /* CANDLESTICK */], __WEBPACK_IMPORTED_MODULE_10__constants__["I" /* OHLC */] ], - { open: MAX, high: MAX, low: MIN, close: MAX, - color: FIRST, downColor: FIRST, noteText: FIRST } -); - -__WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["f" /* BOX_PLOT */], __WEBPACK_IMPORTED_MODULE_10__constants__["_10" /* VERTICAL_BOX_PLOT */] ], - [ "lower", "q1", "median", "q3", "upper", "mean", "outliers" ], [ __WEBPACK_IMPORTED_MODULE_10__constants__["j" /* CATEGORY */], COLOR, NOTE_TEXT ] -); - -__WEBPACK_IMPORTED_MODULE_2__aggregates_default_aggregates__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["f" /* BOX_PLOT */], __WEBPACK_IMPORTED_MODULE_10__constants__["_10" /* VERTICAL_BOX_PLOT */] ], - { lower: MAX, q1: MAX, median: MAX, q3: MAX, upper: MAX, mean: MAX, outliers: FIRST, - color: FIRST, noteText: FIRST } -); - -__WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["h" /* BULLET */], __WEBPACK_IMPORTED_MODULE_10__constants__["_11" /* VERTICAL_BULLET */] ], - [ "current", "target" ], [ __WEBPACK_IMPORTED_MODULE_10__constants__["j" /* CATEGORY */], COLOR, "visibleInLegend", NOTE_TEXT ] -); - -__WEBPACK_IMPORTED_MODULE_2__aggregates_default_aggregates__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["h" /* BULLET */], __WEBPACK_IMPORTED_MODULE_10__constants__["_11" /* VERTICAL_BULLET */] ], - { current: MAX, target: MAX, color: FIRST, noteText: FIRST } -); - -__WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.register( - [ __WEBPACK_IMPORTED_MODULE_10__constants__["K" /* PIE */], __WEBPACK_IMPORTED_MODULE_10__constants__["l" /* DONUT */] ], - [ __WEBPACK_IMPORTED_MODULE_11__common_constants__["D" /* VALUE */] ], [ __WEBPACK_IMPORTED_MODULE_10__constants__["j" /* CATEGORY */], COLOR, "explode", "visibleInLegend", "visible" ] -); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/scatter-charts/scatter-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_clip_animation_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/clip-animation-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__error_bars_error_range_calculator__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/error-bars/error-range-calculator.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__error_bars_scatter_error_bar__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/error-bars/scatter-error-bar.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__line_chart_line_point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__categorical_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/categorical-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_has_value__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/has-value.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_eval_options__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/eval-options.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__date_utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils.js"); - - - - - - - - - - - - - - - -var ScatterChart = (function (ChartElement) { - function ScatterChart(plotArea, options) { - - ChartElement.call(this, options); - - this.plotArea = plotArea; - this.chartService = plotArea.chartService; - this._initFields(); - - this.render(); - } - - if ( ChartElement ) ScatterChart.__proto__ = ChartElement; - ScatterChart.prototype = Object.create( ChartElement && ChartElement.prototype ); - ScatterChart.prototype.constructor = ScatterChart; - - ScatterChart.prototype._initFields = function _initFields () { - // X and Y axis ranges grouped by name, e.g.: - // primary: { min: 0, max: 1 } - this.xAxisRanges = {}; - this.yAxisRanges = {}; - - this.points = []; - this.seriesPoints = []; - this.seriesOptions = []; - this._evalSeries = []; - }; - - ScatterChart.prototype.render = function render () { - this.traverseDataPoints(this.addValue.bind(this)); - }; - - ScatterChart.prototype.addErrorBar = function addErrorBar (point, field, fields) { - var value = point.value[field]; - var valueErrorField = field + "Value"; - var lowField = field + "ErrorLow"; - var highField = field + "ErrorHigh"; - var seriesIx = fields.seriesIx; - var series = fields.series; - var errorBars = point.options.errorBars; - var lowValue = fields[lowField]; - var highValue = fields[highField]; - - if (Object(__WEBPACK_IMPORTED_MODULE_8__common__["B" /* isNumber */])(value)) { - var errorRange; - if (Object(__WEBPACK_IMPORTED_MODULE_8__common__["B" /* isNumber */])(lowValue) && Object(__WEBPACK_IMPORTED_MODULE_8__common__["B" /* isNumber */])(highValue)) { - errorRange = { low: lowValue, high: highValue }; - } - - if (errorBars && Object(__WEBPACK_IMPORTED_MODULE_8__common__["l" /* defined */])(errorBars[valueErrorField])) { - this.seriesErrorRanges = this.seriesErrorRanges || { x: [], y: [] }; - this.seriesErrorRanges[field][seriesIx] = this.seriesErrorRanges[field][seriesIx] || - new __WEBPACK_IMPORTED_MODULE_2__error_bars_error_range_calculator__["a" /* default */](errorBars[valueErrorField], series, field); - - errorRange = this.seriesErrorRanges[field][seriesIx].getErrorRange(value, errorBars[valueErrorField]); - } - - if (errorRange) { - this.addPointErrorBar(errorRange, point, field); - } - } - }; - - ScatterChart.prototype.addPointErrorBar = function addPointErrorBar (errorRange, point, field) { - var low = errorRange.low; - var high = errorRange.high; - var series = point.series; - var options = point.options.errorBars; - var isVertical = field === __WEBPACK_IMPORTED_MODULE_9__common_constants__["H" /* Y */]; - var item = {}; - - point[field + "Low"] = low; - point[field + "High"] = high; - - point.errorBars = point.errorBars || []; - var errorBar = new __WEBPACK_IMPORTED_MODULE_3__error_bars_scatter_error_bar__["a" /* default */](low, high, isVertical, this, series, options); - point.errorBars.push(errorBar); - point.append(errorBar); - - item[field] = low; - this.updateRange(item, series); - item[field] = high; - this.updateRange(item, series); - }; - - ScatterChart.prototype.addValue = function addValue (value, fields) { - var x = value.x; - var y = value.y; - var seriesIx = fields.seriesIx; - var series = this.options.series[seriesIx]; - var missingValues = this.seriesMissingValues(series); - var seriesPoints = this.seriesPoints[seriesIx]; - - var pointValue = value; - if (!(Object(__WEBPACK_IMPORTED_MODULE_6__utils_has_value__["a" /* default */])(x) && Object(__WEBPACK_IMPORTED_MODULE_6__utils_has_value__["a" /* default */])(y))) { - pointValue = this.createMissingValue(pointValue, missingValues); - } - - var point; - if (pointValue) { - point = this.createPoint(pointValue, fields); - if (point) { - Object.assign(point, fields); - this.addErrorBar(point, __WEBPACK_IMPORTED_MODULE_9__common_constants__["G" /* X */], fields); - this.addErrorBar(point, __WEBPACK_IMPORTED_MODULE_9__common_constants__["H" /* Y */], fields); - } - this.updateRange(pointValue, fields.series); - } - - this.points.push(point); - seriesPoints.push(point); - }; - - ScatterChart.prototype.seriesMissingValues = function seriesMissingValues (series) { - return series.missingValues; - }; - - ScatterChart.prototype.createMissingValue = function createMissingValue () {}; - - ScatterChart.prototype.updateRange = function updateRange (value, series) { - var intlService = this.chartService.intl; - var xAxisName = series.xAxis; - var yAxisName = series.yAxis; - var x = value.x; - var y = value.y; - var xAxisRange = this.xAxisRanges[xAxisName]; - var yAxisRange = this.yAxisRanges[yAxisName]; - - if (Object(__WEBPACK_IMPORTED_MODULE_6__utils_has_value__["a" /* default */])(x)) { - xAxisRange = this.xAxisRanges[xAxisName] = - xAxisRange || { min: __WEBPACK_IMPORTED_MODULE_9__common_constants__["s" /* MAX_VALUE */], max: __WEBPACK_IMPORTED_MODULE_9__common_constants__["t" /* MIN_VALUE */] }; - - if (Object(__WEBPACK_IMPORTED_MODULE_8__common__["D" /* isString */])(x)) { - x = Object(__WEBPACK_IMPORTED_MODULE_10__date_utils__["l" /* parseDate */])(intlService, x); - } - - xAxisRange.min = Math.min(xAxisRange.min, x); - xAxisRange.max = Math.max(xAxisRange.max, x); - } - - if (Object(__WEBPACK_IMPORTED_MODULE_6__utils_has_value__["a" /* default */])(y)) { - yAxisRange = this.yAxisRanges[yAxisName] = - yAxisRange || { min: __WEBPACK_IMPORTED_MODULE_9__common_constants__["s" /* MAX_VALUE */], max: __WEBPACK_IMPORTED_MODULE_9__common_constants__["t" /* MIN_VALUE */] }; - - if (Object(__WEBPACK_IMPORTED_MODULE_8__common__["D" /* isString */])(y)) { - y = Object(__WEBPACK_IMPORTED_MODULE_10__date_utils__["l" /* parseDate */])(intlService, y); - } - - yAxisRange.min = Math.min(yAxisRange.min, y); - yAxisRange.max = Math.max(yAxisRange.max, y); - } - }; - - ScatterChart.prototype.evalPointOptions = function evalPointOptions (options, value, fields) { - var series = fields.series; - var seriesIx = fields.seriesIx; - var state = { defaults: series._defaults, excluded: [ "data", "tooltip", "content", "template", "visual", "toggle", "_outOfRangeMinPoint", "_outOfRangeMaxPoint" ] }; - - var doEval = this._evalSeries[seriesIx]; - if (!Object(__WEBPACK_IMPORTED_MODULE_8__common__["l" /* defined */])(doEval)) { - this._evalSeries[seriesIx] = doEval = Object(__WEBPACK_IMPORTED_MODULE_7__utils_eval_options__["a" /* default */])(options, {}, state, true); - } - - var pointOptions = options; - if (doEval) { - pointOptions = Object(__WEBPACK_IMPORTED_MODULE_8__common__["k" /* deepExtend */])({}, options); - Object(__WEBPACK_IMPORTED_MODULE_7__utils_eval_options__["a" /* default */])(pointOptions, { - value: value, - series: series, - dataItem: fields.dataItem - }, state); - } - - return pointOptions; - }; - - ScatterChart.prototype.pointType = function pointType () { - return __WEBPACK_IMPORTED_MODULE_4__line_chart_line_point__["a" /* default */]; - }; - - ScatterChart.prototype.pointOptions = function pointOptions (series, seriesIx) { - var options = this.seriesOptions[seriesIx]; - if (!options) { - var defaults = this.pointType().prototype.defaults; - this.seriesOptions[seriesIx] = options = Object(__WEBPACK_IMPORTED_MODULE_8__common__["k" /* deepExtend */])({}, defaults, { - markers: { - opacity: series.opacity - }, - tooltip: { - format: this.options.tooltip.format - }, - labels: { - format: this.options.labels.format - } - }, series); - } - - return options; - }; - - ScatterChart.prototype.createPoint = function createPoint (value, fields) { - var series = fields.series; - var pointOptions = this.pointOptions(series, fields.seriesIx); - var color = fields.color || series.color; - - pointOptions = this.evalPointOptions(pointOptions, value, fields); - - if (Object(__WEBPACK_IMPORTED_MODULE_8__common__["A" /* isFunction */])(series.color)) { - color = pointOptions.color; - } - - var point = new __WEBPACK_IMPORTED_MODULE_4__line_chart_line_point__["a" /* default */](value, pointOptions); - point.color = color; - - this.append(point); - - return point; - }; - - ScatterChart.prototype.seriesAxes = function seriesAxes (series) { - var xAxisName = series.xAxis; - var yAxisName = series.yAxis; - var plotArea = this.plotArea; - var xAxis = xAxisName ? plotArea.namedXAxes[xAxisName] : plotArea.axisX; - var yAxis = yAxisName ? plotArea.namedYAxes[yAxisName] : plotArea.axisY; - - if (!xAxis) { - throw new Error("Unable to locate X axis with name " + xAxisName); - } - - if (!yAxis) { - throw new Error("Unable to locate Y axis with name " + yAxisName); - } - - return { - x: xAxis, - y: yAxis - }; - }; - - ScatterChart.prototype.reflow = function reflow (targetBox) { - var this$1 = this; - - var chartPoints = this.points; - var limit = !this.options.clip; - var pointIx = 0; - - - this.traverseDataPoints(function (value, fields) { - var point = chartPoints[pointIx++]; - var seriesAxes = this$1.seriesAxes(fields.series); - var slotX = seriesAxes.x.getSlot(value.x, value.x, limit); - var slotY = seriesAxes.y.getSlot(value.y, value.y, limit); - - if (point) { - if (slotX && slotY) { - var pointSlot = this$1.pointSlot(slotX, slotY); - point.reflow(pointSlot); - } else { - point.visible = false; - } - } - }); - - this.box = targetBox; - }; - - ScatterChart.prototype.pointSlot = function pointSlot (slotX, slotY) { - return new __WEBPACK_IMPORTED_MODULE_0__core__["a" /* Box */](slotX.x1, slotY.y1, slotX.x2, slotY.y2); - }; - - ScatterChart.prototype.traverseDataPoints = function traverseDataPoints (callback) { - var this$1 = this; - - var ref = this; - var series = ref.options.series; - var seriesPoints = ref.seriesPoints; - - for (var seriesIx = 0; seriesIx < series.length; seriesIx++) { - var currentSeries = series[seriesIx]; - var currentSeriesPoints = seriesPoints[seriesIx]; - if (!currentSeriesPoints) { - seriesPoints[seriesIx] = []; - } - - for (var pointIx = 0; pointIx < currentSeries.data.length; pointIx++) { - var ref$1 = this$1._bindPoint(currentSeries, seriesIx, pointIx); - var value = ref$1.valueFields; - var fields = ref$1.fields; - - callback(value, Object(__WEBPACK_IMPORTED_MODULE_8__common__["k" /* deepExtend */])({ - pointIx: pointIx, - series: currentSeries, - seriesIx: seriesIx, - dataItem: currentSeries.data[pointIx], - owner: this$1 - }, fields)); - } - } - }; - - ScatterChart.prototype.formatPointValue = function formatPointValue (point, format) { - var value = point.value; - return this.chartService.format.auto(format, value.x, value.y); - }; - - ScatterChart.prototype.animationPoints = function animationPoints () { - var points = this.points; - var result = []; - for (var idx = 0; idx < points.length; idx++) { - result.push((points[idx] || {}).marker); - } - return result; - }; - - return ScatterChart; -}(__WEBPACK_IMPORTED_MODULE_0__core__["d" /* ChartElement */])); -Object(__WEBPACK_IMPORTED_MODULE_8__common__["M" /* setDefaultOptions */])(ScatterChart, { - series: [], - tooltip: { - format: "{0}, {1}" - }, - labels: { - format: "{0}, {1}" - }, - clip: true -}); -Object(__WEBPACK_IMPORTED_MODULE_8__common__["k" /* deepExtend */])(ScatterChart.prototype, __WEBPACK_IMPORTED_MODULE_1__mixins_clip_animation_mixin__["a" /* default */], { - _bindPoint: __WEBPACK_IMPORTED_MODULE_5__categorical_chart__["a" /* default */].prototype._bindPoint -}); - -/* harmony default export */ __webpack_exports__["a"] = (ScatterChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/scatter-charts/scatter-line-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scatter_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/scatter-charts/scatter-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_line_chart_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/mixins/line-chart-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__line_chart_line_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/line-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__line_chart_spline_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/line-chart/spline-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_has_value__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/has-value.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - -var ScatterLineChart = (function (ScatterChart) { - function ScatterLineChart () { - ScatterChart.apply(this, arguments); - } - - if ( ScatterChart ) ScatterLineChart.__proto__ = ScatterChart; - ScatterLineChart.prototype = Object.create( ScatterChart && ScatterChart.prototype ); - ScatterLineChart.prototype.constructor = ScatterLineChart; - - ScatterLineChart.prototype.render = function render () { - ScatterChart.prototype.render.call(this); - - this.renderSegments(); - }; - - ScatterLineChart.prototype.createSegment = function createSegment (linePoints, currentSeries, seriesIx) { - var style = currentSeries.style; - var pointType; - - if (style === __WEBPACK_IMPORTED_MODULE_4__constants__["_5" /* SMOOTH */]) { - pointType = __WEBPACK_IMPORTED_MODULE_3__line_chart_spline_segment__["a" /* default */]; - } else { - pointType = __WEBPACK_IMPORTED_MODULE_2__line_chart_line_segment__["a" /* default */]; - } - - return new pointType(linePoints, currentSeries, seriesIx); - }; - - ScatterLineChart.prototype.animationPoints = function animationPoints () { - var points = ScatterChart.prototype.animationPoints.call(this); - return points.concat(this._segments); - }; - - ScatterLineChart.prototype.createMissingValue = function createMissingValue (value, missingValues) { - if (missingValues === __WEBPACK_IMPORTED_MODULE_4__constants__["_19" /* ZERO */]) { - var missingValue = { - x: value.x, - y: value.y - }; - if (!Object(__WEBPACK_IMPORTED_MODULE_5__utils_has_value__["a" /* default */])(missingValue.x)) { - missingValue.x = 0; - } - if (!Object(__WEBPACK_IMPORTED_MODULE_5__utils_has_value__["a" /* default */])(missingValue.y)) { - missingValue.y = 0; - } - return missingValue; - } - }; - - return ScatterLineChart; -}(__WEBPACK_IMPORTED_MODULE_0__scatter_chart__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])(ScatterLineChart.prototype, __WEBPACK_IMPORTED_MODULE_1__mixins_line_chart_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (ScatterLineChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/selection.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__services__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__date_utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils.js"); - - - - - - - - - - -var ZOOM_ACCELERATION = 3; -var SELECTOR_HEIGHT_ADJUST = 0.1; - -function createDiv(className) { - var element = document.createElement("div"); - if (className) { - element.className = className; - } - - return element; -} - -function closestHandle(element) { - var current = element; - while (current && !Object(__WEBPACK_IMPORTED_MODULE_4__common__["w" /* hasClasses */])(current, "k-handle")) { - current = current.parentNode; - } - - return current; -} - -var Selection = (function (Class) { - function Selection(chart, categoryAxis, options, observer) { - Class.call(this); - - var chartElement = chart.element; - - this.options = Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])({}, this.options, options); - this.chart = chart; - this.observer = observer; - this.chartElement = chartElement; - this.categoryAxis = categoryAxis; - this._dateAxis = this.categoryAxis instanceof __WEBPACK_IMPORTED_MODULE_1__core__["f" /* DateCategoryAxis */]; - - this.initOptions(); - - if (this.options.visible) { - this.createElements(); - - this.set(this._index(this.options.from), this._index(this.options.to)); - - this.bindEvents(); - } - } - - if ( Class ) Selection.__proto__ = Class; - Selection.prototype = Object.create( Class && Class.prototype ); - Selection.prototype.constructor = Selection; - - Selection.prototype.onPane = function onPane (pane) { - return this.categoryAxis.pane === pane; - }; - - Selection.prototype.createElements = function createElements () { - var options = this.options; - var wrapper = this.wrapper = createDiv("k-selector"); - Object(__WEBPACK_IMPORTED_MODULE_4__common__["p" /* elementStyles */])(wrapper, { - top: options.offset.top, - left: options.offset.left, - width: options.width, - height: options.height, - direction: 'ltr' - }); - var selection = this.selection = createDiv("k-selection"); - this.leftMask = createDiv("k-mask"); - this.rightMask = createDiv("k-mask"); - - wrapper.appendChild(this.leftMask); - wrapper.appendChild(this.rightMask); - wrapper.appendChild(selection); - - selection.appendChild(createDiv("k-selection-bg")); - - var leftHandle = this.leftHandle = createDiv("k-handle k-left-handle"); - var rightHandle = this.rightHandle = createDiv("k-handle k-right-handle"); - leftHandle.appendChild(createDiv()); - rightHandle.appendChild(createDiv()); - - selection.appendChild(leftHandle); - selection.appendChild(rightHandle); - - this.chartElement.appendChild(wrapper); - var selectionStyles = Object(__WEBPACK_IMPORTED_MODULE_4__common__["p" /* elementStyles */])(selection, [ "borderLeftWidth", "borderRightWidth", "height" ]); - var leftHandleHeight = Object(__WEBPACK_IMPORTED_MODULE_4__common__["p" /* elementStyles */])(leftHandle, "height").height; - var rightHandleHeight = Object(__WEBPACK_IMPORTED_MODULE_4__common__["p" /* elementStyles */])(rightHandle, "height").height; - - options.selection = { - border: { - left: selectionStyles.borderLeftWidth, - right: selectionStyles.borderRightWidth - } - }; - - Object(__WEBPACK_IMPORTED_MODULE_4__common__["p" /* elementStyles */])(leftHandle, { - top: (selectionStyles.height - leftHandleHeight) / 2 - }); - - Object(__WEBPACK_IMPORTED_MODULE_4__common__["p" /* elementStyles */])(rightHandle, { - top: (selectionStyles.height - rightHandleHeight) / 2 - }); - - wrapper.style.cssText = wrapper.style.cssText; - }; - - Selection.prototype.bindEvents = function bindEvents$1 () { - var obj; - - if (this.options.mousewheel !== false) { - this._mousewheelHandler = this._mousewheel.bind(this); - Object(__WEBPACK_IMPORTED_MODULE_4__common__["h" /* bindEvents */])(this.wrapper, ( obj = {}, obj[ __WEBPACK_IMPORTED_MODULE_2__constants__["G" /* MOUSEWHEEL */] ] = this._mousewheelHandler, obj )); - } - - this._domEvents = __WEBPACK_IMPORTED_MODULE_0__services__["b" /* DomEventsBuilder */].create(this.wrapper, { - start: this._start.bind(this), - move: this._move.bind(this), - end: this._end.bind(this), - tap: this._tap.bind(this), - press: this._press.bind(this), - gesturestart: this._gesturestart.bind(this), - gesturechange: this._gesturechange.bind(this), - gestureend: this._gestureend.bind(this) - }); - }; - - Selection.prototype.initOptions = function initOptions () { - var ref = this; - var options = ref.options; - var categoryAxis = ref.categoryAxis; - var box = categoryAxis.pane.chartsBox(); - var intlService = this.chart.chartService.intl; - - if (this._dateAxis) { - Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])(options, { - min: Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["l" /* parseDate */])(intlService, options.min), - max: Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["l" /* parseDate */])(intlService, options.max), - from: Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["l" /* parseDate */])(intlService, options.from), - to: Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["l" /* parseDate */])(intlService, options.to) - }); - } - - var ref$1 = Object(__WEBPACK_IMPORTED_MODULE_4__common__["p" /* elementStyles */])(this.chartElement, [ "paddingLeft", "paddingTop" ]); - var paddingLeft = ref$1.paddingLeft; - var paddingTop = ref$1.paddingTop; - - this.options = Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])({}, { - width: box.width(), - height: box.height() + SELECTOR_HEIGHT_ADJUST, //workaround for sub-pixel hover on the paths in chrome - padding: { - left: paddingLeft, - top: paddingTop - }, - offset: { - left: box.x1 + paddingLeft, - top: box.y1 + paddingTop - }, - from: options.min, - to: options.max - }, options); - }; - - Selection.prototype.destroy = function destroy () { - var obj; - - if (this._domEvents) { - this._domEvents.destroy(); - delete this._domEvents; - } - - clearTimeout(this._mwTimeout); - this._state = null; - - if (this.wrapper) { - if (this._mousewheelHandler) { - Object(__WEBPACK_IMPORTED_MODULE_4__common__["P" /* unbindEvents */])(this.wrapper, ( obj = {}, obj[ __WEBPACK_IMPORTED_MODULE_2__constants__["G" /* MOUSEWHEEL */] ] = this._mousewheelHandler, obj )); - this._mousewheelHandler = null; - } - this.chartElement.removeChild(this.wrapper); - this.wrapper = null; - } - }; - - Selection.prototype._rangeEventArgs = function _rangeEventArgs (range) { - - return { - axis: this.categoryAxis.options, - from: this._value(range.from), - to: this._value(range.to) - }; - }; - - Selection.prototype._start = function _start (e) { - var options = this.options; - var target = Object(__WEBPACK_IMPORTED_MODULE_4__common__["r" /* eventElement */])(e); - - if (this._state || !target) { - return; - } - - this.chart._unsetActivePoint(); - this._state = { - moveTarget: closestHandle(target) || target, - startLocation: e.x ? e.x.location : 0, - range: { - from: this._index(options.from), - to: this._index(options.to) - } - }; - - var args = this._rangeEventArgs({ - from: this._index(options.from), - to: this._index(options.to) - }); - - if (this.trigger(__WEBPACK_IMPORTED_MODULE_2__constants__["_1" /* SELECT_START */], args)) { - this._state = null; - } - }; - - Selection.prototype._press = function _press (e) { - var handle; - if (this._state) { - handle = this._state.moveTarget; - } else { - handle = closestHandle(Object(__WEBPACK_IMPORTED_MODULE_4__common__["r" /* eventElement */])(e)); - } - if (handle) { - Object(__WEBPACK_IMPORTED_MODULE_4__common__["e" /* addClass */])(handle, "k-handle-active"); - } - }; - - Selection.prototype._move = function _move (e) { - if (!this._state) { - return; - } - - var ref = this; - var state = ref._state; - var options = ref.options; - var categoryAxis = ref.categoryAxis; - var range = state.range; - var target = state.moveTarget; - var reverse = categoryAxis.options.reverse; - var from = this._index(options.from); - var to = this._index(options.to); - var min = this._index(options.min); - var max = this._index(options.max); - var delta = state.startLocation - e.x.location; - var oldRange = { from: range.from, to: range.to }; - var span = range.to - range.from; - var scale = Object(__WEBPACK_IMPORTED_MODULE_4__common__["p" /* elementStyles */])(this.wrapper, "width").width / (categoryAxis.categoriesCount() - 1); - var offset = Math.round(delta / scale) * (reverse ? -1 : 1); - - if (!target) { - return; - } - - var leftHandle = Object(__WEBPACK_IMPORTED_MODULE_4__common__["w" /* hasClasses */])(target, "k-left-handle"); - var rightHandle = Object(__WEBPACK_IMPORTED_MODULE_4__common__["w" /* hasClasses */])(target, "k-right-handle"); - - if (Object(__WEBPACK_IMPORTED_MODULE_4__common__["w" /* hasClasses */])(target, "k-selection k-selection-bg")) { - range.from = Math.min( - Math.max(min, from - offset), - max - span - ); - range.to = Math.min( - range.from + span, - max - ); - } else if ((leftHandle && !reverse) || (rightHandle && reverse)) { - range.from = Math.min( - Math.max(min, from - offset), - max - 1 - ); - range.to = Math.max(range.from + 1, range.to); - } else if ((leftHandle && reverse) || (rightHandle && !reverse)) { - range.to = Math.min( - Math.max(min + 1, to - offset), - max - ); - range.from = Math.min(range.to - 1, range.from); - } - - if (range.from !== oldRange.from || range.to !== oldRange.to) { - this.move(range.from, range.to); - this.trigger(__WEBPACK_IMPORTED_MODULE_2__constants__["Z" /* SELECT */], this._rangeEventArgs(range)); - } - }; - - Selection.prototype._end = function _end () { - if (this._state) { - var moveTarget = this._state.moveTarget; - if (moveTarget) { - Object(__WEBPACK_IMPORTED_MODULE_4__common__["K" /* removeClass */])(moveTarget, "k-handle-active"); - } - - var range = this._state.range; - this.set(range.from, range.to); - this.trigger(__WEBPACK_IMPORTED_MODULE_2__constants__["_0" /* SELECT_END */], this._rangeEventArgs(range)); - - delete this._state; - } - }; - - Selection.prototype._tap = function _tap (e) { - var ref = this; - var options = ref.options; - var categoryAxis = ref.categoryAxis; - var coords = this.chart._eventCoordinates(e); - var categoryIx = categoryAxis.pointCategoryIndex(new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](coords.x, categoryAxis.box.y1)); - var from = this._index(options.from); - var to = this._index(options.to); - var min = this._index(options.min); - var max = this._index(options.max); - var span = to - from; - var mid = from + span / 2; - var range = {}; - var rightClick = e.event.which === 3; - var offset = Math.round(mid - categoryIx); - - if (this._state || rightClick) { - return; - } - - - this.chart._unsetActivePoint(); - - if (!categoryAxis.options.justified) { - offset--; - } - - range.from = Math.min( - Math.max(min, from - offset), - max - span - ); - - range.to = Math.min(range.from + span, max); - - this._start(e); - if (this._state) { - this._state.range = range; - this.trigger(__WEBPACK_IMPORTED_MODULE_2__constants__["Z" /* SELECT */], this._rangeEventArgs(range)); - this._end(); - } - }; - - Selection.prototype._mousewheel = function _mousewheel (e) { - var this$1 = this; - - var delta = Object(__WEBPACK_IMPORTED_MODULE_4__common__["H" /* mousewheelDelta */])(e); - - this._start({ target: this.selection }); - - if (this._state) { - var range = this._state.range; - - e.preventDefault(); - e.stopPropagation(); - - if (Math.abs(delta) > 1) { - delta *= ZOOM_ACCELERATION; - } - - if (this.options.mousewheel.reverse) { - delta *= -1; - } - - if (this.expand(delta)) { - this.trigger(__WEBPACK_IMPORTED_MODULE_2__constants__["Z" /* SELECT */], { - axis: this.categoryAxis.options, - delta: delta, - originalEvent: e, - from: this._value(range.from), - to: this._value(range.to) - }); - } - - if (this._mwTimeout) { - clearTimeout(this._mwTimeout); - } - - this._mwTimeout = setTimeout(function () { - this$1._end(); - }, __WEBPACK_IMPORTED_MODULE_2__constants__["H" /* MOUSEWHEEL_DELAY */]); - } - }; - - Selection.prototype._gesturestart = function _gesturestart (e) { - var options = this.options; - - this._state = { - range: { - from: this._index(options.from), - to: this._index(options.to) - } - }; - var args = this._rangeEventArgs(this._state.range); - - if (this.trigger(__WEBPACK_IMPORTED_MODULE_2__constants__["_1" /* SELECT_START */], args)) { - this._state = null; - } else { - e.preventDefault(); - } - }; - - Selection.prototype._gestureend = function _gestureend () { - if (this._state) { - this.trigger(__WEBPACK_IMPORTED_MODULE_2__constants__["_0" /* SELECT_END */], this._rangeEventArgs(this._state.range)); - delete this._state; - } - }; - - Selection.prototype._gesturechange = function _gesturechange (e) { - var ref = this; - var chart = ref.chart; - var state = ref._state; - var options = ref.options; - var categoryAxis = ref.categoryAxis; - var range = state.range; - var p0 = chart._toModelCoordinates(e.touches[0].x.location).x; - var p1 = chart._toModelCoordinates(e.touches[1].x.location).x; - var left = Math.min(p0, p1); - var right = Math.max(p0, p1); - - e.preventDefault(); - - range.from = categoryAxis.pointCategoryIndex(new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](left)) || options.min; - - range.to = categoryAxis.pointCategoryIndex(new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](right)) || options.max; - - this.move(range.from, range.to); - - this.trigger(__WEBPACK_IMPORTED_MODULE_2__constants__["Z" /* SELECT */], this._rangeEventArgs(range)); - }; - - Selection.prototype._index = function _index (value) { - var index = value; - - if (value instanceof Date) { - index = this.categoryAxis.categoryIndex(value); - } - - return index; - }; - - Selection.prototype._value = function _value (index) { - var value = index; - if (this._dateAxis) { - value = this.categoryAxis.categoryAt(index); - if (value > this.options.max) { - value = this.options.max; - } - } - - return value; - }; - - Selection.prototype._slot = function _slot (value) { - var categoryAxis = this.categoryAxis; - var index = this._index(value); - - return categoryAxis.getSlot(index, index, true); - }; - - Selection.prototype.move = function move (from, to) { - var options = this.options; - var reverse = this.categoryAxis.options.reverse; - var offset = options.offset; - var padding = options.padding; - var border = options.selection.border; - var left = reverse ? to : from; - var right = reverse ? from : to; - var edge = 'x' + (reverse ? 2 : 1); - - var box = this._slot(left); - var leftMaskWidth = Object(__WEBPACK_IMPORTED_MODULE_4__common__["L" /* round */])(box[edge] - offset.left + padding.left); - - Object(__WEBPACK_IMPORTED_MODULE_4__common__["p" /* elementStyles */])(this.leftMask, { - width: leftMaskWidth - }); - Object(__WEBPACK_IMPORTED_MODULE_4__common__["p" /* elementStyles */])(this.selection, { - left: leftMaskWidth - }); - - box = this._slot(right); - - var rightMaskWidth = Object(__WEBPACK_IMPORTED_MODULE_4__common__["L" /* round */])(options.width - (box[edge] - offset.left + padding.left)); - Object(__WEBPACK_IMPORTED_MODULE_4__common__["p" /* elementStyles */])(this.rightMask, { - width: rightMaskWidth - }); - - var distance = options.width - rightMaskWidth; - if (distance !== options.width) { - distance += border.right; - } - - Object(__WEBPACK_IMPORTED_MODULE_4__common__["p" /* elementStyles */])(this.rightMask, { - left: distance - }); - Object(__WEBPACK_IMPORTED_MODULE_4__common__["p" /* elementStyles */])(this.selection, { - width: Math.max(options.width - (leftMaskWidth + rightMaskWidth) - border.right, 0) - }); - }; - - Selection.prototype.set = function set (from, to) { - var options = this.options; - var min = this._index(options.min); - var max = this._index(options.max); - var fromValue = Object(__WEBPACK_IMPORTED_MODULE_4__common__["F" /* limitValue */])(this._index(from), min, max); - var toValue = Object(__WEBPACK_IMPORTED_MODULE_4__common__["F" /* limitValue */])(this._index(to), fromValue + 1, max); - - if (options.visible) { - this.move(fromValue, toValue); - } - - options.from = this._value(fromValue); - options.to = this._value(toValue); - }; - - Selection.prototype.expand = function expand (delta) { - var options = this.options; - var min = this._index(options.min); - var max = this._index(options.max); - var zDir = options.mousewheel.zoom; - var from = this._index(options.from); - var to = this._index(options.to); - var range = { from: from, to: to }; - var oldRange = Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])({}, range); - - if (this._state) { - range = this._state.range; - } - - if (zDir !== __WEBPACK_IMPORTED_MODULE_3__common_constants__["z" /* RIGHT */]) { - range.from = Object(__WEBPACK_IMPORTED_MODULE_4__common__["F" /* limitValue */])( - Object(__WEBPACK_IMPORTED_MODULE_4__common__["F" /* limitValue */])(from - delta, 0, to - 1), - min, max - ); - } - - if (zDir !== __WEBPACK_IMPORTED_MODULE_3__common_constants__["r" /* LEFT */]) { - range.to = Object(__WEBPACK_IMPORTED_MODULE_4__common__["F" /* limitValue */])( - Object(__WEBPACK_IMPORTED_MODULE_4__common__["F" /* limitValue */])(to + delta, range.from + 1, max), - min, - max - ); - } - - if (range.from !== oldRange.from || range.to !== oldRange.to) { - this.set(range.from, range.to); - return true; - } - }; - - Selection.prototype.trigger = function trigger (name, args) { - return (this.observer || this.chart).trigger(name, args); - }; - - return Selection; -}(__WEBPACK_IMPORTED_MODULE_4__common__["a" /* Class */])); - -Object(__WEBPACK_IMPORTED_MODULE_4__common__["M" /* setDefaultOptions */])(Selection, { - visible: true, - mousewheel: { - zoom: "both" - }, - min: __WEBPACK_IMPORTED_MODULE_3__common_constants__["t" /* MIN_VALUE */], - max: __WEBPACK_IMPORTED_MODULE_3__common_constants__["s" /* MAX_VALUE */] -}); - -/* harmony default export */ __webpack_exports__["a"] = (Selection); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/series-binder.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_get_field__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/get-field.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - -var SeriesBinder = (function (Class) { - function SeriesBinder() { - Class.call(this); - - this._valueFields = {}; - this._otherFields = {}; - this._nullValue = {}; - this._undefinedValue = {}; - } - - if ( Class ) SeriesBinder.__proto__ = Class; - SeriesBinder.prototype = Object.create( Class && Class.prototype ); - SeriesBinder.prototype.constructor = SeriesBinder; - - SeriesBinder.prototype.register = function register (seriesTypes, valueFields, otherFields) { - var this$1 = this; - if ( valueFields === void 0 ) valueFields = [ __WEBPACK_IMPORTED_MODULE_1__common_constants__["D" /* VALUE */] ]; - if ( otherFields === void 0 ) otherFields = {}; - - - for (var i = 0; i < seriesTypes.length; i++) { - var type = seriesTypes[i]; - - this$1._valueFields[type] = valueFields; - this$1._otherFields[type] = otherFields; - this$1._nullValue[type] = this$1._makeValue(valueFields, null); - this$1._undefinedValue[type] = this$1._makeValue(valueFields, undefined); - } - }; - - SeriesBinder.prototype.canonicalFields = function canonicalFields (series) { - return this.valueFields(series).concat(this.otherFields(series)); - }; - - SeriesBinder.prototype.valueFields = function valueFields (series) { - return this._valueFields[series.type] || [ __WEBPACK_IMPORTED_MODULE_1__common_constants__["D" /* VALUE */] ]; - }; - - SeriesBinder.prototype.otherFields = function otherFields (series) { - return this._otherFields[series.type] || [ __WEBPACK_IMPORTED_MODULE_1__common_constants__["D" /* VALUE */] ]; - }; - - SeriesBinder.prototype.bindPoint = function bindPoint (series, pointIx, item) { - var data = series.data; - var pointData = Object(__WEBPACK_IMPORTED_MODULE_2__common__["l" /* defined */])(item) ? item : data[pointIx]; - var result = { valueFields: { value: pointData } }; - var valueFields = this.valueFields(series); - var otherFields = this._otherFields[series.type]; - var fields, value; - - if (pointData === null) { - value = this._nullValue[series.type]; - } else if (!Object(__WEBPACK_IMPORTED_MODULE_2__common__["l" /* defined */])(pointData)) { - value = this._undefinedValue[series.type]; - } else if (Array.isArray(pointData)) { - var fieldData = pointData.slice(valueFields.length); - value = this._bindFromArray(pointData, valueFields); - fields = this._bindFromArray(fieldData, otherFields); - } else if (typeof pointData === "object") { - var srcValueFields = this.sourceFields(series, valueFields); - var srcPointFields = this.sourceFields(series, otherFields); - - value = this._bindFromObject(pointData, valueFields, srcValueFields); - fields = this._bindFromObject(pointData, otherFields, srcPointFields); - } - - if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["l" /* defined */])(value)) { - if (valueFields.length === 1) { - result.valueFields.value = value[valueFields[0]]; - } else { - result.valueFields = value; - } - } - - result.fields = fields || {}; - - return result; - }; - - SeriesBinder.prototype._makeValue = function _makeValue (fields, initialValue) { - var value = {}; - var length = fields.length; - - for (var i = 0; i < length; i++) { - var fieldName = fields[i]; - value[fieldName] = initialValue; - } - - return value; - }; - - SeriesBinder.prototype._bindFromArray = function _bindFromArray (array, fields) { - var value = {}; - - if (fields) { - var length = Math.min(fields.length, array.length); - - for (var i = 0; i < length; i++) { - value[fields[i]] = array[i]; - } - } - - return value; - }; - - SeriesBinder.prototype._bindFromObject = function _bindFromObject (object, fields, srcFields) { - if ( srcFields === void 0 ) srcFields = fields; - - var value = {}; - - if (fields) { - var length = fields.length; - - for (var i = 0; i < length; i++) { - var fieldName = fields[i]; - var srcFieldName = srcFields[i]; - value[fieldName] = Object(__WEBPACK_IMPORTED_MODULE_0__utils_get_field__["a" /* default */])(srcFieldName, object); - } - } - - return value; - }; - - SeriesBinder.prototype.sourceFields = function sourceFields (series, canonicalFields) { - var sourceFields = []; - - if (canonicalFields) { - var length = canonicalFields.length; - - for (var i = 0; i < length; i++) { - var fieldName = canonicalFields[i]; - var sourceFieldName = fieldName === __WEBPACK_IMPORTED_MODULE_1__common_constants__["D" /* VALUE */] ? "field" : fieldName + "Field"; - - sourceFields.push(series[sourceFieldName] || fieldName); - } - } - - return sourceFields; - }; - - return SeriesBinder; -}(__WEBPACK_IMPORTED_MODULE_2__common__["a" /* Class */])); - -SeriesBinder.current = new SeriesBinder(); - -/* harmony default export */ __webpack_exports__["a"] = (SeriesBinder); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/tooltip/base-tooltip.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); - - - - - -var BaseTooltip = (function (Class) { - function BaseTooltip(chartService, options) { - Class.call(this); - - this.chartService = chartService; - this.options = Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])({}, this.options, options); - } - - if ( Class ) BaseTooltip.__proto__ = Class; - BaseTooltip.prototype = Object.create( Class && Class.prototype ); - BaseTooltip.prototype.constructor = BaseTooltip; - - BaseTooltip.prototype.getStyle = function getStyle (options, point) { - var background = options.background; - var border = options.border.color; - - if (point) { - var pointColor = point.color || point.options.color; - background = Object(__WEBPACK_IMPORTED_MODULE_1__common__["Q" /* valueOrDefault */])(background, pointColor); - border = Object(__WEBPACK_IMPORTED_MODULE_1__common__["Q" /* valueOrDefault */])(border, pointColor); - } - - var padding = Object(__WEBPACK_IMPORTED_MODULE_1__common__["s" /* getSpacing */])(options.padding || {}, "auto"); - - return { - backgroundColor: background, - borderColor: border, - font: options.font, - color: options.color, - opacity: options.opacity, - borderWidth: Object(__WEBPACK_IMPORTED_MODULE_1__common__["O" /* styleValue */])(options.border.width), - paddingTop: Object(__WEBPACK_IMPORTED_MODULE_1__common__["O" /* styleValue */])(padding.top), - paddingBottom: Object(__WEBPACK_IMPORTED_MODULE_1__common__["O" /* styleValue */])(padding.bottom), - paddingLeft: Object(__WEBPACK_IMPORTED_MODULE_1__common__["O" /* styleValue */])(padding.left), - paddingRight: Object(__WEBPACK_IMPORTED_MODULE_1__common__["O" /* styleValue */])(padding.right) - }; - }; - - BaseTooltip.prototype.show = function show (options, tooltipOptions, point) { - options.format = tooltipOptions.format; - - var style = this.getStyle(tooltipOptions, point); - options.style = style; - - if (!Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(tooltipOptions.color) && new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["b" /* Color */](style.backgroundColor).percBrightness() > 180) { - options.className = "k-chart-tooltip-inverse"; - } - - this.chartService.notify(__WEBPACK_IMPORTED_MODULE_2__constants__["_4" /* SHOW_TOOLTIP */], options); - - this.visible = true; - }; - - BaseTooltip.prototype.hide = function hide () { - if (this.chartService) { - this.chartService.notify(__WEBPACK_IMPORTED_MODULE_2__constants__["v" /* HIDE_TOOLTIP */]); - } - - this.visible = false; - }; - - BaseTooltip.prototype.destroy = function destroy () { - delete this.chartService; - }; - - return BaseTooltip; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["M" /* setDefaultOptions */])(BaseTooltip, { - border: { - width: 1 - }, - opacity: 1 -}); - -/* harmony default export */ __webpack_exports__["a"] = (BaseTooltip); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/tooltip/shared-tooltip.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_tooltip__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/tooltip/base-tooltip.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var SharedTooltip = (function (BaseTooltip) { - function SharedTooltip(plotArea, options) { - BaseTooltip.call(this, plotArea.chartService, options); - - this.plotArea = plotArea; - this.formatService = plotArea.chartService.format; - } - - if ( BaseTooltip ) SharedTooltip.__proto__ = BaseTooltip; - SharedTooltip.prototype = Object.create( BaseTooltip && BaseTooltip.prototype ); - SharedTooltip.prototype.constructor = SharedTooltip; - - SharedTooltip.prototype.showAt = function showAt (points, coords) { - var tooltipPoints = Object(__WEBPACK_IMPORTED_MODULE_2__common__["v" /* grep */])(points, function(point) { - var tooltip = point.series.tooltip; - var excluded = tooltip && tooltip.visible === false; - - return !excluded; - }); - - if (tooltipPoints.length > 0) { - var point = tooltipPoints[0]; - var slot = this.plotArea.categoryAxis.getSlot(point.categoryIx); - - var anchor = coords ? this._slotAnchor(coords, slot) : this._defaultAnchor(point, slot); - - this.show({ - anchor: anchor, - shared: true, - points: points, - category: point.category, - categoryText: this.formatService.auto(this.options.categoryFormat, point.category), - series: this.plotArea.series - }, this.options); - } - }; - - SharedTooltip.prototype._slotAnchor = function _slotAnchor (point, slot) { - var axis = this.plotArea.categoryAxis; - var align = { - horizontal: "left", - vertical: "center" - }; - - if (!axis.options.vertical) { - point.x = slot.center().x; - } - - return { - point: point, - align: align - }; - }; - - SharedTooltip.prototype._defaultAnchor = function _defaultAnchor (point, slot) { - var box = point.owner.pane.chartsBox(); - var vertical = this.plotArea.categoryAxis.options.vertical; - var center = box.center(); - var slotCenter = slot.center(); - var align = { - horizontal: "center", - vertical: "center" - }; - - var centerPoint; - if (vertical) { - centerPoint = new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](center.x, slotCenter.y); - } else { - centerPoint = new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](slotCenter.x, center.y); - } - - return { - point: centerPoint, - align: align - }; - }; - - return SharedTooltip; -}(__WEBPACK_IMPORTED_MODULE_0__base_tooltip__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["M" /* setDefaultOptions */])(SharedTooltip, { - categoryFormat: '{0:d}' -}); - -/* harmony default export */ __webpack_exports__["a"] = (SharedTooltip); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/tooltip/tooltip.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base_tooltip__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/tooltip/base-tooltip.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - -var Tooltip = (function (BaseTooltip) { - function Tooltip () { - BaseTooltip.apply(this, arguments); - } - - if ( BaseTooltip ) Tooltip.__proto__ = BaseTooltip; - Tooltip.prototype = Object.create( BaseTooltip && BaseTooltip.prototype ); - Tooltip.prototype.constructor = Tooltip; - - Tooltip.prototype.show = function show (point) { - if (!point || !point.tooltipAnchor || (this._current && this._current === point)) { - return; - } - - var options = Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])({}, this.options, point.options.tooltip); - var anchor = point.tooltipAnchor(); - - if (anchor) { - this._current = point; - BaseTooltip.prototype.show.call(this, { - point: point, - anchor: anchor - }, options, point); - } else { - this.hide(); - } - }; - - Tooltip.prototype.hide = function hide () { - delete this._current; - BaseTooltip.prototype.hide.call(this); - }; - - return Tooltip; -}(__WEBPACK_IMPORTED_MODULE_0__base_tooltip__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (Tooltip); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_any_has_z_index__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/any-has-z-index.js"); -/* unused harmony reexport anyHasZIndex */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_append_if_not_null__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/append-if-not-null.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__utils_append_if_not_null__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_are_numbers__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/are-numbers.js"); -/* unused harmony reexport areNumbers */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_bind_segments__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/bind-segments.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_3__utils_bind_segments__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_categories_count__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/categories-count.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__utils_categories_count__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_count_numbers__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/count-numbers.js"); -/* unused harmony reexport countNumbers */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_equals_ignore_case__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/equals-ignore-case.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_6__utils_equals_ignore_case__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_eval_options__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/eval-options.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_7__utils_eval_options__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/filter-series-by-type.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_8__utils_filter_series_by_type__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_get_date_field__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/get-date-field.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_9__utils_get_date_field__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_get_field__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/get-field.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_10__utils_get_field__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_has_gradient_overlay__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/has-gradient-overlay.js"); -/* unused harmony reexport hasGradientOverlay */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_has_value__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/has-value.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_12__utils_has_value__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__utils_is_date_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/is-date-axis.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_13__utils_is_date_axis__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__utils_segment_visible__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/segment-visible.js"); -/* unused harmony reexport segmentVisible */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__utils_single_item_or_array__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/single-item-or-array.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_15__utils_single_item_or_array__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__utils_create_out_of_range_points__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/create-out-of-range-points.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_16__utils_create_out_of_range_points__["a"]; }); - - - - - - - - - - - - - - - - - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/any-has-z-index.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = anyHasZIndex; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - -function anyHasZIndex(elements) { - for (var idx = 0; idx < elements.length; idx++) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__common__["l" /* defined */])(elements[idx].zIndex)) { - return true; - } - } -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/append-if-not-null.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = appendIfNotNull; -function appendIfNotNull(array, element) { - if (element !== null) { - array.push(element); - } -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/are-numbers.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = areNumbers; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__count_numbers__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/count-numbers.js"); - - -function areNumbers(values) { - return Object(__WEBPACK_IMPORTED_MODULE_0__count_numbers__["a" /* default */])(values) === values.length; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/bind-segments.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = bindSegments; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__series_binder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/series-binder.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__segment_visible__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/segment-visible.js"); - - - - -function bindSegments(series) { - var data = series.data; - var points = []; - var sum = 0; - var count = 0; - - for (var idx = 0; idx < data.length; idx++) { - var pointData = __WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.bindPoint(series, idx); - var value = pointData.valueFields.value; - - - if (Object(__WEBPACK_IMPORTED_MODULE_0__common__["D" /* isString */])(value)) { - value = parseFloat(value); - } - - if (Object(__WEBPACK_IMPORTED_MODULE_0__common__["B" /* isNumber */])(value)) { - pointData.visible = Object(__WEBPACK_IMPORTED_MODULE_2__segment_visible__["a" /* default */])(series, pointData.fields, idx) !== false; - - pointData.value = Math.abs(value); - points.push(pointData); - - if (pointData.visible) { - sum += pointData.value; - } - - if (value !== 0) { - count++; - } - } else { - points.push(null); - } - } - - return { - total: sum, - points: points, - count: count - }; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/categories-count.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = categoriesCount; -function categoriesCount(series) { - var seriesCount = series.length; - var categories = 0; - - for (var i = 0; i < seriesCount; i++) { - categories = Math.max(categories, series[i].data.length); - } - - return categories; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/count-numbers.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = countNumbers; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - -function countNumbers(values) { - var length = values.length; - var count = 0; - - for (var i = 0; i < length; i++) { - var num = values[i]; - if (Object(__WEBPACK_IMPORTED_MODULE_0__common__["B" /* isNumber */])(num)) { - count++; - } - } - - return count; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/create-out-of-range-points.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = createOutOfRangePoints; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__series_binder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/series-binder.js"); - - - - -var AREA_REGEX = /area/i; - -function seriesMissingValues(series) { - if (series.missingValues) { - return series.missingValues; - } - - return AREA_REGEX.test(series.type) || series.stack ? __WEBPACK_IMPORTED_MODULE_0__constants__["_19" /* ZERO */] : __WEBPACK_IMPORTED_MODULE_0__constants__["A" /* INTERPOLATE */]; -} - -function hasValue(series, item) { - var fields = __WEBPACK_IMPORTED_MODULE_2__series_binder__["a" /* default */].current.bindPoint(series, null, item); - var valueFields = fields.valueFields; - - for (var field in valueFields) { - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["j" /* convertableToNumber */])(valueFields[field])) { - return true; - } - } -} - -function createOutOfRangePoints(series, range, count, getter) { - var min = range.min; - var max = range.max; - var hasMinPoint = min > 0 && min < count; - var hasMaxPoint = max + 1 < count; - - if (hasMinPoint || hasMaxPoint) { - var missingValues = seriesMissingValues(series); - var minPoint, maxPoint; - if (missingValues !== __WEBPACK_IMPORTED_MODULE_0__constants__["A" /* INTERPOLATE */]) { - if (hasMinPoint) { - minPoint = getter(min - 1); - } - - if (hasMaxPoint) { - maxPoint = getter(max + 1); - } - } else { - var outPoint, pointHasValue; - var idx = min; - - if (hasMinPoint) { - do { - idx--; - outPoint = getter(idx); - pointHasValue = hasValue(series, outPoint.item); - } while (idx >= 0 && !pointHasValue); - - if (pointHasValue) { - minPoint = outPoint; - } - outPoint = null; - pointHasValue = false; - } - - if (hasMaxPoint) { - idx = max; - do { - idx++; - outPoint = getter(idx); - pointHasValue = hasValue(series, outPoint.item); - } while (idx < count && !pointHasValue); - - if (pointHasValue) { - maxPoint = outPoint; - } - } - } - - if (minPoint) { - series._outOfRangeMinPoint = minPoint; - } - - if (maxPoint) { - series._outOfRangeMaxPoint = maxPoint; - } - } -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/equals-ignore-case.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = equalsIgnoreCase; -function equalsIgnoreCase(a, b) { - if (a && b) { - return a.toLowerCase() === b.toLowerCase(); - } - - return a === b; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/eval-options.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = evalOptions; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - -var MAX_EXPAND_DEPTH = 5; - -function evalOptions(options, context, state, dryRun) { - if ( state === void 0 ) state = {}; - if ( dryRun === void 0 ) dryRun = false; - - var defaults = state.defaults = state.defaults || {}; - var depth = state.depth = state.depth || 0; - var needsEval = false; - - state.excluded = state.excluded || []; - - if (depth > MAX_EXPAND_DEPTH) { - return null; - } - - for (var property in options) { - if (!Object(__WEBPACK_IMPORTED_MODULE_0__common__["x" /* inArray */])(property, state.excluded) && options.hasOwnProperty(property)) { - var propValue = options[property]; - if (Object(__WEBPACK_IMPORTED_MODULE_0__common__["A" /* isFunction */])(propValue)) { - needsEval = true; - if (!dryRun) { - options[property] = Object(__WEBPACK_IMPORTED_MODULE_0__common__["Q" /* valueOrDefault */])(propValue(context), defaults[property]); - } - } else if (Object(__WEBPACK_IMPORTED_MODULE_0__common__["C" /* isObject */])(propValue)) { - if (!dryRun) { - state.defaults = defaults[property]; - } - state.depth++; - needsEval = evalOptions(propValue, context, state, dryRun) || needsEval; - state.depth--; - } - } - } - - return needsEval; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/filter-series-by-type.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = filterSeriesByType; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - -function filterSeriesByType(series, types) { - var result = []; - - var seriesTypes = [].concat(types); - for (var idx = 0; idx < series.length; idx++) { - var currentSeries = series[idx]; - if (Object(__WEBPACK_IMPORTED_MODULE_0__common__["x" /* inArray */])(currentSeries.type, seriesTypes)) { - result.push(currentSeries); - } - } - - return result; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/get-date-field.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = getDateField; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__date_utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - -function getDateField(field, row, intlService) { - if (row === null) { - return row; - } - - var key = "_date_" + field; - var value = row[key]; - - if (!value) { - value = Object(__WEBPACK_IMPORTED_MODULE_0__date_utils__["l" /* parseDate */])(intlService, Object(__WEBPACK_IMPORTED_MODULE_1__common__["u" /* getter */])(field, true)(row)); - row[key] = value; - } - - return value; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/get-field.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = getField; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - -function getField(field, row) { - if (row === null) { - return row; - } - - var get = Object(__WEBPACK_IMPORTED_MODULE_0__common__["u" /* getter */])(field, true); - return get(row); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/has-gradient-overlay.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = hasGradientOverlay; -function hasGradientOverlay(options) { - var overlay = options.overlay; - - return overlay && overlay.gradient && overlay.gradient !== "none"; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/has-value.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = hasValue; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - -function hasValue(value) { - return Object(__WEBPACK_IMPORTED_MODULE_0__common__["l" /* defined */])(value) && value !== null; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/is-date-axis.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = isDateAxis; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__equals_ignore_case__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/equals-ignore-case.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); - - - - -function isDateAxis(axisOptions, sampleCategory) { - var type = axisOptions.type; - var dateCategory = sampleCategory instanceof Date; - - return (!type && dateCategory) || Object(__WEBPACK_IMPORTED_MODULE_0__equals_ignore_case__["a" /* default */])(type, __WEBPACK_IMPORTED_MODULE_1__common_constants__["i" /* DATE */]); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/segment-visible.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = segmentVisible; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - -function segmentVisible(series, fields, index) { - var visible = fields.visible; - if (Object(__WEBPACK_IMPORTED_MODULE_0__common__["l" /* defined */])(visible)) { - return visible; - } - - var pointVisibility = series.pointVisibility; - if (pointVisibility) { - return pointVisibility[index]; - } -} - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/utils/single-item-or-array.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = singleItemOrArray; -function singleItemOrArray(array) { - return array.length === 1 ? array[0] : array; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/waterfall-chart/waterfall-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__bar_chart_bar_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/bar-chart/bar-chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__series_binder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/series-binder.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__waterfall_segment__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/waterfall-chart/waterfall-segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_categories_count__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/utils/categories-count.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - -var WaterfallChart = (function (BarChart) { - function WaterfallChart () { - BarChart.apply(this, arguments); - } - - if ( BarChart ) WaterfallChart.__proto__ = BarChart; - WaterfallChart.prototype = Object.create( BarChart && BarChart.prototype ); - WaterfallChart.prototype.constructor = WaterfallChart; - - WaterfallChart.prototype.render = function render () { - BarChart.prototype.render.call(this); - this.createSegments(); - }; - - WaterfallChart.prototype.traverseDataPoints = function traverseDataPoints (callback) { - var this$1 = this; - - var series = this.options.series; - var totalCategories = Object(__WEBPACK_IMPORTED_MODULE_3__utils_categories_count__["a" /* default */])(series); - var isVertical = !this.options.invertAxes; - - for (var seriesIx = 0; seriesIx < series.length; seriesIx++) { - var currentSeries = series[seriesIx]; - var total = 0; - var runningTotal = 0; - - for (var categoryIx = 0; categoryIx < totalCategories; categoryIx++) { - var data = __WEBPACK_IMPORTED_MODULE_1__series_binder__["a" /* default */].current.bindPoint(currentSeries, categoryIx); - var value = data.valueFields.value; - var summary = data.fields.summary; - var from = total; - var to = (void 0); - - if (summary) { - if (summary.toLowerCase() === "total") { - data.valueFields.value = total; - from = 0; - to = total; - } else { - data.valueFields.value = runningTotal; - to = from - runningTotal; - runningTotal = 0; - } - } else if (Object(__WEBPACK_IMPORTED_MODULE_4__common__["B" /* isNumber */])(value)) { - runningTotal += value; - total += value; - to = total; - } - - callback(data, { - category: this$1.categoryAxis.categoryAt(categoryIx), - categoryIx: categoryIx, - series: currentSeries, - seriesIx: seriesIx, - total: total, - runningTotal: runningTotal, - from: from, - to: to, - isVertical: isVertical - }); - } - } - }; - - WaterfallChart.prototype.updateRange = function updateRange (value, fields) { - BarChart.prototype.updateRange.call(this, { value: fields.to }, fields); - }; - - WaterfallChart.prototype.aboveAxis = function aboveAxis (point) { - return point.value >= 0; - }; - - WaterfallChart.prototype.plotRange = function plotRange (point) { - return [ point.from, point.to ]; - }; - - WaterfallChart.prototype.createSegments = function createSegments () { - var this$1 = this; - - var series = this.options.series; - var seriesPoints = this.seriesPoints; - var segments = this.segments = []; - - for (var seriesIx = 0; seriesIx < series.length; seriesIx++) { - var currentSeries = series[seriesIx]; - var points = seriesPoints[seriesIx]; - - if (points) { - var prevPoint = (void 0); - for (var pointIx = 0; pointIx < points.length; pointIx++) { - var point = points[pointIx]; - - if (point && prevPoint) { - var segment = new __WEBPACK_IMPORTED_MODULE_2__waterfall_segment__["a" /* default */](prevPoint, point, currentSeries); - segments.push(segment); - this$1.append(segment); - } - - prevPoint = point; - } - } - } - }; - - return WaterfallChart; -}(__WEBPACK_IMPORTED_MODULE_0__bar_chart_bar_chart__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (WaterfallChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/chart/waterfall-chart/waterfall-segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - -var WaterfallSegment = (function (ChartElement) { - function WaterfallSegment(from, to, series) { - ChartElement.call(this); - - this.from = from; - this.to = to; - this.series = series; - } - - if ( ChartElement ) WaterfallSegment.__proto__ = ChartElement; - WaterfallSegment.prototype = Object.create( ChartElement && ChartElement.prototype ); - WaterfallSegment.prototype.constructor = WaterfallSegment; - - WaterfallSegment.prototype.linePoints = function linePoints () { - var from = this.from; - var ref = this; - var fromBox = ref.from.box; - var toBox = ref.to.box; - var points = []; - - if (from.isVertical) { - var y = from.aboveAxis ? fromBox.y1 : fromBox.y2; - points.push( - [ fromBox.x1, y ], - [ toBox.x2, y ] - ); - } else { - var x = from.aboveAxis ? fromBox.x2 : fromBox.x1; - points.push( - [ x, fromBox.y1 ], - [ x, toBox.y2 ] - ); - } - - return points; - }; - - WaterfallSegment.prototype.createVisual = function createVisual () { - ChartElement.prototype.createVisual.call(this); - - var line = this.series.line || {}; - - var path = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromPoints(this.linePoints(), { - stroke: { - color: line.color, - width: line.width, - opacity: line.opacity, - dashType: line.dashType - } - }); - - Object(__WEBPACK_IMPORTED_MODULE_3__common__["f" /* alignPathToPixel */])(path); - this.visual.append(path); - }; - - return WaterfallSegment; -}(__WEBPACK_IMPORTED_MODULE_1__core__["d" /* ChartElement */])); - -Object(__WEBPACK_IMPORTED_MODULE_3__common__["M" /* setDefaultOptions */])(WaterfallSegment, { - animation: { - type: __WEBPACK_IMPORTED_MODULE_2__constants__["s" /* FADEIN */], - delay: __WEBPACK_IMPORTED_MODULE_2__constants__["x" /* INITIAL_ANIMATION_DURATION */] - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (WaterfallSegment); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_add_class__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/add-class.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_0__common_add_class__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_remove_class__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/remove-class.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return __WEBPACK_IMPORTED_MODULE_1__common_remove_class__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_align_path_to_pixel__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/align-path-to-pixel.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_2__common_align_path_to_pixel__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_clockwise__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/clockwise.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_3__common_clockwise__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_convertable_to_number__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/convertable-to-number.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_4__common_convertable_to_number__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_deep_extend__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/deep-extend.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_5__common_deep_extend__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_element_styles__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/element-styles.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_6__common_element_styles__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common_get_spacing__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/get-spacing.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_7__common_get_spacing__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__common_get_template__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/get-template.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_8__common_get_template__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__common_getter__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/getter.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_9__common_getter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__common_grep__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/grep.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_10__common_grep__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__common_has_classes__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/has-classes.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_11__common_has_classes__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__common_hash_map__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/hash-map.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_12__common_hash_map__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__common_in_array__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/in-array.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_13__common_in_array__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__common_interpolate_value__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/interpolate-value.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_14__common_interpolate_value__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__common_instance_observer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/instance-observer.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_15__common_instance_observer__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__common_is_array__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-array.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return __WEBPACK_IMPORTED_MODULE_16__common_is_array__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__common_is_function__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-function.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return __WEBPACK_IMPORTED_MODULE_17__common_is_function__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__common_is_number__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-number.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return __WEBPACK_IMPORTED_MODULE_18__common_is_number__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__common_is_object__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-object.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return __WEBPACK_IMPORTED_MODULE_19__common_is_object__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__common_is_string__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-string.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return __WEBPACK_IMPORTED_MODULE_20__common_is_string__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__common_map__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/map.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return __WEBPACK_IMPORTED_MODULE_21__common_map__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__common_mousewheel_delta__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/mousewheel-delta.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return __WEBPACK_IMPORTED_MODULE_22__common_mousewheel_delta__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__common_font_loader__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/font-loader.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_23__common_font_loader__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__common_set_default_options__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/set-default-options.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return __WEBPACK_IMPORTED_MODULE_24__common_set_default_options__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__common_sparse_array_limits__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/sparse-array-limits.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return __WEBPACK_IMPORTED_MODULE_25__common_sparse_array_limits__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__common_style_value__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/style-value.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return __WEBPACK_IMPORTED_MODULE_26__common_style_value__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__drawing_utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/drawing-utils.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["a"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["b"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["c"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["d"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["e"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["f"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["g"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["h"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["i"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "E", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["j"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "F", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["k"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "I", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["m"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "J", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["n"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "L", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["o"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "P", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["p"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return __WEBPACK_IMPORTED_MODULE_27__drawing_utils__["q"]; }); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/add-class.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = addClass; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-array.js"); - - -function addClass(element, classes) { - var classArray = Object(__WEBPACK_IMPORTED_MODULE_0__is_array__["a" /* default */])(classes) ? classes : [ classes ]; - - for (var idx = 0; idx < classArray.length; idx++) { - var className = classArray[idx]; - if (element.className.indexOf(className) === -1) { - element.className += " " + className; - } - } -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/align-path-to-pixel.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = alignPathToPixel; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); - - -function alignPathToPixel(path) { - var offset = 0.5; - if (path.options.stroke && __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].util.defined(path.options.stroke.width)) { - if (path.options.stroke.width % 2 === 0) { - offset = 0; - } - } - - for (var i = 0; i < path.segments.length; i++) { - path.segments[i].anchor().round(0).translate(offset, offset); - } - - return path; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/clockwise.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = clockwise; -function clockwise(angle1, angle2) { - // True if angle2 is clockwise of angle1 - // assuming angles grow in clock-wise direction - // (as in the pie and radar charts) - return -angle1.x * angle2.y + angle1.y * angle2.x < 0; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/constants.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return X; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return Y; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return WIDTH; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return HEIGHT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return DEFAULT_HEIGHT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return DEFAULT_WIDTH; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return TOP; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return LEFT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return BOTTOM; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return RIGHT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return CENTER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return COORD_PRECISION; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return DEFAULT_PRECISION; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return CIRCLE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return TRIANGLE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return CROSS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return MAX_VALUE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return MIN_VALUE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return WHITE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return BLACK; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return DEFAULT_FONT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return AXIS_LABEL_CLICK; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return OUTSIDE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return INSIDE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return NONE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return NOTE_CLICK; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return NOTE_HOVER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return VALUE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return STRING; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return OBJECT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return DATE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ARC; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return FORMAT_REGEX; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return HIGHLIGHT_ZINDEX; }); -var X = "x"; -var Y = "y"; -var TOP = "top"; -var BOTTOM = "bottom"; -var LEFT = "left"; -var RIGHT = "right"; -var CENTER = "center"; -var WIDTH = "width"; -var HEIGHT = "height"; -var COORD_PRECISION = 3; -var MAX_VALUE = Number.MAX_VALUE; -var MIN_VALUE = -Number.MAX_VALUE; -var DEFAULT_WIDTH = 600; -var DEFAULT_HEIGHT = 400; -var WHITE = "#fff"; -var BLACK = "#000"; -var DEFAULT_FONT = "12px sans-serif"; -var DEFAULT_PRECISION = 10; -var AXIS_LABEL_CLICK = "axisLabelClick"; -var NOTE_CLICK = "noteClick"; -var NOTE_HOVER = "noteHover"; -var OUTSIDE = "outside"; -var NONE = "none"; -var CIRCLE = "circle"; -var TRIANGLE = "triangle"; -var CROSS = "cross"; -var ARC = "arc"; -var INSIDE = "inside"; -var VALUE = "value"; -var STRING = "string"; -var OBJECT = "object"; -var DATE = "date"; -var FORMAT_REGEX = /\{\d+:?/; -var HIGHLIGHT_ZINDEX = 100; - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/convertable-to-number.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = convertableToNumber; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-number.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_string__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-string.js"); - - - -function convertableToNumber(value) { - return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__["a" /* default */])(value) || (Object(__WEBPACK_IMPORTED_MODULE_1__is_string__["a" /* default */])(value) && isFinite(value)); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/deep-extend.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = deepExtend; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_function__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-function.js"); - - -var OBJECT = "object"; -var UNDEFINED = "undefined"; - -function deepExtendOne(destination, source) { - - for (var property in source) { - var propValue = source[property]; - var propType = typeof propValue; - - var propInit = (void 0); - if (propType === OBJECT && propValue !== null) { - propInit = propValue.constructor; - } else { - propInit = null; - } - - if (propInit && propInit !== Array) { - - if (propValue instanceof Date) { - destination[property] = new Date(propValue.getTime()); - } else if (Object(__WEBPACK_IMPORTED_MODULE_0__is_function__["a" /* default */])(propValue.clone)) { - destination[property] = propValue.clone(); - } else { - var destProp = destination[property]; - if (typeof (destProp) === OBJECT) { - destination[property] = destProp || {}; - } else { - destination[property] = {}; - } - deepExtendOne(destination[property], propValue); - } - } else if (propType !== UNDEFINED) { - destination[property] = propValue; - } - } - - return destination; -} - -function deepExtend(destination) { - var arguments$1 = arguments; - - var length = arguments.length; - - for (var i = 1; i < length; i++) { - deepExtendOne(destination, arguments$1[i]); - } - - return destination; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/element-styles.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = elementStyles; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_object__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-object.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-array.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_string__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-string.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__style_value__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/style-value.js"); - - - - - -var SIZE_STYLES_REGEX = /width|height|top|left|bottom|right/i; - -function isSizeField(field) { - return SIZE_STYLES_REGEX.test(field); -} - -function elementStyles(element, styles) { - var stylesArray = Object(__WEBPACK_IMPORTED_MODULE_2__is_string__["a" /* default */])(styles) ? [ styles ] : styles; - - if (Object(__WEBPACK_IMPORTED_MODULE_1__is_array__["a" /* default */])(stylesArray)) { - var result = {}; - var style = window.getComputedStyle(element); - - for (var idx = 0; idx < stylesArray.length; idx++) { - var field = stylesArray[idx]; - result[field] = isSizeField(field) ? parseFloat(style[field]) : style[field]; - } - - return result; - } else if (Object(__WEBPACK_IMPORTED_MODULE_0__is_object__["a" /* default */])(styles)) { - for (var field$1 in styles) { - element.style[field$1] = Object(__WEBPACK_IMPORTED_MODULE_3__style_value__["a" /* default */])(styles[field$1]); - } - } -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/font-loader.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__drawing_utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/drawing-utils.js"); - - -var FontLoader = function FontLoader () {}; - -FontLoader.fetchFonts = function fetchFonts (options, fonts, state) { - if ( state === void 0 ) state = { depth: 0 }; - - var MAX_DEPTH = 5; - - if (!options || state.depth > MAX_DEPTH || !document.fonts) { - return; - } - - Object.keys(options).forEach(function(key) { - var value = options[key]; - if (key === "dataSource" || key[0] === "$" || !value) { - return; - } - - if (key === "font") { - fonts.push(value); - } else if (typeof value === "object") { - state.depth++; - FontLoader.fetchFonts(value, fonts, state); - state.depth--; - } - }); -}; - -FontLoader.loadFonts = function loadFonts (fonts, callback) { - var promises = []; - - if (fonts.length > 0 && document.fonts) { - try { - promises = fonts.map(function(font) { - return document.fonts.load(font); - }); - } catch (e) { - // Silence font-loading errors - Object(__WEBPACK_IMPORTED_MODULE_0__drawing_utils__["l" /* logToConsole */])(e); - } - - Promise.all(promises).then(callback, callback); - } else { - callback(); - } -}; - -FontLoader.preloadFonts = function preloadFonts (options, callback) { - var fonts = []; - FontLoader.fetchFonts(options, fonts); - - FontLoader.loadFonts(fonts, callback); -}; - -/* harmony default export */ __webpack_exports__["a"] = (FontLoader); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/get-spacing.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = getSpacing; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); - - -function getSpacing(value, defaultSpacing) { - if ( defaultSpacing === void 0 ) defaultSpacing = 0; - - var spacing = { top: 0, right: 0, bottom: 0, left: 0 }; - - if (typeof(value) === "number") { - spacing[__WEBPACK_IMPORTED_MODULE_0__constants__["B" /* TOP */]] = spacing[__WEBPACK_IMPORTED_MODULE_0__constants__["z" /* RIGHT */]] = spacing[__WEBPACK_IMPORTED_MODULE_0__constants__["d" /* BOTTOM */]] = spacing[__WEBPACK_IMPORTED_MODULE_0__constants__["r" /* LEFT */]] = value; - } else { - spacing[__WEBPACK_IMPORTED_MODULE_0__constants__["B" /* TOP */]] = value[__WEBPACK_IMPORTED_MODULE_0__constants__["B" /* TOP */]] || defaultSpacing; - spacing[__WEBPACK_IMPORTED_MODULE_0__constants__["z" /* RIGHT */]] = value[__WEBPACK_IMPORTED_MODULE_0__constants__["z" /* RIGHT */]] || defaultSpacing; - spacing[__WEBPACK_IMPORTED_MODULE_0__constants__["d" /* BOTTOM */]] = value[__WEBPACK_IMPORTED_MODULE_0__constants__["d" /* BOTTOM */]] || defaultSpacing; - spacing[__WEBPACK_IMPORTED_MODULE_0__constants__["r" /* LEFT */]] = value[__WEBPACK_IMPORTED_MODULE_0__constants__["r" /* LEFT */]] || defaultSpacing; - } - - return spacing; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/get-template.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = getTemplate; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__services__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-function.js"); - - - -function getTemplate(options) { - if ( options === void 0 ) options = {}; - - var template; - if (options.template) { - options.template = template = __WEBPACK_IMPORTED_MODULE_0__services__["c" /* TemplateService */].compile(options.template); - } else if (Object(__WEBPACK_IMPORTED_MODULE_1__is_function__["a" /* default */])(options.content)) { - template = options.content; - } - - return template; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/getter.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = getter; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); - - -var FIELD_REGEX = /\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g; -var getterCache = {}; - -getterCache['undefined'] = function(obj) { - return obj; -}; - -function getter(field) { - if (getterCache[field]) { - return getterCache[field]; - } - - var fields = []; - field.replace(FIELD_REGEX, function(match, index, indexAccessor, field) { - fields.push(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].util.defined(index) ? index : (indexAccessor || field)); - }); - - getterCache[field] = function(obj) { - var result = obj; - for (var idx = 0; idx < fields.length && result; idx++) { - result = result[fields[idx]]; - } - - return result; - }; - - return getterCache[field]; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/grep.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = grep; -function grep(array, callback) { - var length = array.length; - var result = []; - for (var idx = 0; idx < length; idx++) { - if (callback(array[idx])) { - result .push(array[idx]); - } - } - - return result; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/has-classes.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = hasClasses; -function hasClasses(element, classNames) { - if (element.className) { - var names = classNames.split(" "); - for (var idx = 0; idx < names.length; idx++) { - if (element.className.indexOf(names[idx]) !== -1) { - return true; - } - } - } -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/hash-map.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -var HashMap = function HashMap() { - this._map = {}; -}; - -HashMap.prototype.get = function get (name) { - return this._map[this._key(name)]; -}; - -HashMap.prototype.set = function set (name, value) { - this._map[this._key(name)] = value; -}; - -HashMap.prototype._key = function _key (name) { - return name instanceof Date ? name.getTime() : name; -}; - -/* harmony default export */ __webpack_exports__["a"] = (HashMap); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/in-array.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = inArray; -function inArray(value, array) { - if (array) { - return array.indexOf(value) !== -1; - } -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/instance-observer.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__deep_extend__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/deep-extend.js"); - - -var TRIGGER = 'trigger'; - -var InstanceObserver = function InstanceObserver(observer, handlers) { - this.observer = observer; - this.handlerMap = Object(__WEBPACK_IMPORTED_MODULE_0__deep_extend__["a" /* default */])({}, this.handlerMap, handlers); -}; - -InstanceObserver.prototype.trigger = function trigger (name, args) { - var ref = this; - var observer = ref.observer; - var handlerMap = ref.handlerMap; - var isDefaultPrevented; - if (handlerMap[name]) { - isDefaultPrevented = this.callObserver(handlerMap[name], args); - } else if (observer[TRIGGER]) { - isDefaultPrevented = this.callObserver(TRIGGER, name, args); - } - - return isDefaultPrevented; -}; - -InstanceObserver.prototype.callObserver = function callObserver (fnName) { - var args = [], len = arguments.length - 1; - while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; - - return this.observer[fnName].apply(this.observer, args); -}; - -InstanceObserver.prototype.requiresHandlers = function requiresHandlers (names) { - var this$1 = this; - - if (this.observer.requiresHandlers) { - return this.observer.requiresHandlers(names); - } - - for (var idx = 0; idx < names.length; idx++) { - if (this$1.handlerMap[names[idx]]) { - return true; - } - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (InstanceObserver); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/interpolate-value.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = interpolateValue; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); - - - -function interpolateValue(start, end, progress) { - return __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].util.round(start + (end - start) * progress, __WEBPACK_IMPORTED_MODULE_1__constants__["g" /* COORD_PRECISION */]); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/is-array.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = isArray; -function isArray(value) { - return Array.isArray(value); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/is-function.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = isFunction; -function isFunction(fn) { - return typeof fn === "function"; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/is-number.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = isNumber; -function isNumber(value) { - return typeof value === "number" && !isNaN(value); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/is-object.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = isObject; -function isObject(value) { - return typeof value === "object"; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/is-string.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = isString; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); - - -function isString(value) { - return typeof value === __WEBPACK_IMPORTED_MODULE_0__constants__["A" /* STRING */]; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/map.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = map; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); - - -function map(array, callback) { - var length = array.length; - var result = []; - for (var idx = 0; idx < length; idx++) { - var value = callback(array[idx]); - if (__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].util.defined(value)) { - result.push(value); - } - } - return result; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/mousewheel-delta.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = mousewheelDelta; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); - - -function mousewheelDelta(e) { - var delta = 0; - - if (e.wheelDelta) { - delta = -e.wheelDelta / 120; - delta = delta > 0 ? Math.ceil(delta) : Math.floor(delta); - } - - if (e.detail) { - delta = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].util.round(e.detail / 3); - } - - return delta; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/remove-class.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = removeClass; -var SPACE_REGEX = /\s+/g; - -function removeClass(element, className) { - if (element && element.className) { - element.className = element.className.replace(className, "").replace(SPACE_REGEX, " "); - } -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/set-default-options.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = setDefaultOptions; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__deep_extend__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/deep-extend.js"); - - -function setDefaultOptions(type, options) { - var proto = type.prototype; - if (proto.options) { - proto.options = Object(__WEBPACK_IMPORTED_MODULE_0__deep_extend__["a" /* default */])({}, proto.options, options); - } else { - proto.options = options; - } -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/sparse-array-limits.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = sparseArrayLimits; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); - - -function sparseArrayLimits(arr) { - var min = __WEBPACK_IMPORTED_MODULE_0__constants__["s" /* MAX_VALUE */]; - var max = __WEBPACK_IMPORTED_MODULE_0__constants__["t" /* MIN_VALUE */]; - - for (var idx = 0, length = arr.length; idx < length; idx++) { - var value = arr[idx]; - if (value !== null && isFinite(value)) { - min = Math.min(min, value); - max = Math.max(max, value); - } - } - - return { - min: min === __WEBPACK_IMPORTED_MODULE_0__constants__["s" /* MAX_VALUE */] ? undefined : min, - max: max === __WEBPACK_IMPORTED_MODULE_0__constants__["t" /* MIN_VALUE */] ? undefined : max - }; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/common/style-value.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = styleValue; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/is-number.js"); - - -function styleValue(value) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__is_number__["a" /* default */])(value)) { - return value + "px"; - } - return value; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_utils_auto_major_unit__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/auto-major-unit.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_0__core_utils_auto_major_unit__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/point.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_1__core_point__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core_box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__core_box__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core_ring__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/ring.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_3__core_ring__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__core_sector__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/sector.js"); -/* unused harmony reexport Sector */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_shape_builder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/shape-builder.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_5__core_shape_builder__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__core_shape_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/shape-element.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_6__core_shape_element__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__core_chart_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/chart-element.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_7__core_chart_element__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__core_box_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box-element.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_8__core_box_element__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__core_root_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/root-element.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_9__core_root_element__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__core_float_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/float-element.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_10__core_float_element__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__core_text__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/text.js"); -/* unused harmony reexport Text */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__core_text_box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/text-box.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_12__core_text_box__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__core_title__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/title.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_13__core_title__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__core_axis_label__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/axis-label.js"); -/* unused harmony reexport AxisLabel */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__core_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/axis.js"); -/* unused harmony reexport Axis */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__core_note__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/note.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_16__core_note__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__core_category_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/category-axis.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_17__core_category_axis__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__core_date_category_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/date-category-axis.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_18__core_date_category_axis__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__core_date_value_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/date-value-axis.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_19__core_date_value_axis__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__core_numeric_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/numeric-axis.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_20__core_numeric_axis__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__core_logarithmic_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/logarithmic-axis.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_21__core_logarithmic_axis__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__core_polar_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/polar-axis.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_22__core_polar_axis__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__core_radar_category_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/radar-category-axis.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_23__core_radar_category_axis__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__core_radar_numeric_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/radar-numeric-axis.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_24__core_radar_numeric_axis__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__core_radar_logarithmic_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/radar-logarithmic-axis.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_25__core_radar_logarithmic_axis__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__core_curve_processor__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/curve-processor.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_26__core_curve_processor__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__core_gradients__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/gradients.js"); -/* unused harmony reexport Gradients */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__core_utils_rect_to_box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/rect-to-box.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_28__core_utils_rect_to_box__["a"]; }); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/axis-label.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__text_box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/text-box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_rect_to_box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/rect-to-box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - -var AxisLabel = (function (TextBox) { - function AxisLabel(value, text, index, dataItem, options) { - TextBox.call(this, text, options); - - this.text = text; - this.value = value; - this.index = index; - this.dataItem = dataItem; - this.reflow(new __WEBPACK_IMPORTED_MODULE_2__box__["a" /* default */]()); - } - - if ( TextBox ) AxisLabel.__proto__ = TextBox; - AxisLabel.prototype = Object.create( TextBox && TextBox.prototype ); - AxisLabel.prototype.constructor = AxisLabel; - - AxisLabel.prototype.visualContext = function visualContext (targetBox) { - var context = TextBox.prototype.visualContext.call(this, targetBox); - - context.value = this.value; - context.dataItem = this.dataItem; - context.format = this.options.format; - context.culture = this.options.culture; - - return context; - }; - - AxisLabel.prototype.click = function click (widget, e) { - - widget.trigger(__WEBPACK_IMPORTED_MODULE_4__common_constants__["b" /* AXIS_LABEL_CLICK */], { - element: Object(__WEBPACK_IMPORTED_MODULE_5__common__["r" /* eventElement */])(e), - value: this.value, - text: this.text, - index: this.index, - dataItem: this.dataItem, - axis: this.parent.options - }); - }; - - AxisLabel.prototype.rotate = function rotate () { - if (this.options.alignRotation !== __WEBPACK_IMPORTED_MODULE_4__common_constants__["e" /* CENTER */]) { - var box = this.normalBox.toRect(); - var transform = this.rotationTransform(); - - this.box = Object(__WEBPACK_IMPORTED_MODULE_3__utils_rect_to_box__["a" /* default */])(box.bbox(transform.matrix())); - } else { - TextBox.prototype.rotate.call(this); - } - - return this.box; - }; - - AxisLabel.prototype.rotationTransform = function rotationTransform () { - var options = this.options; - var rotation = options.rotation; - if (!rotation) { - return null; - } - - if (options.alignRotation === __WEBPACK_IMPORTED_MODULE_4__common_constants__["e" /* CENTER */]) { - return TextBox.prototype.rotationTransform.call(this); - } - - var rotationMatrix = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform().rotate(rotation).matrix(); - var box = this.normalBox.toRect(); - var rect = this.targetBox.toRect(); - - var rotationOrigin = options.rotationOrigin || __WEBPACK_IMPORTED_MODULE_4__common_constants__["B" /* TOP */]; - var alignAxis = rotationOrigin === __WEBPACK_IMPORTED_MODULE_4__common_constants__["B" /* TOP */] || rotationOrigin === __WEBPACK_IMPORTED_MODULE_4__common_constants__["d" /* BOTTOM */] ? __WEBPACK_IMPORTED_MODULE_4__common_constants__["G" /* X */] : __WEBPACK_IMPORTED_MODULE_4__common_constants__["H" /* Y */]; - var distanceAxis = rotationOrigin === __WEBPACK_IMPORTED_MODULE_4__common_constants__["B" /* TOP */] || rotationOrigin === __WEBPACK_IMPORTED_MODULE_4__common_constants__["d" /* BOTTOM */] ? __WEBPACK_IMPORTED_MODULE_4__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_4__common_constants__["G" /* X */]; - var axisAnchor = rotationOrigin === __WEBPACK_IMPORTED_MODULE_4__common_constants__["B" /* TOP */] || rotationOrigin === __WEBPACK_IMPORTED_MODULE_4__common_constants__["r" /* LEFT */] ? rect.origin : rect.bottomRight(); - - var topLeft = box.topLeft().transformCopy(rotationMatrix); - var topRight = box.topRight().transformCopy(rotationMatrix); - var bottomRight = box.bottomRight().transformCopy(rotationMatrix); - var bottomLeft = box.bottomLeft().transformCopy(rotationMatrix); - var rotatedBox = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect.fromPoints(topLeft, topRight, bottomRight, bottomLeft); - - var translate = {}; - translate[distanceAxis] = rect.origin[distanceAxis] - rotatedBox.origin[distanceAxis]; - - var distanceLeft = Math.abs(topLeft[distanceAxis] + translate[distanceAxis] - axisAnchor[distanceAxis]); - var distanceRight = Math.abs(topRight[distanceAxis] + translate[distanceAxis] - axisAnchor[distanceAxis]); - - var alignStart, alignEnd; - - if (Object(__WEBPACK_IMPORTED_MODULE_5__common__["L" /* round */])(distanceLeft, __WEBPACK_IMPORTED_MODULE_4__common_constants__["l" /* DEFAULT_PRECISION */]) === Object(__WEBPACK_IMPORTED_MODULE_5__common__["L" /* round */])(distanceRight, __WEBPACK_IMPORTED_MODULE_4__common_constants__["l" /* DEFAULT_PRECISION */])) { - alignStart = topLeft; - alignEnd = topRight; - } else if (distanceRight < distanceLeft) { - alignStart = topRight; - alignEnd = bottomRight; - } else { - alignStart = topLeft; - alignEnd = bottomLeft; - } - - var alignCenter = alignStart[alignAxis] + (alignEnd[alignAxis] - alignStart[alignAxis]) / 2; - translate[alignAxis] = rect.center()[alignAxis] - alignCenter; - - return __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform() - .translate(translate.x, translate.y) - .rotate(rotation); - }; - - return AxisLabel; -}(__WEBPACK_IMPORTED_MODULE_1__text_box__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_5__common__["M" /* setDefaultOptions */])(AxisLabel, { - _autoReflow: false -}); - -/* harmony default export */ __webpack_exports__["a"] = (AxisLabel); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/axis.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__chart_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/chart-element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__text_box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/text-box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__axis_label__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/axis-label.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__note__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/note.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__services__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_create_axis_tick__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/create-axis-tick.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_create_axis_grid_line__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/create-axis-grid-line.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - - - - -var Axis = (function (ChartElement) { - function Axis(options, chartService) { - if ( chartService === void 0 ) chartService = new __WEBPACK_IMPORTED_MODULE_6__services__["a" /* ChartService */](); - - ChartElement.call(this, options); - - this.chartService = chartService; - - if (!this.options.visible) { - this.options = Object(__WEBPACK_IMPORTED_MODULE_10__common__["k" /* deepExtend */])({}, this.options, { - labels: { - visible: false - }, - line: { - visible: false - }, - margin: 0, - majorTickSize: 0, - minorTickSize: 0 - }); - } - - this.options.minorTicks = Object(__WEBPACK_IMPORTED_MODULE_10__common__["k" /* deepExtend */])({}, { - color: this.options.line.color, - width: this.options.line.width, - visible: this.options.minorTickType !== __WEBPACK_IMPORTED_MODULE_9__common_constants__["u" /* NONE */] - }, this.options.minorTicks, { - size: this.options.minorTickSize, - align: this.options.minorTickType - }); - - this.options.majorTicks = Object(__WEBPACK_IMPORTED_MODULE_10__common__["k" /* deepExtend */])({}, { - color: this.options.line.color, - width: this.options.line.width, - visible: this.options.majorTickType !== __WEBPACK_IMPORTED_MODULE_9__common_constants__["u" /* NONE */] - }, this.options.majorTicks, { - size: this.options.majorTickSize, - align: this.options.majorTickType - }); - - this.initFields(); - - if (!this.options._deferLabels) { - this.createLabels(); - } - - this.createTitle(); - this.createNotes(); - } - - if ( ChartElement ) Axis.__proto__ = ChartElement; - Axis.prototype = Object.create( ChartElement && ChartElement.prototype ); - Axis.prototype.constructor = Axis; - - Axis.prototype.initFields = function initFields () { - }; - - // abstract labelsCount(): Number - // abstract createAxisLabel(index, options): AxisLabel - - Axis.prototype.labelsRange = function labelsRange () { - return { - min: this.options.labels.skip, - max: this.labelsCount() - }; - }; - - Axis.prototype.createLabels = function createLabels () { - var this$1 = this; - - var options = this.options; - var align = options.vertical ? __WEBPACK_IMPORTED_MODULE_9__common_constants__["z" /* RIGHT */] : __WEBPACK_IMPORTED_MODULE_9__common_constants__["e" /* CENTER */]; - var labelOptions = Object(__WEBPACK_IMPORTED_MODULE_10__common__["k" /* deepExtend */])({ }, options.labels, { - align: align, - zIndex: options.zIndex - }); - var step = Math.max(1, labelOptions.step); - - this.children = Object(__WEBPACK_IMPORTED_MODULE_10__common__["v" /* grep */])(this.children, function (child) { return !(child instanceof __WEBPACK_IMPORTED_MODULE_3__axis_label__["a" /* default */]); }); - - this.labels = []; - - if (labelOptions.visible) { - var range = this.labelsRange(); - var rotation = labelOptions.rotation; - - if (Object(__WEBPACK_IMPORTED_MODULE_10__common__["C" /* isObject */])(rotation)) { - labelOptions.alignRotation = rotation.align; - labelOptions.rotation = rotation.angle; - } - - if (labelOptions.rotation === "auto") { - labelOptions.rotation = 0; - options.autoRotateLabels = true; - } - - for (var idx = range.min; idx < range.max; idx += step) { - var label = this$1.createAxisLabel(idx, labelOptions); - if (label) { - this$1.append(label); - this$1.labels.push(label); - } - } - } - }; - - Axis.prototype.lineBox = function lineBox () { - var ref = this; - var options = ref.options; - var box = ref.box; - var vertical = options.vertical; - var mirror = options.labels.mirror; - var axisX = mirror ? box.x1 : box.x2; - var axisY = mirror ? box.y2 : box.y1; - var lineWidth = options.line.width || 0; - - return vertical ? - new __WEBPACK_IMPORTED_MODULE_5__box__["a" /* default */](axisX, box.y1, axisX, box.y2 - lineWidth) : - new __WEBPACK_IMPORTED_MODULE_5__box__["a" /* default */](box.x1, axisY, box.x2 - lineWidth, axisY); - }; - - Axis.prototype.createTitle = function createTitle () { - var options = this.options; - var titleOptions = Object(__WEBPACK_IMPORTED_MODULE_10__common__["k" /* deepExtend */])({ - rotation: options.vertical ? -90 : 0, - text: "", - zIndex: 1, - visualSize: true - }, options.title); - - if (titleOptions.visible && titleOptions.text) { - var title = new __WEBPACK_IMPORTED_MODULE_2__text_box__["a" /* default */](titleOptions.text, titleOptions); - this.append(title); - this.title = title; - } - }; - - Axis.prototype.createNotes = function createNotes () { - var this$1 = this; - - var options = this.options; - var notes = options.notes; - var items = notes.data || []; - - this.notes = []; - - for (var i = 0; i < items.length; i++) { - var item = Object(__WEBPACK_IMPORTED_MODULE_10__common__["k" /* deepExtend */])({}, notes, items[i]); - item.value = this$1.parseNoteValue(item.value); - - var note = new __WEBPACK_IMPORTED_MODULE_4__note__["a" /* default */]({ - value: item.value, - text: item.label.text, - dataItem: item - }, item, this$1.chartService); - - if (note.options.visible) { - if (Object(__WEBPACK_IMPORTED_MODULE_10__common__["l" /* defined */])(note.options.position)) { - if (options.vertical && !Object(__WEBPACK_IMPORTED_MODULE_10__common__["x" /* inArray */])(note.options.position, [ __WEBPACK_IMPORTED_MODULE_9__common_constants__["r" /* LEFT */], __WEBPACK_IMPORTED_MODULE_9__common_constants__["z" /* RIGHT */] ])) { - note.options.position = options.reverse ? __WEBPACK_IMPORTED_MODULE_9__common_constants__["r" /* LEFT */] : __WEBPACK_IMPORTED_MODULE_9__common_constants__["z" /* RIGHT */]; - } else if (!options.vertical && !Object(__WEBPACK_IMPORTED_MODULE_10__common__["x" /* inArray */])(note.options.position, [ __WEBPACK_IMPORTED_MODULE_9__common_constants__["B" /* TOP */], __WEBPACK_IMPORTED_MODULE_9__common_constants__["d" /* BOTTOM */] ])) { - note.options.position = options.reverse ? __WEBPACK_IMPORTED_MODULE_9__common_constants__["d" /* BOTTOM */] : __WEBPACK_IMPORTED_MODULE_9__common_constants__["B" /* TOP */]; - } - } else { - if (options.vertical) { - note.options.position = options.reverse ? __WEBPACK_IMPORTED_MODULE_9__common_constants__["r" /* LEFT */] : __WEBPACK_IMPORTED_MODULE_9__common_constants__["z" /* RIGHT */]; - } else { - note.options.position = options.reverse ? __WEBPACK_IMPORTED_MODULE_9__common_constants__["d" /* BOTTOM */] : __WEBPACK_IMPORTED_MODULE_9__common_constants__["B" /* TOP */]; - } - } - this$1.append(note); - this$1.notes.push(note); - } - } - }; - - Axis.prototype.parseNoteValue = function parseNoteValue (value) { - return value; - }; - - Axis.prototype.renderVisual = function renderVisual () { - ChartElement.prototype.renderVisual.call(this); - - this.createPlotBands(); - }; - - Axis.prototype.createVisual = function createVisual () { - ChartElement.prototype.createVisual.call(this); - - this.createBackground(); - this.createLine(); - }; - - Axis.prototype.gridLinesVisual = function gridLinesVisual () { - var gridLines = this._gridLines; - if (!gridLines) { - gridLines = this._gridLines = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group({ - zIndex: -2 - }); - this.appendVisual(this._gridLines); - } - - return gridLines; - }; - - Axis.prototype.createTicks = function createTicks (lineGroup) { - var options = this.options; - var lineBox = this.lineBox(); - var mirror = options.labels.mirror; - var majorUnit = options.majorTicks.visible ? options.majorUnit : 0; - var tickLineOptions = { - // TODO - // _alignLines: options._alignLines, - vertical: options.vertical - }; - - function render(tickPositions, tickOptions, skipUnit) { - var count = tickPositions.length; - var step = Math.max(1, tickOptions.step); - - if (tickOptions.visible) { - for (var i = tickOptions.skip; i < count; i += step) { - if (Object(__WEBPACK_IMPORTED_MODULE_10__common__["l" /* defined */])(skipUnit) && (i % skipUnit === 0)) { - continue; - } - - tickLineOptions.tickX = mirror ? lineBox.x2 : lineBox.x2 - tickOptions.size; - tickLineOptions.tickY = mirror ? lineBox.y1 - tickOptions.size : lineBox.y1; - tickLineOptions.position = tickPositions[i]; - - lineGroup.append(Object(__WEBPACK_IMPORTED_MODULE_7__utils_create_axis_tick__["a" /* default */])(tickLineOptions, tickOptions)); - } - } - } - - render(this.getMajorTickPositions(), options.majorTicks); - render(this.getMinorTickPositions(), options.minorTicks, majorUnit / options.minorUnit); - }; - - Axis.prototype.createLine = function createLine () { - var options = this.options; - var line = options.line; - var lineBox = this.lineBox(); - - if (line.width > 0 && line.visible) { - var path = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path({ - stroke: { - width: line.width, - color: line.color, - dashType: line.dashType - } - - /* TODO - zIndex: line.zIndex, - */ - }); - - path.moveTo(lineBox.x1, lineBox.y1) - .lineTo(lineBox.x2, lineBox.y2); - - if (options._alignLines) { - Object(__WEBPACK_IMPORTED_MODULE_10__common__["f" /* alignPathToPixel */])(path); - } - - var group = this._lineGroup = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group(); - group.append(path); - - this.visual.append(group); - this.createTicks(group); - } - }; - - Axis.prototype.getActualTickSize = function getActualTickSize () { - var options = this.options; - var tickSize = 0; - - if (options.majorTicks.visible && options.minorTicks.visible) { - tickSize = Math.max(options.majorTicks.size, options.minorTicks.size); - } else if (options.majorTicks.visible) { - tickSize = options.majorTicks.size; - } else if (options.minorTicks.visible) { - tickSize = options.minorTicks.size; - } - - return tickSize; - }; - - Axis.prototype.createBackground = function createBackground () { - var ref = this; - var options = ref.options; - var box = ref.box; - var background = options.background; - - if (background) { - this._backgroundPath = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(box.toRect(), { - fill: { - color: background - }, - stroke: null - }); - - this.visual.append(this._backgroundPath); - } - }; - - Axis.prototype.createPlotBands = function createPlotBands () { - var this$1 = this; - - var options = this.options; - var plotBands = options.plotBands || []; - var vertical = options.vertical; - var plotArea = this.plotArea; - - if (plotBands.length === 0) { - return; - } - - var group = this._plotbandGroup = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group({ - zIndex: -1 - }); - - var altAxis = Object(__WEBPACK_IMPORTED_MODULE_10__common__["v" /* grep */])(this.pane.axes, function (axis) { return axis.options.vertical !== this$1.options.vertical; })[0]; - - for (var idx = 0; idx < plotBands.length; idx++) { - var item = plotBands[idx]; - var slotX = (void 0), slotY = (void 0); - - if (vertical) { - slotX = (altAxis || plotArea.axisX).lineBox(); - slotY = this$1.getSlot(item.from, item.to, true); - } else { - slotX = this$1.getSlot(item.from, item.to, true); - slotY = (altAxis || plotArea.axisY).lineBox(); - } - - if (slotX.width() !== 0 && slotY.height() !== 0) { - var bandRect = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect( - [ slotX.x1, slotY.y1 ], - [ slotX.width(), slotY.height() ] - ); - - var path = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(bandRect, { - fill: { - color: item.color, - opacity: item.opacity - }, - stroke: null - }); - - group.append(path); - } - } - - this.appendVisual(group); - }; - - Axis.prototype.createGridLines = function createGridLines (altAxis) { - var options = this.options; - var minorGridLines = options.minorGridLines; - var majorGridLines = options.majorGridLines; - var minorUnit = options.minorUnit; - var vertical = options.vertical; - var axisLineVisible = altAxis.options.line.visible; - var majorUnit = majorGridLines.visible ? options.majorUnit : 0; - var lineBox = altAxis.lineBox(); - var linePos = lineBox[vertical ? "y1" : "x1"]; - var lineOptions = { - lineStart: lineBox[vertical ? "x1" : "y1"], - lineEnd: lineBox[vertical ? "x2" : "y2"], - vertical: vertical - }; - var majorTicks = []; - - var container = this.gridLinesVisual(); - - function render(tickPositions, gridLine, skipUnit) { - var count = tickPositions.length; - var step = Math.max(1, gridLine.step); - - if (gridLine.visible) { - for (var i = gridLine.skip; i < count; i += step) { - var pos = Object(__WEBPACK_IMPORTED_MODULE_10__common__["L" /* round */])(tickPositions[i]); - if (!Object(__WEBPACK_IMPORTED_MODULE_10__common__["x" /* inArray */])(pos, majorTicks)) { - if (i % skipUnit !== 0 && (!axisLineVisible || linePos !== pos)) { - lineOptions.position = pos; - container.append(Object(__WEBPACK_IMPORTED_MODULE_8__utils_create_axis_grid_line__["a" /* default */])(lineOptions, gridLine)); - - majorTicks.push(pos); - } - } - } - } - } - - render(this.getMajorTickPositions(), majorGridLines); - render(this.getMinorTickPositions(), minorGridLines, majorUnit / minorUnit); - - return container.children; - }; - - Axis.prototype.reflow = function reflow (box) { - var ref = this; - var options = ref.options; - var labels = ref.labels; - var title = ref.title; - var vertical = options.vertical; - var count = labels.length; - var sizeFn = vertical ? __WEBPACK_IMPORTED_MODULE_9__common_constants__["F" /* WIDTH */] : __WEBPACK_IMPORTED_MODULE_9__common_constants__["o" /* HEIGHT */]; - var titleSize = title ? title.box[sizeFn]() : 0; - var space = this.getActualTickSize() + options.margin + titleSize; - var rootBox = (this.getRoot() || {}).box || box; - var boxSize = rootBox[sizeFn](); - var maxLabelSize = 0; - - for (var i = 0; i < count; i++) { - var labelSize = labels[i].box[sizeFn](); - if (labelSize + space <= boxSize) { - maxLabelSize = Math.max(maxLabelSize, labelSize); - } - } - - if (vertical) { - this.box = new __WEBPACK_IMPORTED_MODULE_5__box__["a" /* default */]( - box.x1, box.y1, - box.x1 + maxLabelSize + space, box.y2 - ); - } else { - this.box = new __WEBPACK_IMPORTED_MODULE_5__box__["a" /* default */]( - box.x1, box.y1, - box.x2, box.y1 + maxLabelSize + space - ); - } - - this.arrangeTitle(); - this.arrangeLabels(); - this.arrangeNotes(); - }; - - Axis.prototype.getLabelsTickPositions = function getLabelsTickPositions () { - return this.getMajorTickPositions(); - }; - - Axis.prototype.labelTickIndex = function labelTickIndex (label) { - return label.index; - }; - - Axis.prototype.arrangeLabels = function arrangeLabels () { - var this$1 = this; - - var ref = this; - var options = ref.options; - var labels = ref.labels; - var labelsBetweenTicks = this.labelsBetweenTicks(); - var vertical = options.vertical; - var lineBox = this.lineBox(); - var mirror = options.labels.mirror; - var tickPositions = this.getLabelsTickPositions(); - var labelOffset = this.getActualTickSize() + options.margin; - - for (var idx = 0; idx < labels.length; idx++) { - var label = labels[idx]; - var tickIx = this$1.labelTickIndex(label); - var labelSize = vertical ? label.box.height() : label.box.width(); - var labelPos = tickPositions[tickIx] - (labelSize / 2); - var labelBox = (void 0), firstTickPosition = (void 0), nextTickPosition = (void 0); - - if (vertical) { - if (labelsBetweenTicks) { - firstTickPosition = tickPositions[tickIx]; - nextTickPosition = tickPositions[tickIx + 1]; - - var middle = firstTickPosition + (nextTickPosition - firstTickPosition) / 2; - labelPos = middle - (labelSize / 2); - } - - var labelX = lineBox.x2; - - if (mirror) { - labelX += labelOffset; - label.options.rotationOrigin = __WEBPACK_IMPORTED_MODULE_9__common_constants__["r" /* LEFT */]; - } else { - labelX -= labelOffset + label.box.width(); - label.options.rotationOrigin = __WEBPACK_IMPORTED_MODULE_9__common_constants__["z" /* RIGHT */]; - } - - labelBox = label.box.move(labelX, labelPos); - } else { - if (labelsBetweenTicks) { - firstTickPosition = tickPositions[tickIx]; - nextTickPosition = tickPositions[tickIx + 1]; - } else { - firstTickPosition = labelPos; - nextTickPosition = labelPos + labelSize; - } - - var labelY = lineBox.y1; - - if (mirror) { - labelY -= labelOffset + label.box.height(); - label.options.rotationOrigin = __WEBPACK_IMPORTED_MODULE_9__common_constants__["d" /* BOTTOM */]; - } else { - labelY += labelOffset; - label.options.rotationOrigin = __WEBPACK_IMPORTED_MODULE_9__common_constants__["B" /* TOP */]; - } - - labelBox = new __WEBPACK_IMPORTED_MODULE_5__box__["a" /* default */](firstTickPosition, labelY, - nextTickPosition, labelY + label.box.height()); - } - - label.reflow(labelBox); - } - }; - - Axis.prototype.autoRotateLabels = function autoRotateLabels () { - if (this.options.autoRotateLabels && !this.options.vertical) { - var tickPositions = this.getMajorTickPositions(); - var labels = this.labels; - var angle; - - for (var idx = 0; idx < labels.length; idx++) { - var width = Math.abs(tickPositions[idx + 1] - tickPositions[idx]); - var labelBox = labels[idx].box; - - if (labelBox.width() > width) { - if (labelBox.height() > width) { - angle = -90; - break; - } - angle = -45; - } - } - - if (angle) { - for (var idx$1 = 0; idx$1 < labels.length; idx$1++) { - labels[idx$1].options.rotation = angle; - labels[idx$1].reflow(new __WEBPACK_IMPORTED_MODULE_5__box__["a" /* default */]()); - } - return true; - } - } - }; - - Axis.prototype.arrangeTitle = function arrangeTitle () { - var ref = this; - var options = ref.options; - var title = ref.title; - var mirror = options.labels.mirror; - var vertical = options.vertical; - - if (title) { - if (vertical) { - title.options.align = mirror ? __WEBPACK_IMPORTED_MODULE_9__common_constants__["z" /* RIGHT */] : __WEBPACK_IMPORTED_MODULE_9__common_constants__["r" /* LEFT */]; - title.options.vAlign = title.options.position; - } else { - title.options.align = title.options.position; - title.options.vAlign = mirror ? __WEBPACK_IMPORTED_MODULE_9__common_constants__["B" /* TOP */] : __WEBPACK_IMPORTED_MODULE_9__common_constants__["d" /* BOTTOM */]; - } - - title.reflow(this.box); - } - }; - - Axis.prototype.arrangeNotes = function arrangeNotes () { - var this$1 = this; - - for (var idx = 0; idx < this.notes.length; idx++) { - var item = this$1.notes[idx]; - var value = item.options.value; - var slot = (void 0); - - if (Object(__WEBPACK_IMPORTED_MODULE_10__common__["l" /* defined */])(value)) { - if (this$1.shouldRenderNote(value)) { - item.show(); - } else { - item.hide(); - } - - slot = this$1.noteSlot(value); - } else { - item.hide(); - } - - item.reflow(slot || this$1.lineBox()); - } - }; - - Axis.prototype.noteSlot = function noteSlot (value) { - return this.getSlot(value); - }; - - Axis.prototype.alignTo = function alignTo (secondAxis) { - var lineBox = secondAxis.lineBox(); - var vertical = this.options.vertical; - var pos = vertical ? __WEBPACK_IMPORTED_MODULE_9__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_9__common_constants__["G" /* X */]; - - this.box.snapTo(lineBox, pos); - if (vertical) { - this.box.shrink(0, this.lineBox().height() - lineBox.height()); - } else { - this.box.shrink(this.lineBox().width() - lineBox.width(), 0); - } - this.box[pos + 1] -= this.lineBox()[pos + 1] - lineBox[pos + 1]; - this.box[pos + 2] -= this.lineBox()[pos + 2] - lineBox[pos + 2]; - }; - - Axis.prototype.axisLabelText = function axisLabelText (value, dataItem, options) { - var tmpl = Object(__WEBPACK_IMPORTED_MODULE_10__common__["t" /* getTemplate */])(options); - var text = value; - - if (tmpl) { - text = tmpl({ value: value, dataItem: dataItem, format: options.format, culture: options.culture }); - } else if (options.format) { - text = this.chartService.format.localeAuto(options.format, [ value ], options.culture); - } - - return text; - }; - - Axis.prototype.slot = function slot (from , to, limit) { - var slot = this.getSlot(from, to, limit); - if (slot) { - return slot.toRect(); - } - }; - - Axis.prototype.contentBox = function contentBox () { - var box = this.box.clone(); - var labels = this.labels; - if (labels.length) { - var axis = this.options.vertical ? __WEBPACK_IMPORTED_MODULE_9__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_9__common_constants__["G" /* X */]; - if (this.chartService.isPannable(axis)) { - var offset = this.maxLabelOffset(); - box[axis + 1] -= offset.start; - box[axis + 2] += offset.end; - } else { - if (labels[0].options.visible) { - box.wrap(labels[0].box); - } - var lastLabel = labels[labels.length - 1]; - if (lastLabel.options.visible) { - box.wrap(lastLabel.box); - } - } - } - - return box; - }; - - Axis.prototype.maxLabelOffset = function maxLabelOffset () { - var this$1 = this; - - var labelsBetweenTicks = this.labelsBetweenTicks(); - var tickPositions = this.getLabelsTickPositions(); - var offsetField = this.options.vertical ? __WEBPACK_IMPORTED_MODULE_9__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_9__common_constants__["G" /* X */]; - var labels = this.labels; - var maxStartOffset = 0; - var maxEndOffset = 0; - - for (var idx = 0; idx < labels.length; idx++) { - var label = labels[idx]; - var tickIx = this$1.labelTickIndex(label); - var startTick = (void 0), endTick = (void 0); - - if (labelsBetweenTicks) { - startTick = tickPositions[tickIx]; - endTick = tickPositions[tickIx + 1]; - } else { - startTick = endTick = tickPositions[tickIx]; - } - - maxStartOffset = Math.max(maxStartOffset, startTick - label.box[offsetField + 1]); - maxEndOffset = Math.max(maxEndOffset, label.box[offsetField + 2] - endTick); - } - - return { - start: maxStartOffset, - end: maxEndOffset - }; - }; - - Axis.prototype.limitRange = function limitRange (from, to, min, max, offset) { - var options = this.options; - - if ((from < min && offset < 0 && (!Object(__WEBPACK_IMPORTED_MODULE_10__common__["l" /* defined */])(options.min) || options.min <= min)) || (max < to && offset > 0 && (!Object(__WEBPACK_IMPORTED_MODULE_10__common__["l" /* defined */])(options.max) || max <= options.max))) { - return null; - } - - if ((to < min && offset > 0) || (max < from && offset < 0)) { - return { - min: from, - max: to - }; - } - - var rangeSize = to - from; - var minValue = from; - var maxValue = to; - - if (from < min && offset < 0) { - minValue = Object(__WEBPACK_IMPORTED_MODULE_10__common__["F" /* limitValue */])(from, min, max); - maxValue = Object(__WEBPACK_IMPORTED_MODULE_10__common__["F" /* limitValue */])(from + rangeSize, min + rangeSize, max); - } else if (to > max && offset > 0) { - maxValue = Object(__WEBPACK_IMPORTED_MODULE_10__common__["F" /* limitValue */])(to, min, max); - minValue = Object(__WEBPACK_IMPORTED_MODULE_10__common__["F" /* limitValue */])(to - rangeSize, min, max - rangeSize); - } - - return { - min: minValue, - max: maxValue - }; - }; - - Axis.prototype.valueRange = function valueRange () { - return { - min: this.seriesMin, - max: this.seriesMax - }; - }; - - Axis.prototype.labelsBetweenTicks = function labelsBetweenTicks () { - return !this.options.justified; - }; - - //add legacy fields to the options that are no longer generated by default - Axis.prototype.prepareUserOptions = function prepareUserOptions () { - }; - - return Axis; -}(__WEBPACK_IMPORTED_MODULE_1__chart_element__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_10__common__["M" /* setDefaultOptions */])(Axis, { - labels: { - visible: true, - rotation: 0, - mirror: false, - step: 1, - skip: 0 - }, - line: { - width: 1, - color: __WEBPACK_IMPORTED_MODULE_9__common_constants__["c" /* BLACK */], - visible: true - }, - title: { - visible: true, - position: __WEBPACK_IMPORTED_MODULE_9__common_constants__["e" /* CENTER */] - }, - majorTicks: { - align: __WEBPACK_IMPORTED_MODULE_9__common_constants__["y" /* OUTSIDE */], - size: 4, - skip: 0, - step: 1 - }, - minorTicks: { - align: __WEBPACK_IMPORTED_MODULE_9__common_constants__["y" /* OUTSIDE */], - size: 3, - skip: 0, - step: 1 - }, - axisCrossingValue: 0, - majorTickType: __WEBPACK_IMPORTED_MODULE_9__common_constants__["y" /* OUTSIDE */], - minorTickType: __WEBPACK_IMPORTED_MODULE_9__common_constants__["u" /* NONE */], - majorGridLines: { - skip: 0, - step: 1 - }, - minorGridLines: { - visible: false, - width: 1, - color: __WEBPACK_IMPORTED_MODULE_9__common_constants__["c" /* BLACK */], - skip: 0, - step: 1 - }, - // TODO: Move to line or labels options - margin: 5, - visible: true, - reverse: false, - justified: true, - notes: { - label: { - text: "" - } - }, - - _alignLines: true, - _deferLabels: false -}); - -/* harmony default export */ __webpack_exports__["a"] = (Axis); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/box-element.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__chart_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/chart-element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - -var BoxElement = (function (ChartElement) { - function BoxElement(options) { - ChartElement.call(this, options); - - this.options.margin = Object(__WEBPACK_IMPORTED_MODULE_4__common__["s" /* getSpacing */])(this.options.margin); - this.options.padding = Object(__WEBPACK_IMPORTED_MODULE_4__common__["s" /* getSpacing */])(this.options.padding); - } - - if ( ChartElement ) BoxElement.__proto__ = ChartElement; - BoxElement.prototype = Object.create( ChartElement && ChartElement.prototype ); - BoxElement.prototype.constructor = BoxElement; - - BoxElement.prototype.reflow = function reflow (targetBox) { - var this$1 = this; - - var options = this.options; - var width = options.width; - var height = options.height; - var shrinkToFit = options.shrinkToFit; - var hasSetSize = width && height; - var margin = options.margin; - var padding = options.padding; - var borderWidth = options.border.width; - var box; - - var reflowPaddingBox = function () { - this$1.align(targetBox, __WEBPACK_IMPORTED_MODULE_3__common_constants__["G" /* X */], options.align); - this$1.align(targetBox, __WEBPACK_IMPORTED_MODULE_3__common_constants__["H" /* Y */], options.vAlign); - this$1.paddingBox = box.clone().unpad(margin).unpad(borderWidth); - }; - - var contentBox = targetBox.clone(); - if (hasSetSize) { - contentBox.x2 = contentBox.x1 + width; - contentBox.y2 = contentBox.y1 + height; - } - - if (shrinkToFit) { - contentBox.unpad(margin).unpad(borderWidth).unpad(padding); - } - - ChartElement.prototype.reflow.call(this, contentBox); - - if (hasSetSize) { - box = this.box = new __WEBPACK_IMPORTED_MODULE_2__box__["a" /* default */](0, 0, width, height); - } else { - box = this.box; - } - - if (shrinkToFit && hasSetSize) { - reflowPaddingBox(); - contentBox = this.contentBox = this.paddingBox.clone().unpad(padding); - } else { - contentBox = this.contentBox = box.clone(); - box.pad(padding).pad(borderWidth).pad(margin); - reflowPaddingBox(); - } - - this.translateChildren( - box.x1 - contentBox.x1 + margin.left + borderWidth + padding.left, - box.y1 - contentBox.y1 + margin.top + borderWidth + padding.top - ); - - var children = this.children; - for (var i = 0; i < children.length; i++) { - var item = children[i]; - item.reflow(item.box); - } - }; - - BoxElement.prototype.align = function align (targetBox, axis, alignment) { - this.box.align(targetBox, axis, alignment); - }; - - BoxElement.prototype.hasBox = function hasBox () { - var options = this.options; - return options.border.width || options.background; - }; - - BoxElement.prototype.createVisual = function createVisual () { - ChartElement.prototype.createVisual.call(this); - - var options = this.options; - if (options.visible && this.hasBox()) { - this.visual.append(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect( - this.paddingBox.toRect(), - this.visualStyle() - )); - } - }; - - BoxElement.prototype.visualStyle = function visualStyle () { - var options = this.options; - var border = options.border || {}; - - return { - stroke: { - width: border.width, - color: border.color, - opacity: Object(__WEBPACK_IMPORTED_MODULE_4__common__["Q" /* valueOrDefault */])(border.opacity, options.opacity), - dashType: border.dashType - }, - fill: { - color: options.background, - opacity: options.opacity - }, - cursor: options.cursor - }; - }; - - return BoxElement; -}(__WEBPACK_IMPORTED_MODULE_1__chart_element__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_4__common__["M" /* setDefaultOptions */])(BoxElement, { - align: __WEBPACK_IMPORTED_MODULE_3__common_constants__["r" /* LEFT */], - vAlign: __WEBPACK_IMPORTED_MODULE_3__common_constants__["B" /* TOP */], - margin: {}, - padding: {}, - border: { - color: __WEBPACK_IMPORTED_MODULE_3__common_constants__["c" /* BLACK */], - width: 0 - }, - background: "", - shrinkToFit: false, - width: 0, - height: 0, - visible: true -}); - -/* harmony default export */ __webpack_exports__["a"] = (BoxElement); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/box.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - -var Box = (function (Class) { - function Box(x1, y1, x2, y2) { - Class.call(this); - - this.x1 = x1 || 0; - this.y1 = y1 || 0; - this.x2 = x2 || 0; - this.y2 = y2 || 0; - } - - if ( Class ) Box.__proto__ = Class; - Box.prototype = Object.create( Class && Class.prototype ); - Box.prototype.constructor = Box; - - Box.prototype.equals = function equals (box) { - return this.x1 === box.x1 && this.x2 === box.x2 && - this.y1 === box.y1 && this.y2 === box.y2; - }; - - Box.prototype.width = function width () { - return this.x2 - this.x1; - }; - - Box.prototype.height = function height () { - return this.y2 - this.y1; - }; - - Box.prototype.translate = function translate (dx, dy) { - this.x1 += dx; - this.x2 += dx; - this.y1 += dy; - this.y2 += dy; - - return this; - }; - - Box.prototype.move = function move (x, y) { - var height = this.height(); - var width = this.width(); - - if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["l" /* defined */])(x)) { - this.x1 = x; - this.x2 = this.x1 + width; - } - - if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["l" /* defined */])(y)) { - this.y1 = y; - this.y2 = this.y1 + height; - } - - return this; - }; - - Box.prototype.wrap = function wrap (targetBox) { - this.x1 = Math.min(this.x1, targetBox.x1); - this.y1 = Math.min(this.y1, targetBox.y1); - this.x2 = Math.max(this.x2, targetBox.x2); - this.y2 = Math.max(this.y2, targetBox.y2); - - return this; - }; - - Box.prototype.wrapPoint = function wrapPoint (point) { - var arrayPoint = Object(__WEBPACK_IMPORTED_MODULE_3__common__["z" /* isArray */])(point); - var x = arrayPoint ? point[0] : point.x; - var y = arrayPoint ? point[1] : point.y; - this.wrap(new Box(x, y, x, y)); - - return this; - }; - - Box.prototype.snapTo = function snapTo (targetBox, axis) { - - if (axis === __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */] || !axis) { - this.x1 = targetBox.x1; - this.x2 = targetBox.x2; - } - - if (axis === __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] || !axis) { - this.y1 = targetBox.y1; - this.y2 = targetBox.y2; - } - - return this; - }; - - Box.prototype.alignTo = function alignTo (targetBox, anchor) { - var height = this.height(); - var width = this.width(); - var axis = anchor === __WEBPACK_IMPORTED_MODULE_2__common_constants__["B" /* TOP */] || anchor === __WEBPACK_IMPORTED_MODULE_2__common_constants__["d" /* BOTTOM */] ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - var offset = axis === __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] ? height : width; - - if (anchor === __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */]) { - var targetCenter = targetBox.center(); - var center = this.center(); - - this.x1 += targetCenter.x - center.x; - this.y1 += targetCenter.y - center.y; - } else if (anchor === __WEBPACK_IMPORTED_MODULE_2__common_constants__["B" /* TOP */] || anchor === __WEBPACK_IMPORTED_MODULE_2__common_constants__["r" /* LEFT */]) { - this[axis + 1] = targetBox[axis + 1] - offset; - } else { - this[axis + 1] = targetBox[axis + 2]; - } - - this.x2 = this.x1 + width; - this.y2 = this.y1 + height; - - return this; - }; - - Box.prototype.shrink = function shrink (dw, dh) { - - this.x2 -= dw; - this.y2 -= dh; - - return this; - }; - - Box.prototype.expand = function expand (dw, dh) { - this.shrink(-dw, -dh); - return this; - }; - - Box.prototype.pad = function pad (padding) { - var spacing = Object(__WEBPACK_IMPORTED_MODULE_3__common__["s" /* getSpacing */])(padding); - - this.x1 -= spacing.left; - this.x2 += spacing.right; - this.y1 -= spacing.top; - this.y2 += spacing.bottom; - - return this; - }; - - Box.prototype.unpad = function unpad (padding) { - var spacing = Object(__WEBPACK_IMPORTED_MODULE_3__common__["s" /* getSpacing */])(padding); - - spacing.left = -spacing.left; - spacing.top = -spacing.top; - spacing.right = -spacing.right; - spacing.bottom = -spacing.bottom; - - return this.pad(spacing); - }; - - Box.prototype.clone = function clone () { - return new Box(this.x1, this.y1, this.x2, this.y2); - }; - - Box.prototype.center = function center () { - return new __WEBPACK_IMPORTED_MODULE_1__point__["a" /* default */]( - this.x1 + this.width() / 2, - this.y1 + this.height() / 2 - ); - }; - - Box.prototype.containsPoint = function containsPoint (point) { - - return point.x >= this.x1 && point.x <= this.x2 && - point.y >= this.y1 && point.y <= this.y2; - }; - - Box.prototype.points = function points () { - return [ - new __WEBPACK_IMPORTED_MODULE_1__point__["a" /* default */](this.x1, this.y1), - new __WEBPACK_IMPORTED_MODULE_1__point__["a" /* default */](this.x2, this.y1), - new __WEBPACK_IMPORTED_MODULE_1__point__["a" /* default */](this.x2, this.y2), - new __WEBPACK_IMPORTED_MODULE_1__point__["a" /* default */](this.x1, this.y2) - ]; - }; - - Box.prototype.getHash = function getHash () { - return [ this.x1, this.y1, this.x2, this.y2 ].join(","); - }; - - Box.prototype.overlaps = function overlaps (box) { - return !(box.y2 < this.y1 || this.y2 < box.y1 || box.x2 < this.x1 || this.x2 < box.x1); - }; - - Box.prototype.rotate = function rotate (rotation) { - var width = this.width(); - var height = this.height(); - var ref = this.center(); - var cx = ref.x; - var cy = ref.y; - - var r1 = rotatePoint(0, 0, cx, cy, rotation); - var r2 = rotatePoint(width, 0, cx, cy, rotation); - var r3 = rotatePoint(width, height, cx, cy, rotation); - var r4 = rotatePoint(0, height, cx, cy, rotation); - - width = Math.max(r1.x, r2.x, r3.x, r4.x) - Math.min(r1.x, r2.x, r3.x, r4.x); - height = Math.max(r1.y, r2.y, r3.y, r4.y) - Math.min(r1.y, r2.y, r3.y, r4.y); - - this.x2 = this.x1 + width; - this.y2 = this.y1 + height; - - return this; - }; - - Box.prototype.toRect = function toRect () { - return new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect([ this.x1, this.y1 ], [ this.width(), this.height() ]); - }; - - Box.prototype.hasSize = function hasSize () { - return this.width() !== 0 && this.height() !== 0; - }; - - Box.prototype.align = function align (targetBox, axis, alignment) { - var c1 = axis + 1; - var c2 = axis + 2; - var sizeFunc = axis === __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */] ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["F" /* WIDTH */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["o" /* HEIGHT */]; - var size = this[sizeFunc](); - - if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["x" /* inArray */])(alignment, [ __WEBPACK_IMPORTED_MODULE_2__common_constants__["r" /* LEFT */], __WEBPACK_IMPORTED_MODULE_2__common_constants__["B" /* TOP */] ])) { - this[c1] = targetBox[c1]; - this[c2] = this[c1] + size; - } else if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["x" /* inArray */])(alignment, [ __WEBPACK_IMPORTED_MODULE_2__common_constants__["z" /* RIGHT */], __WEBPACK_IMPORTED_MODULE_2__common_constants__["d" /* BOTTOM */] ])) { - this[c2] = targetBox[c2]; - this[c1] = this[c2] - size; - } else if (alignment === __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */]) { - this[c1] = targetBox[c1] + (targetBox[sizeFunc]() - size) / 2; - this[c2] = this[c1] + size; - } - }; - - return Box; -}(__WEBPACK_IMPORTED_MODULE_3__common__["a" /* Class */])); - -function rotatePoint(x, y, cx, cy, angle) { - var theta = Object(__WEBPACK_IMPORTED_MODULE_3__common__["J" /* rad */])(angle); - - return new __WEBPACK_IMPORTED_MODULE_1__point__["a" /* default */]( - cx + (x - cx) * Math.cos(theta) + (y - cy) * Math.sin(theta), - cy - (x - cx) * Math.sin(theta) + (y - cy) * Math.cos(theta) - ); -} - -/* harmony default export */ __webpack_exports__["a"] = (Box); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/category-axis.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/axis.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__axis_label__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/axis-label.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__date_utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils.js"); - - - - - - - -var MIN_CATEGORY_POINTS_RANGE = 0.01; - -function indexOf(value, arr) { - if (value instanceof Date) { - var length = arr.length; - for (var idx = 0; idx < length; idx++) { - if (Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["g" /* dateEquals */])(arr[idx], value)) { - return idx; - } - } - - return -1; - } - - return arr.indexOf(value); -} - -var CategoryAxis = (function (Axis) { - function CategoryAxis () { - Axis.apply(this, arguments); - } - - if ( Axis ) CategoryAxis.__proto__ = Axis; - CategoryAxis.prototype = Object.create( Axis && Axis.prototype ); - CategoryAxis.prototype.constructor = CategoryAxis; - - CategoryAxis.prototype.initFields = function initFields () { - this._ticks = {}; - }; - - CategoryAxis.prototype.categoriesHash = function categoriesHash () { - return ""; - }; - - CategoryAxis.prototype.initUserOptions = function initUserOptions (options) { - var categories = options.categories || []; - var definedMin = Object(__WEBPACK_IMPORTED_MODULE_3__common__["l" /* defined */])(options.min); - var definedMax = Object(__WEBPACK_IMPORTED_MODULE_3__common__["l" /* defined */])(options.max); - options.srcCategories = options.categories = categories; - - if ((definedMin || definedMax) && categories.length) { - var min = definedMin ? Math.floor(options.min) : 0; - var max; - - if (definedMax) { - max = options.justified ? Math.floor(options.max) + 1 : Math.ceil(options.max); - } else { - max = categories.length; - } - - options.categories = options.categories.slice(min, max); - } - - return options; - }; - - CategoryAxis.prototype.rangeIndices = function rangeIndices () { - var options = this.options; - var length = options.categories.length || 1; - var min = Object(__WEBPACK_IMPORTED_MODULE_3__common__["B" /* isNumber */])(options.min) ? options.min % 1 : 0; - var max; - - if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["B" /* isNumber */])(options.max) && options.max % 1 !== 0 && options.max < this.totalRange().max) { - max = length - (1 - options.max % 1); - } else { - max = length - (options.justified ? 1 : 0); - } - - return { - min: min, - max: max - }; - }; - - CategoryAxis.prototype.totalRangeIndices = function totalRangeIndices (limit) { - var options = this.options; - var min = Object(__WEBPACK_IMPORTED_MODULE_3__common__["B" /* isNumber */])(options.min) ? options.min : 0; - var max; - - if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["B" /* isNumber */])(options.max)) { - max = options.max; - } else if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["B" /* isNumber */])(options.min)) { - max = min + options.categories.length; - } else { - max = this.totalRange().max || 1; - } - - if (limit) { - var totalRange = this.totalRange(); - min = Object(__WEBPACK_IMPORTED_MODULE_3__common__["F" /* limitValue */])(min, 0, totalRange.max); - max = Object(__WEBPACK_IMPORTED_MODULE_3__common__["F" /* limitValue */])(max, 0, totalRange.max); - } - - return { - min: min, - max: max - }; - }; - - CategoryAxis.prototype.range = function range () { - var options = this.options; - var min = Object(__WEBPACK_IMPORTED_MODULE_3__common__["B" /* isNumber */])(options.min) ? options.min : 0; - var max = Object(__WEBPACK_IMPORTED_MODULE_3__common__["B" /* isNumber */])(options.max) ? options.max : this.totalRange().max; - - return { - min: min, - max: max - }; - }; - - CategoryAxis.prototype.totalRange = function totalRange () { - var options = this.options; - return { min: 0, max: Math.max(this._seriesMax || 0, options.srcCategories.length) - (options.justified ? 1 : 0) }; - }; - - CategoryAxis.prototype.scaleOptions = function scaleOptions () { - var ref = this.rangeIndices(); - var min = ref.min; - var max = ref.max; - var lineBox = this.lineBox(); - var size = this.options.vertical ? lineBox.height() : lineBox.width(); - var scale = size / ((max - min) || 1); - - return { - scale: scale * (this.options.reverse ? -1 : 1), - box: lineBox, - min: min, - max: max - }; - }; - - CategoryAxis.prototype.arrangeLabels = function arrangeLabels () { - Axis.prototype.arrangeLabels.call(this); - this.hideOutOfRangeLabels(); - }; - - CategoryAxis.prototype.hideOutOfRangeLabels = function hideOutOfRangeLabels () { - var ref = this; - var box = ref.box; - var labels = ref.labels; - - if (labels.length) { - var valueAxis = this.options.vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - var start = box[valueAxis + 1]; - var end = box[valueAxis + 2]; - var firstLabel = labels[0]; - var lastLabel = Object(__WEBPACK_IMPORTED_MODULE_3__common__["E" /* last */])(labels); - - if (firstLabel.box[valueAxis + 1] > end || firstLabel.box[valueAxis + 2] < start) { - firstLabel.options.visible = false; - } - if (lastLabel.box[valueAxis + 1] > end || lastLabel.box[valueAxis + 2] < start) { - lastLabel.options.visible = false; - } - } - }; - - CategoryAxis.prototype.getMajorTickPositions = function getMajorTickPositions () { - return this.getTicks().majorTicks; - }; - - CategoryAxis.prototype.getMinorTickPositions = function getMinorTickPositions () { - return this.getTicks().minorTicks; - }; - - CategoryAxis.prototype.getLabelsTickPositions = function getLabelsTickPositions () { - return this.getTicks().labelTicks; - }; - - CategoryAxis.prototype.tickIndices = function tickIndices (stepSize) { - var ref = this.rangeIndices(); - var min = ref.min; - var max = ref.max; - var limit = Math.ceil(max); - var current = Math.floor(min); - var indices = []; - - while (current <= limit) { - indices.push(current); - current += stepSize; - } - - return indices; - }; - - CategoryAxis.prototype.getTickPositions = function getTickPositions (stepSize) { - var ref = this.options; - var vertical = ref.vertical; - var reverse = ref.reverse; - var ref$1 = this.scaleOptions(); - var scale = ref$1.scale; - var box = ref$1.box; - var min = ref$1.min; - var pos = box[(vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]) + (reverse ? 2 : 1)]; - var indices = this.tickIndices(stepSize); - var positions = []; - - for (var idx = 0; idx < indices.length; idx++) { - positions.push(pos + Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])(scale * (indices[idx] - min), __WEBPACK_IMPORTED_MODULE_2__common_constants__["g" /* COORD_PRECISION */])); - } - - return positions; - }; - - CategoryAxis.prototype.getTicks = function getTicks () { - var options = this.options; - var cache = this._ticks; - var range = this.rangeIndices(); - var lineBox = this.lineBox(); - var hash = lineBox.getHash() + range.min + "," + range.max + options.reverse + options.justified; - - if (cache._hash !== hash) { - var hasMinor = options.minorTicks.visible || options.minorGridLines.visible; - cache._hash = hash; - cache.labelTicks = this.getTickPositions(1); - cache.majorTicks = this.filterOutOfRangePositions(cache.labelTicks, lineBox); - cache.minorTicks = hasMinor ? this.filterOutOfRangePositions(this.getTickPositions(0.5), lineBox) : []; - } - - return cache; - }; - - CategoryAxis.prototype.filterOutOfRangePositions = function filterOutOfRangePositions (positions, lineBox) { - if (!positions.length) { - return positions; - } - - var axis = this.options.vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - var inRange = function (position) { return lineBox[axis + 1] <= position && position <= lineBox[axis + 2]; }; - - var end = positions.length - 1; - var startIndex = 0; - while (!inRange(positions[startIndex]) && startIndex <= end) { - startIndex++; - } - - var endIndex = end; - - while (!inRange(positions[endIndex]) && endIndex >= 0) { - endIndex--; - } - - return positions.slice(startIndex, endIndex + 1); - }; - - CategoryAxis.prototype.getSlot = function getSlot (from, to, limit) { - var options = this.options; - var reverse = options.reverse; - var justified = options.justified; - var vertical = options.vertical; - var ref = this.scaleOptions(); - var scale = ref.scale; - var box = ref.box; - var min = ref.min; - var valueAxis = vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - var lineStart = box[valueAxis + (reverse ? 2 : 1)]; - var slotBox = box.clone(); - var singleSlot = !Object(__WEBPACK_IMPORTED_MODULE_3__common__["l" /* defined */])(to); - - var start = Object(__WEBPACK_IMPORTED_MODULE_3__common__["Q" /* valueOrDefault */])(from, 0); - var end = Object(__WEBPACK_IMPORTED_MODULE_3__common__["Q" /* valueOrDefault */])(to, start); - end = Math.max(end - 1, start); - - // Fixes transient bug caused by iOS 6.0 JIT - // (one can never be too sure) - end = Math.max(start, end); - - var p1 = lineStart + (start - min) * scale; - var p2 = lineStart + (end + 1 - min) * scale; - - if (singleSlot && justified) { - p2 = p1; - } - - if (limit) { - p1 = Object(__WEBPACK_IMPORTED_MODULE_3__common__["F" /* limitValue */])(p1, box[valueAxis + 1], box[valueAxis + 2]); - p2 = Object(__WEBPACK_IMPORTED_MODULE_3__common__["F" /* limitValue */])(p2, box[valueAxis + 1], box[valueAxis + 2]); - } - - slotBox[valueAxis + 1] = reverse ? p2 : p1; - slotBox[valueAxis + 2] = reverse ? p1 : p2; - - return slotBox; - }; - - CategoryAxis.prototype.limitSlot = function limitSlot (slot) { - var vertical = this.options.vertical; - var valueAxis = vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - var lineBox = this.lineBox(); - var limittedSlot = slot.clone(); - - limittedSlot[valueAxis + 1] = Object(__WEBPACK_IMPORTED_MODULE_3__common__["F" /* limitValue */])(slot[valueAxis + 1], lineBox[valueAxis + 1], lineBox[valueAxis + 2]); - limittedSlot[valueAxis + 2] = Object(__WEBPACK_IMPORTED_MODULE_3__common__["F" /* limitValue */])(slot[valueAxis + 2], lineBox[valueAxis + 1], lineBox[valueAxis + 2]); - - return limittedSlot; - }; - - CategoryAxis.prototype.slot = function slot (from, to, limit) { - var start = from; - var end = to; - - if (typeof start === "string") { - start = this.categoryIndex(start); - } - - if (typeof end === "string") { - end = this.categoryIndex(end); - } - - return Axis.prototype.slot.call(this, start, end, limit); - }; - - CategoryAxis.prototype.pointCategoryIndex = function pointCategoryIndex (point) { - var ref = this.options; - var reverse = ref.reverse; - var justified = ref.justified; - var vertical = ref.vertical; - var valueAxis = vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - var ref$1 = this.scaleOptions(); - var scale = ref$1.scale; - var box = ref$1.box; - var min = ref$1.min; - var max = ref$1.max; - var startValue = reverse ? max : min; - var lineStart = box[valueAxis + 1]; - var lineEnd = box[valueAxis + 2]; - var pos = point[valueAxis]; - - if (pos < lineStart || pos > lineEnd) { - return null; - } - - var value = startValue + (pos - lineStart) / scale; - var diff = value % 1; - - if (justified) { - value = Math.round(value); - } else if (diff === 0 && value > 0) { - value--; - } - - return Math.floor(value); - }; - - CategoryAxis.prototype.getCategory = function getCategory (point) { - var index = this.pointCategoryIndex(point); - - if (index === null) { - return null; - } - - return this.options.categories[index]; - }; - - CategoryAxis.prototype.categoryIndex = function categoryIndex (value) { - return this.totalIndex(value) - Math.floor(this.options.min || 0); - }; - - CategoryAxis.prototype.categoryAt = function categoryAt (index, total) { - var options = this.options; - - return (total ? options.srcCategories : options.categories)[index]; - }; - - CategoryAxis.prototype.categoriesCount = function categoriesCount () { - return (this.options.categories || []).length; - }; - - CategoryAxis.prototype.translateRange = function translateRange (delta) { - var options = this.options; - var lineBox = this.lineBox(); - var size = options.vertical ? lineBox.height() : lineBox.width(); - var range = options.categories.length; - var scale = size / range; - var offset = Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])(delta / scale, __WEBPACK_IMPORTED_MODULE_2__common_constants__["l" /* DEFAULT_PRECISION */]); - - return { - min: offset, - max: range + offset - }; - }; - - CategoryAxis.prototype.zoomRange = function zoomRange (rate) { - var rangeIndices = this.totalRangeIndices(); - var ref = this.totalRange(); - var totalMin = ref.min; - var totalMax = ref.max; - var min = Object(__WEBPACK_IMPORTED_MODULE_3__common__["F" /* limitValue */])(rangeIndices.min + rate, totalMin, totalMax); - var max = Object(__WEBPACK_IMPORTED_MODULE_3__common__["F" /* limitValue */])(rangeIndices.max - rate, totalMin, totalMax); - - if (max - min > 0) { - return { - min: min, - max: max - }; - } - }; - - CategoryAxis.prototype.scaleRange = function scaleRange (scale) { - var range = this.options.categories.length; - var delta = scale * range; - - return { - min: -delta, - max: range + delta - }; - }; - - CategoryAxis.prototype.labelsCount = function labelsCount () { - var labelsRange = this.labelsRange(); - - return labelsRange.max - labelsRange.min; - }; - - CategoryAxis.prototype.labelsRange = function labelsRange () { - var options = this.options; - var justified = options.justified; - var labelOptions = options.labels; - var ref = this.totalRangeIndices(true); - var min = ref.min; - var max = ref.max; - var start = Math.floor(min); - - if (!justified) { - min = Math.floor(min); - max = Math.ceil(max); - } else { - min = Math.ceil(min); - max = Math.floor(max); - } - - var skip; - - if (min > labelOptions.skip) { - skip = labelOptions.skip + labelOptions.step * Math.ceil((min - labelOptions.skip) / labelOptions.step); - } else { - skip = labelOptions.skip; - } - - return { - min: skip - start, - max: (options.categories.length ? max + (justified ? 1 : 0) : 0) - start - }; - }; - - CategoryAxis.prototype.createAxisLabel = function createAxisLabel (index, labelOptions) { - var options = this.options; - var dataItem = options.dataItems ? options.dataItems[index] : null; - var category = Object(__WEBPACK_IMPORTED_MODULE_3__common__["Q" /* valueOrDefault */])(options.categories[index], ""); - var text = this.axisLabelText(category, dataItem, labelOptions); - - return new __WEBPACK_IMPORTED_MODULE_1__axis_label__["a" /* default */](category, text, index, dataItem, labelOptions); - }; - - CategoryAxis.prototype.shouldRenderNote = function shouldRenderNote (value) { - var range = this.totalRangeIndices(); - - return Math.floor(range.min) <= value && value <= Math.ceil(range.max); - }; - - CategoryAxis.prototype.noteSlot = function noteSlot (value) { - var options = this.options; - var index = value - Math.floor(options.min || 0); - return this.getSlot(index); - }; - - CategoryAxis.prototype.arrangeNotes = function arrangeNotes () { - Axis.prototype.arrangeNotes.call(this); - this.hideOutOfRangeNotes(); - }; - - CategoryAxis.prototype.hideOutOfRangeNotes = function hideOutOfRangeNotes () { - var ref = this; - var notes = ref.notes; - var box = ref.box; - if (notes && notes.length) { - var valueAxis = this.options.vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - var start = box[valueAxis + 1]; - var end = box[valueAxis + 2]; - - for (var idx = 0; idx < notes.length; idx++) { - var note = notes[idx]; - if (note.box && (end < note.box[valueAxis + 1] || note.box[valueAxis + 2] < start)) { - note.hide(); - } - } - } - }; - - CategoryAxis.prototype.pan = function pan (delta) { - var range = this.totalRangeIndices(true); - var ref = this.scaleOptions(); - var scale = ref.scale; - var offset = Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])(delta / scale, __WEBPACK_IMPORTED_MODULE_2__common_constants__["l" /* DEFAULT_PRECISION */]); - var totalRange = this.totalRange(); - var min = range.min + offset; - var max = range.max + offset; - - return this.limitRange(min, max, 0, totalRange.max, offset); - }; - - CategoryAxis.prototype.pointsRange = function pointsRange (start, end) { - var ref = this.options; - var reverse = ref.reverse; - var vertical = ref.vertical; - var valueAxis = vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - var range = this.totalRangeIndices(true); - var ref$1 = this.scaleOptions(); - var scale = ref$1.scale; - var box = ref$1.box; - var lineStart = box[valueAxis + (reverse ? 2 : 1)]; - - var diffStart = start[valueAxis] - lineStart; - var diffEnd = end[valueAxis] - lineStart; - - var min = range.min + diffStart / scale; - var max = range.min + diffEnd / scale; - var rangeMin = Math.min(min, max); - var rangeMax = Math.max(min, max); - - if (rangeMax - rangeMin >= MIN_CATEGORY_POINTS_RANGE) { - return { - min: rangeMin, - max: rangeMax - }; - } - }; - - CategoryAxis.prototype.valueRange = function valueRange () { - return this.range(); - }; - - CategoryAxis.prototype.totalIndex = function totalIndex (value) { - var options = this.options; - var index = this._categoriesMap ? - this._categoriesMap.get(value) : indexOf(value, options.srcCategories); - - return index; - }; - - CategoryAxis.prototype.currentRangeIndices = function currentRangeIndices () { - var options = this.options; - var min = 0; - - if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["B" /* isNumber */])(options.min)) { - min = Math.floor(options.min); - } - - var max; - if (Object(__WEBPACK_IMPORTED_MODULE_3__common__["B" /* isNumber */])(options.max)) { - max = options.justified ? Math.floor(options.max) : Math.ceil(options.max) - 1; - } else { - max = this.totalCount() - 1; - } - - return { - min: min, - max: max - }; - }; - - CategoryAxis.prototype.mapCategories = function mapCategories () { - if (!this._categoriesMap) { - var map = this._categoriesMap = new __WEBPACK_IMPORTED_MODULE_3__common__["c" /* HashMap */](); - var srcCategories = this.options.srcCategories; - for (var idx = 0; idx < srcCategories.length; idx++) { - map.set(srcCategories[idx], idx); - } - } - }; - - CategoryAxis.prototype.totalCount = function totalCount () { - return Math.max(this.options.srcCategories.length, this._seriesMax || 0); - }; - - return CategoryAxis; -}(__WEBPACK_IMPORTED_MODULE_0__axis__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_3__common__["M" /* setDefaultOptions */])(CategoryAxis, { - type: "category", - vertical: false, - majorGridLines: { - visible: false, - width: 1, - color: __WEBPACK_IMPORTED_MODULE_2__common_constants__["c" /* BLACK */] - }, - labels: { - zIndex: 1 - }, - justified: false, - _deferLabels: true -}); - -/* harmony default export */ __webpack_exports__["a"] = (CategoryAxis); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/chart-element.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var ChartElement = (function (Class) { - function ChartElement(options) { - Class.call(this); - - this.children = []; - - this.options = Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])({}, this.options, this.initUserOptions(options)); - } - - if ( Class ) ChartElement.__proto__ = Class; - ChartElement.prototype = Object.create( Class && Class.prototype ); - ChartElement.prototype.constructor = ChartElement; - - ChartElement.prototype.initUserOptions = function initUserOptions (options) { - return options; - }; - - ChartElement.prototype.reflow = function reflow (targetBox) { - var children = this.children; - var box; - - for (var i = 0; i < children.length; i++) { - var currentChild = children[i]; - currentChild.reflow(targetBox); - - box = box ? box.wrap(currentChild.box) : currentChild.box.clone(); - } - - this.box = box || targetBox; - }; - - ChartElement.prototype.destroy = function destroy () { - var children = this.children; - - if (this.animation) { - this.animation.destroy(); - } - - for (var i = 0; i < children.length; i++) { - children[i].destroy(); - } - }; - - ChartElement.prototype.getRoot = function getRoot () { - var parent = this.parent; - - return parent ? parent.getRoot() : null; - }; - - ChartElement.prototype.getSender = function getSender () { - var service = this.getService(); - if (service) { - return service.sender; - } - }; - - ChartElement.prototype.getService = function getService () { - var element = this; - while (element) { - if (element.chartService) { - return element.chartService; - } - element = element.parent; - } - }; - - ChartElement.prototype.translateChildren = function translateChildren (dx, dy) { - var children = this.children; - var childrenCount = children.length; - - for (var i = 0; i < childrenCount; i++) { - children[i].box.translate(dx, dy); - } - }; - - ChartElement.prototype.append = function append () { - var arguments$1 = arguments; - var this$1 = this; - - for (var i = 0; i < arguments.length; i++) { - var item = arguments$1[i]; - this$1.children.push(item); - item.parent = this$1; - } - }; - - ChartElement.prototype.renderVisual = function renderVisual () { - if (this.options.visible === false) { - return; - } - - this.createVisual(); - - this.addVisual(); - - this.renderChildren(); - - this.createAnimation(); - this.renderComplete(); - }; - - ChartElement.prototype.addVisual = function addVisual () { - if (this.visual) { - this.visual.chartElement = this; - - if (this.parent) { - this.parent.appendVisual(this.visual); - } - } - }; - - ChartElement.prototype.renderChildren = function renderChildren () { - var children = this.children; - var length = children.length; - for (var i = 0; i < length; i++) { - children[i].renderVisual(); - } - }; - - ChartElement.prototype.createVisual = function createVisual () { - this.visual = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group({ - zIndex: this.options.zIndex, - visible: Object(__WEBPACK_IMPORTED_MODULE_2__common__["Q" /* valueOrDefault */])(this.options.visible, true) - }); - }; - - ChartElement.prototype.createAnimation = function createAnimation () { - if (this.visual) { - this.animation = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Animation.create( - this.visual, this.options.animation - ); - } - }; - - ChartElement.prototype.appendVisual = function appendVisual (childVisual) { - if (!childVisual.chartElement) { - childVisual.chartElement = this; - } - - if (childVisual.options.noclip) { - this.clipRoot().visual.append(childVisual); - } else if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["l" /* defined */])(childVisual.options.zIndex)) { - this.stackRoot().stackVisual(childVisual); - } else if (this.isStackRoot) { - this.stackVisual(childVisual); - } else if (this.visual) { - this.visual.append(childVisual); - } else { - // Allow chart elements without visuals to - // pass through child visuals - this.parent.appendVisual(childVisual); - } - }; - - ChartElement.prototype.clipRoot = function clipRoot () { - if (this.parent) { - return this.parent.clipRoot(); - } - - return this; - }; - - ChartElement.prototype.stackRoot = function stackRoot () { - if (this.parent) { - return this.parent.stackRoot(); - } - - return this; - }; - - ChartElement.prototype.stackVisual = function stackVisual (childVisual) { - var zIndex = childVisual.options.zIndex || 0; - var visuals = this.visual.children; - var length = visuals.length; - var pos; - - for (pos = 0; pos < length; pos++) { - var sibling = visuals[pos]; - var here = Object(__WEBPACK_IMPORTED_MODULE_2__common__["Q" /* valueOrDefault */])(sibling.options.zIndex, 0); - if (here > zIndex) { - break; - } - } - - this.visual.insert(pos, childVisual); - }; - - ChartElement.prototype.traverse = function traverse (callback) { - var children = this.children; - var length = children.length; - - for (var i = 0; i < length; i++) { - var child = children[i]; - - callback(child); - if (child.traverse) { - child.traverse(callback); - } - } - }; - - ChartElement.prototype.closest = function closest (match) { - var element = this; - var matched = false; - - while (element && !matched) { - matched = match(element); - - if (!matched) { - element = element.parent; - } - } - - if (matched) { - return element; - } - }; - - ChartElement.prototype.renderComplete = function renderComplete () {}; - - ChartElement.prototype.hasHighlight = function hasHighlight () { - var options = (this.options || {}).highlight; - return !(!this.createHighlight || (options && options.visible === false)); - }; - - ChartElement.prototype.toggleHighlight = function toggleHighlight (show) { - var this$1 = this; - - var options = (this.options || {}).highlight || {}; - var customVisual = options.visual; - var highlight = this._highlight; - - if (!highlight) { - var highlightOptions = { - fill: { - color: __WEBPACK_IMPORTED_MODULE_1__common_constants__["E" /* WHITE */], - opacity: 0.2 - }, - stroke: { - color: __WEBPACK_IMPORTED_MODULE_1__common_constants__["E" /* WHITE */], - width: 1, - opacity: 0.2 - } - }; - - if (customVisual) { - highlight = this._highlight = customVisual( - Object.assign(this.highlightVisualArgs(), { - createVisual: function () { return this$1.createHighlight(highlightOptions); }, - sender: this.getSender(), - series: this.series, - dataItem: this.dataItem, - category: this.category, - value: this.value, - percentage: this.percentage, - runningTotal: this.runningTotal, - total: this.total - } - )); - - if (!highlight) { - return; - } - } else { - highlight = this._highlight = this.createHighlight(highlightOptions); - } - - if (!Object(__WEBPACK_IMPORTED_MODULE_2__common__["l" /* defined */])(highlight.options.zIndex)) { - highlight.options.zIndex = Object(__WEBPACK_IMPORTED_MODULE_2__common__["Q" /* valueOrDefault */])(options.zIndex, this.options.zIndex); - } - - this.appendVisual(highlight); - } - - highlight.visible(show); - }; - - ChartElement.prototype.createGradientOverlay = function createGradientOverlay (element, options, gradientOptions) { - var overlay = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path(Object.assign({ - stroke: { - color: "none" - }, - fill: this.createGradient(gradientOptions), - closed: element.options.closed - }, options)); - - overlay.segments.elements(element.segments.elements()); - - return overlay; - }; - - ChartElement.prototype.createGradient = function createGradient (options) { - if (this.parent) { - return this.parent.createGradient(options); - } - }; - - return ChartElement; -}(__WEBPACK_IMPORTED_MODULE_2__common__["a" /* Class */])); - -ChartElement.prototype.options = { }; - -/* harmony default export */ __webpack_exports__["a"] = (ChartElement); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/constants.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return COORDINATE_LIMIT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return DateLabelFormats; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ZERO_THRESHOLD; }); -var COORDINATE_LIMIT = 300000; - -var DateLabelFormats = { - milliseconds: "HH:mm:ss.fff", - seconds: "HH:mm:ss", - minutes: "HH:mm", - hours: "HH:mm", - days: "M/d", - weeks: "M/d", - months: "MMM 'yy", - years: "yyyy" -}; - -var ZERO_THRESHOLD = 0.2; - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/curve-processor.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var WEIGHT = 0.333; -var EXTREMUM_ALLOWED_DEVIATION = 0.01; - -var CurveProcessor = (function (Class) { - function CurveProcessor(closed) { - Class.call(this); - - this.closed = closed; - } - - if ( Class ) CurveProcessor.__proto__ = Class; - CurveProcessor.prototype = Object.create( Class && Class.prototype ); - CurveProcessor.prototype.constructor = CurveProcessor; - - CurveProcessor.prototype.process = function process (dataPoints) { - var this$1 = this; - - var points = dataPoints.slice(0); - var segments = []; - var closed = this.closed; - var length = points.length; - - if (length > 2) { - this.removeDuplicates(0, points); - length = points.length; - } - - if (length < 2 || (length === 2 && points[0].equals(points[1]))) { - return segments; - } - - var p0 = points[0]; - var p1 = points[1]; - var p2 = points[2]; - - segments.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Segment(p0)); - - while (p0.equals(points[length - 1])) { - closed = true; - points.pop(); - length--; - } - - if (length === 2) { - var tangent = this.tangent(p0,p1, __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */], __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */]); - - Object(__WEBPACK_IMPORTED_MODULE_2__common__["E" /* last */])(segments).controlOut( - this.firstControlPoint(tangent, p0, p1, __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */], __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */]) - ); - - segments.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Segment( - p1, - this.secondControlPoint(tangent, p0, p1, __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */], __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */]) - )); - - return segments; - } - - var initialControlPoint, lastControlPoint; - - if (closed) { - p0 = points[length - 1]; p1 = points[0]; p2 = points[1]; - var controlPoints = this.controlPoints(p0, p1, p2); - initialControlPoint = controlPoints[1]; - lastControlPoint = controlPoints[0]; - } else { - var tangent$1 = this.tangent(p0, p1, __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */],__WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */]); - initialControlPoint = this.firstControlPoint(tangent$1, p0, p1, __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */], __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */]); - } - - var cp0 = initialControlPoint; - for (var idx = 0; idx <= length - 3; idx++) { - this$1.removeDuplicates(idx, points); - length = points.length; - if (idx + 3 <= length) { - p0 = points[idx]; p1 = points[idx + 1]; p2 = points[idx + 2]; - var controlPoints$1 = this$1.controlPoints(p0,p1,p2); - - Object(__WEBPACK_IMPORTED_MODULE_2__common__["E" /* last */])(segments).controlOut(cp0); - cp0 = controlPoints$1[1]; - - var cp1 = controlPoints$1[0]; - segments.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Segment(p1, cp1)); - } - } - - if (closed) { - p0 = points[length - 2]; p1 = points[length - 1]; p2 = points[0]; - var controlPoints$2 = this.controlPoints(p0, p1, p2); - - Object(__WEBPACK_IMPORTED_MODULE_2__common__["E" /* last */])(segments).controlOut(cp0); - segments.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Segment( - p1, - controlPoints$2[0] - )); - - Object(__WEBPACK_IMPORTED_MODULE_2__common__["E" /* last */])(segments).controlOut(controlPoints$2[1]); - segments.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Segment( - p2, - lastControlPoint - )); - } else { - var tangent$2 = this.tangent(p1, p2, __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */], __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */]); - - Object(__WEBPACK_IMPORTED_MODULE_2__common__["E" /* last */])(segments).controlOut(cp0); - segments.push(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Segment( - p2, - this.secondControlPoint(tangent$2, p1, p2, __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */], __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */]) - )); - } - - return segments; - }; - - CurveProcessor.prototype.removeDuplicates = function removeDuplicates (idx, points) { - while (points[idx + 1] && (points[idx].equals(points[idx + 1]) || points[idx + 1].equals(points[idx + 2]))) { - points.splice(idx + 1, 1); - } - }; - - CurveProcessor.prototype.invertAxis = function invertAxis (p0, p1, p2) { - var invertAxis = false; - - if (p0.x === p1.x) { - invertAxis = true; - } else if (p1.x === p2.x) { - if ((p1.y < p2.y && p0.y <= p1.y) || (p2.y < p1.y && p1.y <= p0.y)) { - invertAxis = true; - } - } else { - var fn = this.lineFunction(p0,p1); - var y2 = this.calculateFunction(fn, p2.x); - if (!(p0.y <= p1.y && p2.y <= y2) && - !(p1.y <= p0.y && p2.y >= y2)) { - invertAxis = true; - } - } - - return invertAxis; - }; - - CurveProcessor.prototype.isLine = function isLine (p0, p1, p2) { - var fn = this.lineFunction(p0, p1); - var y2 = this.calculateFunction(fn, p2.x); - - return (p0.x === p1.x && p1.x === p2.x) || Object(__WEBPACK_IMPORTED_MODULE_2__common__["L" /* round */])(y2, 1) === Object(__WEBPACK_IMPORTED_MODULE_2__common__["L" /* round */])(p2.y, 1); - }; - - CurveProcessor.prototype.lineFunction = function lineFunction (p1, p2) { - var a = (p2.y - p1.y) / (p2.x - p1.x); - var b = p1.y - a * p1.x; - - return [ b, a ]; - }; - - CurveProcessor.prototype.controlPoints = function controlPoints (p0, p1, p2) { - var xField = __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */]; - var yField = __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */]; - var restrict = false; - var switchOrientation = false; - var tangent; - - if (this.isLine(p0, p1, p2)) { - tangent = this.tangent(p0, p1, __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */], __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */]); - } else { - var monotonic = { - x: this.isMonotonicByField(p0, p1, p2, __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */]), - y: this.isMonotonicByField(p0, p1, p2, __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */]) - }; - - if (monotonic.x && monotonic.y) { - tangent = this.tangent(p0, p2, __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */], __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */]); - restrict = true; - } else { - if (this.invertAxis(p0, p1, p2)) { - xField = __WEBPACK_IMPORTED_MODULE_1__common_constants__["H" /* Y */]; - yField = __WEBPACK_IMPORTED_MODULE_1__common_constants__["G" /* X */]; - } - - if (monotonic[xField]) { - tangent = 0; - } else { - var sign; - if ((p2[yField] < p0[yField] && p0[yField] <= p1[yField]) || - (p0[yField] < p2[yField] && p1[yField] <= p0[yField])) { - sign = numberSign((p2[yField] - p0[yField]) * (p1[xField] - p0[xField])); - } else { - sign = -numberSign((p2[xField] - p0[xField]) * (p1[yField] - p0[yField])); - } - - tangent = EXTREMUM_ALLOWED_DEVIATION * sign; - switchOrientation = true; - } - } - } - - var secondControlPoint = this.secondControlPoint(tangent, p0, p1, xField, yField); - - if (switchOrientation) { - var oldXField = xField; - xField = yField; - yField = oldXField; - } - - var firstControlPoint = this.firstControlPoint(tangent, p1, p2, xField, yField); - - if (restrict) { - this.restrictControlPoint(p0, p1, secondControlPoint, tangent); - this.restrictControlPoint(p1, p2, firstControlPoint, tangent); - } - - return [ secondControlPoint, firstControlPoint ]; - }; - - CurveProcessor.prototype.restrictControlPoint = function restrictControlPoint (p1, p2, cp, tangent) { - if (p1.y < p2.y) { - if (p2.y < cp.y) { - cp.x = p1.x + (p2.y - p1.y) / tangent; - cp.y = p2.y; - } else if (cp.y < p1.y) { - cp.x = p2.x - (p2.y - p1.y) / tangent; - cp.y = p1.y; - } - } else { - if (cp.y < p2.y) { - cp.x = p1.x - (p1.y - p2.y) / tangent; - cp.y = p2.y; - } else if (p1.y < cp.y) { - cp.x = p2.x + (p1.y - p2.y) / tangent; - cp.y = p1.y; - } - } - }; - - CurveProcessor.prototype.tangent = function tangent (p0, p1, xField, yField) { - var x = p1[xField] - p0[xField]; - var y = p1[yField] - p0[yField]; - var tangent; - - if (x === 0) { - tangent = 0; - } else { - tangent = y / x; - } - - return tangent; - }; - - CurveProcessor.prototype.isMonotonicByField = function isMonotonicByField (p0, p1, p2, field) { - return (p2[field] > p1[field] && p1[field] > p0[field]) || - (p2[field] < p1[field] && p1[field] < p0[field]); - }; - - CurveProcessor.prototype.firstControlPoint = function firstControlPoint (tangent, p0, p3, xField, yField) { - var t1 = p0[xField]; - var t2 = p3[xField]; - var distance = (t2 - t1) * WEIGHT; - - return this.point(t1 + distance, p0[yField] + distance * tangent, xField, yField); - }; - - CurveProcessor.prototype.secondControlPoint = function secondControlPoint (tangent, p0, p3, xField, yField) { - var t1 = p0[xField]; - var t2 = p3[xField]; - var distance = (t2 - t1) * WEIGHT; - - return this.point(t2 - distance, p3[yField] - distance * tangent, xField, yField); - }; - - CurveProcessor.prototype.point = function point (xValue, yValue, xField, yField) { - var controlPoint = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(); - controlPoint[xField] = xValue; - controlPoint[yField] = yValue; - - return controlPoint; - }; - - CurveProcessor.prototype.calculateFunction = function calculateFunction (fn, x) { - var length = fn.length; - var result = 0; - - for (var i = 0; i < length; i++) { - result += Math.pow(x,i) * fn[i]; - } - return result; - }; - - return CurveProcessor; -}(__WEBPACK_IMPORTED_MODULE_2__common__["a" /* Class */])); - -function numberSign(value) { - return value <= 0 ? -1 : 1; -} - -/* harmony default export */ __webpack_exports__["a"] = (CurveProcessor); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/date-category-axis.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__category_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/category-axis.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__axis_label__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/axis-label.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__date_utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/constants.js"); - - - - - - - - - - - -var AUTO = "auto"; -var BASE_UNITS = [ - __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["c" /* MILLISECONDS */], __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["f" /* SECONDS */], __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["d" /* MINUTES */], __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["b" /* HOURS */], __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["a" /* DAYS */], __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["o" /* WEEKS */], __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["e" /* MONTHS */], __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["p" /* YEARS */] -]; -var FIT = "fit"; - - -function categoryRange(categories) { - var range = categories._range; - if (!range) { - range = categories._range = Object(__WEBPACK_IMPORTED_MODULE_3__common__["N" /* sparseArrayLimits */])(categories); - range.min = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["n" /* toDate */])(range.min); - range.max = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["n" /* toDate */])(range.max); - } - - return range; -} - -var EmptyDateRange = function EmptyDateRange(options) { - this.options = options; -}; - -EmptyDateRange.prototype.displayIndices = function displayIndices () { - return { - min: 0, - max: 1 - }; -}; - -EmptyDateRange.prototype.displayRange = function displayRange () { - return {}; -}; - -EmptyDateRange.prototype.total = function total () { - return {}; -}; - -EmptyDateRange.prototype.valueRange = function valueRange () { - return {}; -}; - -EmptyDateRange.prototype.valueIndex = function valueIndex () { - return -1; -}; - -EmptyDateRange.prototype.values = function values () { - return []; -}; - -EmptyDateRange.prototype.totalIndex = function totalIndex () { - return -1; -}; - -EmptyDateRange.prototype.valuesCount = function valuesCount () { - return 0; -}; - -EmptyDateRange.prototype.totalCount = function totalCount () { - return 0; -}; - -EmptyDateRange.prototype.dateAt = function dateAt () { - return null; -}; - -var DateRange = function DateRange(start, end, options) { - this.options = options; - options.baseUnitStep = options.baseUnitStep || 1; - - var roundToBaseUnit = options.roundToBaseUnit; - var justified = options.justified; - - this.start = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["b" /* addDuration */])(start, 0, options.baseUnit, options.weekStartDay); - var lowerEnd = this.roundToTotalStep(end); - var expandEnd = !justified && Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["g" /* dateEquals */])(end, lowerEnd) && !options.justifyEnd; - - this.end = this.roundToTotalStep(end, !justified, expandEnd ? 1 : 0); - - var min = options.min || start; - this.valueStart = this.roundToTotalStep(min); - this.displayStart = roundToBaseUnit ? this.valueStart : min; - - var max = options.max; - if (!max) { - this.valueEnd = lowerEnd; - this.displayEnd = roundToBaseUnit || expandEnd ? this.end : end; - } else { - this.valueEnd = this.roundToTotalStep(max, false, !justified && Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["g" /* dateEquals */])(max, this.roundToTotalStep(max)) ? -1 : 0); - this.displayEnd = roundToBaseUnit ? this.roundToTotalStep(max, !justified) : options.max; - } - - if (this.valueEnd < this.valueStart) { - this.valueEnd = this.valueStart; - } - if (this.displayEnd <= this.displayStart) { - this.displayEnd = this.roundToTotalStep(this.displayStart, false, 1); - } -}; - -DateRange.prototype.displayRange = function displayRange () { - return { - min: this.displayStart, - max: this.displayEnd - }; -}; - -DateRange.prototype.displayIndices = function displayIndices () { - if (!this._indices) { - var options = this.options; - - var baseUnit = options.baseUnit; - var baseUnitStep = options.baseUnitStep; - - var minIdx = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["h" /* dateIndex */])(this.displayStart, this.valueStart, baseUnit, baseUnitStep); - var maxIdx = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["h" /* dateIndex */])(this.displayEnd, this.valueStart, baseUnit, baseUnitStep); - - this._indices = { min: minIdx, max: maxIdx }; - } - - return this._indices; -}; - -DateRange.prototype.total = function total () { - return { - min: this.start, - max: this.end - }; -}; - -DateRange.prototype.totalCount = function totalCount () { - var last = this.totalIndex(this.end); - - return last + (this.options.justified ? 1 : 0); -}; - -DateRange.prototype.valueRange = function valueRange () { - return { - min: this.valueStart, - max: this.valueEnd - }; -}; - -DateRange.prototype.valueIndex = function valueIndex (value) { - var options = this.options; - return Math.floor(Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["h" /* dateIndex */])(value, this.valueStart, options.baseUnit, options.baseUnitStep)); -}; - -DateRange.prototype.totalIndex = function totalIndex (value) { - var options = this.options; - return Math.floor(Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["h" /* dateIndex */])(value, this.start, options.baseUnit, options.baseUnitStep)); -}; - -DateRange.prototype.dateIndex = function dateIndex$1 (value) { - var options = this.options; - return Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["h" /* dateIndex */])(value, this.valueStart, options.baseUnit, options.baseUnitStep); -}; - -DateRange.prototype.valuesCount = function valuesCount () { - var maxIdx = this.valueIndex(this.valueEnd); - - return maxIdx + 1; -}; - -DateRange.prototype.values = function values () { - var values = this._values; - if (!values) { - var options = this.options; - var range = this.valueRange(); - this._values = values = []; - - for (var date = range.min; date <= range.max;) { - values.push(date); - date = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["b" /* addDuration */])(date, options.baseUnitStep, options.baseUnit, options.weekStartDay); - } - } - - return values; -}; - -DateRange.prototype.dateAt = function dateAt (index, total) { - var options = this.options; - - return Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["b" /* addDuration */])(total ? this.start : this.valueStart, options.baseUnitStep * index, options.baseUnit, options.weekStartDay); -}; - -DateRange.prototype.roundToTotalStep = function roundToTotalStep (value, upper, next) { - var ref = this.options; - var baseUnit = ref.baseUnit; - var baseUnitStep = ref.baseUnitStep; - var weekStartDay = ref.weekStartDay; - var start = this.start; - - var step = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["h" /* dateIndex */])(value, start, baseUnit, baseUnitStep); - var roundedStep = upper ? Math.ceil(step) : Math.floor(step); - - if (next) { - roundedStep += next; - } - - return Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["b" /* addDuration */])(start, roundedStep * baseUnitStep, baseUnit, weekStartDay); -}; - -function autoBaseUnit(options, startUnit, startStep) { - var categoryLimits = categoryRange(options.categories); - var span = (options.max || categoryLimits.max) - (options.min || categoryLimits.min); - var autoBaseUnitSteps = options.autoBaseUnitSteps; - var maxDateGroups = options.maxDateGroups; - var autoUnit = options.baseUnit === FIT; - var autoUnitIx = startUnit ? BASE_UNITS.indexOf(startUnit) : 0; - var baseUnit = autoUnit ? BASE_UNITS[autoUnitIx++] : options.baseUnit; - var units = span / __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["l" /* TIME_PER_UNIT */][baseUnit]; - var totalUnits = units; - var unitSteps, step, nextStep; - - while (!step || units >= maxDateGroups) { - unitSteps = unitSteps || autoBaseUnitSteps[baseUnit].slice(0); - - do { - nextStep = unitSteps.shift(); - } while (nextStep && startUnit === baseUnit && nextStep < startStep); - - if (nextStep) { - step = nextStep; - units = totalUnits / step; - } else if (baseUnit === Object(__WEBPACK_IMPORTED_MODULE_3__common__["E" /* last */])(BASE_UNITS)) { - step = Math.ceil(totalUnits / maxDateGroups); - break; - } else if (autoUnit) { - baseUnit = BASE_UNITS[autoUnitIx++] || Object(__WEBPACK_IMPORTED_MODULE_3__common__["E" /* last */])(BASE_UNITS); - totalUnits = span / __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["l" /* TIME_PER_UNIT */][baseUnit]; - unitSteps = null; - } else { - if (units > maxDateGroups) { - step = Math.ceil(totalUnits / maxDateGroups); - } - break; - } - } - - options.baseUnitStep = step; - options.baseUnit = baseUnit; -} - -function defaultBaseUnit(options) { - var categories = options.categories; - var count = Object(__WEBPACK_IMPORTED_MODULE_3__common__["l" /* defined */])(categories) ? categories.length : 0; - var minDiff = __WEBPACK_IMPORTED_MODULE_2__common_constants__["s" /* MAX_VALUE */]; - var lastCategory, unit; - - for (var categoryIx = 0; categoryIx < count; categoryIx++) { - var category = categories[categoryIx]; - - if (category && lastCategory) { - var diff = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["a" /* absoluteDateDiff */])(category, lastCategory); - if (diff > 0) { - minDiff = Math.min(minDiff, diff); - - if (minDiff >= __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["n" /* TIME_PER_YEAR */]) { - unit = __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["p" /* YEARS */]; - } else if (minDiff >= __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["j" /* TIME_PER_MONTH */] - __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["g" /* TIME_PER_DAY */] * 3) { - unit = __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["e" /* MONTHS */]; - } else if (minDiff >= __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["m" /* TIME_PER_WEEK */]) { - unit = __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["o" /* WEEKS */]; - } else if (minDiff >= __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["g" /* TIME_PER_DAY */]) { - unit = __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["a" /* DAYS */]; - } else if (minDiff >= __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["h" /* TIME_PER_HOUR */]) { - unit = __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["b" /* HOURS */]; - } else if (minDiff >= __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["i" /* TIME_PER_MINUTE */]) { - unit = __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["d" /* MINUTES */]; - } else { - unit = __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["f" /* SECONDS */]; - } - } - } - - lastCategory = category; - } - - options.baseUnit = unit || __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["a" /* DAYS */]; -} - -function initUnit(options) { - var baseUnit = (options.baseUnit || "").toLowerCase(); - var useDefault = baseUnit !== FIT && !Object(__WEBPACK_IMPORTED_MODULE_3__common__["x" /* inArray */])(baseUnit, BASE_UNITS); - - if (useDefault) { - defaultBaseUnit(options); - } - - if (baseUnit === FIT || options.baseUnitStep === AUTO) { - autoBaseUnit(options); - } - - return options; -} - -var DateCategoryAxis = (function (CategoryAxis) { - function DateCategoryAxis () { - CategoryAxis.apply(this, arguments); - } - - if ( CategoryAxis ) DateCategoryAxis.__proto__ = CategoryAxis; - DateCategoryAxis.prototype = Object.create( CategoryAxis && CategoryAxis.prototype ); - DateCategoryAxis.prototype.constructor = DateCategoryAxis; - - DateCategoryAxis.prototype.categoriesHash = function categoriesHash () { - var start = this.dataRange.total().min; - return this.options.baseUnit + this.options.baseUnitStep + start; - }; - - DateCategoryAxis.prototype.initUserOptions = function initUserOptions (options) { - return options; - }; - - DateCategoryAxis.prototype.initFields = function initFields () { - CategoryAxis.prototype.initFields.call(this); - - var chartService = this.chartService; - var intlService = chartService.intl; - var options = this.options; - - var categories = options.categories || []; - if (!categories._parsed) { - categories = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["m" /* parseDates */])(intlService, categories); - categories._parsed = true; - } - - options = Object(__WEBPACK_IMPORTED_MODULE_3__common__["k" /* deepExtend */])({ - roundToBaseUnit: true - }, options, { - categories: categories, - min: Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["l" /* parseDate */])(intlService, options.min), - max: Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["l" /* parseDate */])(intlService, options.max) - }); - - if (chartService.panning && chartService.isPannable(options.vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */])) { - options.roundToBaseUnit = false; - } - - options.userSetBaseUnit = options.userSetBaseUnit || options.baseUnit; - options.userSetBaseUnitStep = options.userSetBaseUnitStep || options.baseUnitStep; - - this.options = options; - options.srcCategories = categories; - - if (categories.length > 0) { - var range = categoryRange(categories); - var maxDivisions = options.maxDivisions; - - this.dataRange = new DateRange(range.min, range.max, initUnit(options)); - - if (maxDivisions) { - var dataRange = this.dataRange.displayRange(); - - var divisionOptions = Object.assign({}, options, { - justified: true, - roundToBaseUnit: false, - baseUnit: 'fit', - min: dataRange.min, - max: dataRange.max, - maxDateGroups: maxDivisions - }); - - var dataRangeOptions = this.dataRange.options; - - autoBaseUnit(divisionOptions, dataRangeOptions.baseUnit, dataRangeOptions.baseUnitStep); - - this.divisionRange = new DateRange(range.min, range.max, divisionOptions); - } else { - this.divisionRange = this.dataRange; - } - - } else { - options.baseUnit = options.baseUnit || __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["a" /* DAYS */]; - this.dataRange = this.divisionRange = new EmptyDateRange(options); - } - }; - - DateCategoryAxis.prototype.tickIndices = function tickIndices (stepSize) { - if (!this.options.maxDivisions) { - return CategoryAxis.prototype.tickIndices.call(this, stepSize); - } - - var ref = this; - var dataRange = ref.dataRange; - var divisionRange = ref.divisionRange; - var indices = []; - var values = this.divisionRange.values(); - var offset = 0; - - if (!this.options.justified) { - values = values.concat(divisionRange.dateAt(this.divisionRange.valuesCount())); - offset = 0.5;//align ticks to the center of not justified categories - } - - for (var idx = 0; idx < values.length; idx++) { - indices.push(dataRange.dateIndex(values[idx]) + offset); - if (stepSize !== 1 && idx >= 1) { - var last = indices.length - 1; - indices.splice(idx, 0, indices[last - 1] + (indices[last] - indices[last - 1]) * stepSize); - } - } - - return indices; - }; - - DateCategoryAxis.prototype.shouldRenderNote = function shouldRenderNote (value) { - var range = this.range(); - var categories = this.options.categories || []; - - return Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["e" /* dateComparer */])(value, range.min) >= 0 && Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["e" /* dateComparer */])(value, range.max) <= 0 && categories.length; - }; - - DateCategoryAxis.prototype.parseNoteValue = function parseNoteValue (value) { - return Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["l" /* parseDate */])(this.chartService.intl, value); - }; - - DateCategoryAxis.prototype.noteSlot = function noteSlot (value) { - return this.getSlot(value); - }; - - DateCategoryAxis.prototype.translateRange = function translateRange (delta) { - var options = this.options; - var baseUnit = options.baseUnit; - var weekStartDay = options.weekStartDay; - var vertical = options.vertical; - var lineBox = this.lineBox(); - var size = vertical ? lineBox.height() : lineBox.width(); - var range = this.range(); - var scale = size / (range.max - range.min); - var offset = Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])(delta / scale, __WEBPACK_IMPORTED_MODULE_2__common_constants__["l" /* DEFAULT_PRECISION */]); - - if (range.min && range.max) { - var from = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(options.min || range.min, offset); - var to = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(options.max || range.max, offset); - - range = { - min: Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["b" /* addDuration */])(from, 0, baseUnit, weekStartDay), - max: Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["b" /* addDuration */])(to, 0, baseUnit, weekStartDay) - }; - } - - return range; - }; - - DateCategoryAxis.prototype.scaleRange = function scaleRange (delta) { - var rounds = Math.abs(delta); - var result = this.range(); - var from = result.min; - var to = result.max; - - if (from && to) { - while (rounds--) { - var range = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["f" /* dateDiff */])(from, to); - var step = Math.round(range * 0.1); - if (delta < 0) { - from = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(from, step); - to = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(to, -step); - } else { - from = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(from, -step); - to = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(to, step); - } - } - - result = { min: from, max: to }; - } - - return result; - }; - - DateCategoryAxis.prototype.labelsRange = function labelsRange () { - return { - min: this.options.labels.skip, - max: this.divisionRange.valuesCount() - }; - }; - - DateCategoryAxis.prototype.pan = function pan (delta) { - if (this.isEmpty()) { - return null; - } - - var options = this.options; - var lineBox = this.lineBox(); - var size = options.vertical ? lineBox.height() : lineBox.width(); - var ref = this.dataRange.displayRange(); - var min = ref.min; - var max = ref.max; - var totalLimits = this.dataRange.total(); - var scale = size / (max - min); - var offset = Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])(delta / scale, __WEBPACK_IMPORTED_MODULE_2__common_constants__["l" /* DEFAULT_PRECISION */]); - var from = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(min, offset); - var to = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(max, offset); - - var panRange = this.limitRange(Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["o" /* toTime */])(from), Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["o" /* toTime */])(to), Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["o" /* toTime */])(totalLimits.min), Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["o" /* toTime */])(totalLimits.max), offset); - - if (panRange) { - panRange.min = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["n" /* toDate */])(panRange.min); - panRange.max = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["n" /* toDate */])(panRange.max); - panRange.baseUnit = options.baseUnit; - panRange.baseUnitStep = options.baseUnitStep || 1; - panRange.userSetBaseUnit = options.userSetBaseUnit; - panRange.userSetBaseUnitStep = options.userSetBaseUnitStep; - - return panRange; - } - }; - - DateCategoryAxis.prototype.pointsRange = function pointsRange (start, end) { - if (this.isEmpty()) { - return null; - } - - var pointsRange = CategoryAxis.prototype.pointsRange.call(this, start, end); - var datesRange = this.dataRange.displayRange(); - var indicesRange = this.dataRange.displayIndices(); - var scale = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["f" /* dateDiff */])(datesRange.max, datesRange.min) / (indicesRange.max - indicesRange.min); - var options = this.options; - - var min = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(datesRange.min, pointsRange.min * scale); - var max = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(datesRange.min, pointsRange.max * scale); - - return { - min: min, - max: max, - baseUnit: options.userSetBaseUnit || options.baseUnit, - baseUnitStep: options.userSetBaseUnitStep || options.baseUnitStep - }; - }; - - DateCategoryAxis.prototype.zoomRange = function zoomRange (delta) { - if (this.isEmpty()) { - return null; - } - - var options = this.options; - var fit = options.userSetBaseUnit === FIT; - var totalLimits = this.dataRange.total(); - var ref = this.dataRange.displayRange(); - var rangeMin = ref.min; - var rangeMax = ref.max; - var ref$1 = this.dataRange.options; - var weekStartDay = ref$1.weekStartDay; - var baseUnit = ref$1.baseUnit; - var baseUnitStep = ref$1.baseUnitStep; - var min = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["b" /* addDuration */])(rangeMin, delta * baseUnitStep, baseUnit, weekStartDay); - var max = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["b" /* addDuration */])(rangeMax, -delta * baseUnitStep, baseUnit, weekStartDay); - - if (fit) { - var autoBaseUnitSteps = options.autoBaseUnitSteps; - var maxDateGroups = options.maxDateGroups; - - var maxDiff = Object(__WEBPACK_IMPORTED_MODULE_3__common__["E" /* last */])(autoBaseUnitSteps[baseUnit]) * maxDateGroups * __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["l" /* TIME_PER_UNIT */][baseUnit]; - var rangeDiff = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["f" /* dateDiff */])(rangeMax, rangeMin); - var diff = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["f" /* dateDiff */])(max, min); - var baseUnitIndex = BASE_UNITS.indexOf(baseUnit); - var autoBaseUnitStep, ticks; - - if (diff < __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["l" /* TIME_PER_UNIT */][baseUnit] && baseUnit !== __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["c" /* MILLISECONDS */]) { - baseUnit = BASE_UNITS[baseUnitIndex - 1]; - autoBaseUnitStep = Object(__WEBPACK_IMPORTED_MODULE_3__common__["E" /* last */])(autoBaseUnitSteps[baseUnit]); - ticks = (rangeDiff - (maxDateGroups - 1) * autoBaseUnitStep * __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["l" /* TIME_PER_UNIT */][baseUnit]) / 2; - min = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(rangeMin, ticks); - max = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(rangeMax, -ticks); - - } else if (diff > maxDiff && baseUnit !== __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["p" /* YEARS */]) { - var stepIndex = 0; - - do { - baseUnitIndex++; - baseUnit = BASE_UNITS[baseUnitIndex]; - stepIndex = 0; - ticks = 2 * __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["l" /* TIME_PER_UNIT */][baseUnit]; - do { - autoBaseUnitStep = autoBaseUnitSteps[baseUnit][stepIndex]; - stepIndex++; - } while (stepIndex < autoBaseUnitSteps[baseUnit].length && ticks * autoBaseUnitStep < rangeDiff); - } while (baseUnit !== __WEBPACK_IMPORTED_MODULE_4__date_utils_constants__["p" /* YEARS */] && ticks * autoBaseUnitStep < rangeDiff); - - ticks = (ticks * autoBaseUnitStep - rangeDiff) / 2; - if (ticks > 0) { - min = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(rangeMin, -ticks); - max = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(rangeMax, ticks); - min = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(min, Object(__WEBPACK_IMPORTED_MODULE_3__common__["F" /* limitValue */])(max, totalLimits.min, totalLimits.max) - max); - max = Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["c" /* addTicks */])(max, Object(__WEBPACK_IMPORTED_MODULE_3__common__["F" /* limitValue */])(min, totalLimits.min, totalLimits.max) - min); - } - } - } - - if (min < totalLimits.min) { - min = totalLimits.min; - } - if (max > totalLimits.max) { - max = totalLimits.max; - } - - if (min && max && Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["f" /* dateDiff */])(max, min) > 0) { - return { - min: min, - max: max, - baseUnit: options.userSetBaseUnit || options.baseUnit, - baseUnitStep: options.userSetBaseUnitStep || options.baseUnitStep - }; - } - }; - - DateCategoryAxis.prototype.range = function range () { - return this.dataRange.displayRange(); - }; - - DateCategoryAxis.prototype.createAxisLabel = function createAxisLabel (index, labelOptions) { - var options = this.options; - var dataItem = options.dataItems && !options.maxDivisions ? options.dataItems[index] : null; - var date = this.divisionRange.dateAt(index); - var unitFormat = labelOptions.dateFormats[this.divisionRange.options.baseUnit]; - - labelOptions.format = labelOptions.format || unitFormat; - var text = this.axisLabelText(date, dataItem, labelOptions); - if (text) { - return new __WEBPACK_IMPORTED_MODULE_1__axis_label__["a" /* default */](date, text, index, dataItem, labelOptions); - } - }; - - DateCategoryAxis.prototype.categoryIndex = function categoryIndex (value) { - return this.dataRange.valueIndex(value); - }; - - DateCategoryAxis.prototype.getSlot = function getSlot (a, b, limit) { - var start = a; - var end = b; - - if (typeof start === __WEBPACK_IMPORTED_MODULE_2__common_constants__["x" /* OBJECT */]) { - start = this.categoryIndex(start); - } - - if (typeof end === __WEBPACK_IMPORTED_MODULE_2__common_constants__["x" /* OBJECT */]) { - end = this.categoryIndex(end); - } - - return CategoryAxis.prototype.getSlot.call(this, start, end, limit); - }; - - DateCategoryAxis.prototype.valueRange = function valueRange () { - var options = this.options; - var range = categoryRange(options.srcCategories); - - return { - min: Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["n" /* toDate */])(range.min), - max: Object(__WEBPACK_IMPORTED_MODULE_5__date_utils__["n" /* toDate */])(range.max) - }; - }; - - DateCategoryAxis.prototype.categoryAt = function categoryAt (index, total) { - return this.dataRange.dateAt(index, total); - }; - - DateCategoryAxis.prototype.categoriesCount = function categoriesCount () { - return this.dataRange.valuesCount(); - }; - - DateCategoryAxis.prototype.rangeIndices = function rangeIndices () { - return this.dataRange.displayIndices(); - }; - - DateCategoryAxis.prototype.labelsBetweenTicks = function labelsBetweenTicks () { - return !this.divisionRange.options.justified; - }; - - DateCategoryAxis.prototype.prepareUserOptions = function prepareUserOptions () { - if (this.isEmpty()) { - return; - } - - this.options.categories = this.dataRange.values(); - }; - - DateCategoryAxis.prototype.getCategory = function getCategory (point) { - var index = this.pointCategoryIndex(point); - - if (index === null) { - return null; - } - - return this.dataRange.dateAt(index); - }; - - DateCategoryAxis.prototype.totalIndex = function totalIndex (value) { - return this.dataRange.totalIndex(value); - }; - - DateCategoryAxis.prototype.currentRangeIndices = function currentRangeIndices () { - var range = this.dataRange.valueRange(); - return { - min: this.dataRange.totalIndex(range.min), - max: this.dataRange.totalIndex(range.max) - }; - }; - - DateCategoryAxis.prototype.totalRange = function totalRange () { - return this.dataRange.total(); - }; - - DateCategoryAxis.prototype.totalCount = function totalCount () { - return this.dataRange.totalCount(); - }; - - DateCategoryAxis.prototype.isEmpty = function isEmpty () { - return !this.options.srcCategories.length; - }; - - DateCategoryAxis.prototype.roundedRange = function roundedRange () { - if (this.options.roundToBaseUnit !== false || this.isEmpty()) { - return this.range(); - } - - var options = this.options; - var datesRange = categoryRange(options.srcCategories); - - var dateRange = new DateRange(datesRange.min, datesRange.max, Object.assign({}, options, { - justified: false, - roundToBaseUnit: true, - justifyEnd: options.justified - })); - - return dateRange.displayRange(); - }; - - return DateCategoryAxis; -}(__WEBPACK_IMPORTED_MODULE_0__category_axis__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_3__common__["M" /* setDefaultOptions */])(DateCategoryAxis, { - type: __WEBPACK_IMPORTED_MODULE_2__common_constants__["i" /* DATE */], - labels: { - dateFormats: __WEBPACK_IMPORTED_MODULE_6__constants__["b" /* DateLabelFormats */] - }, - autoBaseUnitSteps: { - milliseconds: [ 1, 10, 100 ], - seconds: [ 1, 2, 5, 15, 30 ], - minutes: [ 1, 2, 5, 15, 30 ], - hours: [ 1, 2, 3 ], - days: [ 1, 2, 3 ], - weeks: [ 1, 2 ], - months: [ 1, 2, 3, 6 ], - years: [ 1, 2, 3, 5, 10, 25, 50 ] - }, - maxDateGroups: 10 -}); - -/* harmony default export */ __webpack_exports__["a"] = (DateCategoryAxis); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/date-value-axis.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/axis.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__numeric_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/numeric-axis.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__axis_label__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/axis-label.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_auto_major_unit__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/auto-major-unit.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_ceil__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/ceil.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__date_utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__date_utils_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/constants.js"); - - - - - - - - - - - - - - -var DateValueAxis = (function (Axis) { - function DateValueAxis(seriesMin, seriesMax, axisOptions, chartService) { - var min = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["n" /* toDate */])(seriesMin); - var max = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["n" /* toDate */])(seriesMax); - - var intlService = chartService.intl; - var options = axisOptions || {}; - options = Object(__WEBPACK_IMPORTED_MODULE_5__common__["k" /* deepExtend */])(options || {}, { - min: Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["l" /* parseDate */])(intlService, options.min), - max: Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["l" /* parseDate */])(intlService, options.max), - axisCrossingValue: Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["m" /* parseDates */])(intlService, options.axisCrossingValues || options.axisCrossingValue) - }); - options = applyDefaults(min, max, options); - - Axis.call(this, options, chartService); - - this.seriesMin = min; - this.seriesMax = max; - this.totalMin = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["o" /* toTime */])(Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["j" /* floorDate */])(Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["o" /* toTime */])(min) - 1, options.baseUnit)); - this.totalMax = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["o" /* toTime */])(Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["d" /* ceilDate */])(Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["o" /* toTime */])(max) + 1, options.baseUnit)); - } - - if ( Axis ) DateValueAxis.__proto__ = Axis; - DateValueAxis.prototype = Object.create( Axis && Axis.prototype ); - DateValueAxis.prototype.constructor = DateValueAxis; - - DateValueAxis.prototype.range = function range () { - var options = this.options; - return { min: options.min, max: options.max }; - }; - - DateValueAxis.prototype.getDivisions = function getDivisions (stepValue) { - var options = this.options; - - return Math.floor( - Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["i" /* duration */])(options.min, options.max, options.baseUnit) / stepValue + 1 - ); - }; - - DateValueAxis.prototype.getTickPositions = function getTickPositions (step) { - var options = this.options; - var vertical = options.vertical; - var lineBox = this.lineBox(); - var dir = (vertical ? -1 : 1) * (options.reverse ? -1 : 1); - var startEdge = dir === 1 ? 1 : 2; - var start = lineBox[(vertical ? __WEBPACK_IMPORTED_MODULE_4__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_4__common_constants__["G" /* X */]) + startEdge]; - var divisions = this.getDivisions(step); - var timeRange = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["f" /* dateDiff */])(options.max, options.min); - var lineSize = vertical ? lineBox.height() : lineBox.width(); - var scale = lineSize / timeRange; - - var positions = [ start ]; - for (var i = 1; i < divisions; i++) { - var date = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["b" /* addDuration */])(options.min, i * step, options.baseUnit); - var pos = start + Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["f" /* dateDiff */])(date, options.min) * scale * dir; - - positions.push(Object(__WEBPACK_IMPORTED_MODULE_5__common__["L" /* round */])(pos, __WEBPACK_IMPORTED_MODULE_4__common_constants__["g" /* COORD_PRECISION */])); - } - - return positions; - }; - - DateValueAxis.prototype.getMajorTickPositions = function getMajorTickPositions () { - return this.getTickPositions(this.options.majorUnit); - }; - - DateValueAxis.prototype.getMinorTickPositions = function getMinorTickPositions () { - return this.getTickPositions(this.options.minorUnit); - }; - - DateValueAxis.prototype.getSlot = function getSlot (a, b, limit) { - return __WEBPACK_IMPORTED_MODULE_1__numeric_axis__["a" /* default */].prototype.getSlot.call( - this, Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["n" /* toDate */])(a), Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["n" /* toDate */])(b), limit - ); - }; - - DateValueAxis.prototype.getValue = function getValue (point) { - var value = __WEBPACK_IMPORTED_MODULE_1__numeric_axis__["a" /* default */].prototype.getValue.call(this, point); - - return value !== null ? Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["n" /* toDate */])(value) : null; - }; - - DateValueAxis.prototype.labelsCount = function labelsCount () { - return this.getDivisions(this.options.majorUnit); - }; - - DateValueAxis.prototype.createAxisLabel = function createAxisLabel (index, labelOptions) { - var options = this.options; - var offset = index * options.majorUnit; - var date = options.min; - - if (offset > 0) { - date = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["b" /* addDuration */])(date, offset, options.baseUnit); - } - - var unitFormat = labelOptions.dateFormats[options.baseUnit]; - labelOptions.format = labelOptions.format || unitFormat; - - var text = this.axisLabelText(date, null, labelOptions); - return new __WEBPACK_IMPORTED_MODULE_2__axis_label__["a" /* default */](date, text, index, null, labelOptions); - }; - - DateValueAxis.prototype.translateRange = function translateRange (delta, exact) { - var options = this.options; - var baseUnit = options.baseUnit; - var weekStartDay = options.weekStartDay; - var lineBox = this.lineBox(); - var size = options.vertical ? lineBox.height() : lineBox.width(); - var range = this.range(); - var scale = size / Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["f" /* dateDiff */])(range.max, range.min); - var offset = Object(__WEBPACK_IMPORTED_MODULE_5__common__["L" /* round */])(delta / scale, __WEBPACK_IMPORTED_MODULE_4__common_constants__["l" /* DEFAULT_PRECISION */]); - var from = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["c" /* addTicks */])(options.min, offset); - var to = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["c" /* addTicks */])(options.max, offset); - - if (!exact) { - from = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["b" /* addDuration */])(from, 0, baseUnit, weekStartDay); - to = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["b" /* addDuration */])(to, 0, baseUnit, weekStartDay); - } - - return { - min: from, - max: to, - offset: offset - }; - }; - - DateValueAxis.prototype.scaleRange = function scaleRange (delta) { - var ref = this.options; - var from = ref.min; - var to = ref.max; - var rounds = Math.abs(delta); - - while (rounds--) { - var range = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["f" /* dateDiff */])(from, to); - var step = Math.round(range * 0.1); - if (delta < 0) { - from = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["c" /* addTicks */])(from, step); - to = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["c" /* addTicks */])(to, -step); - } else { - from = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["c" /* addTicks */])(from, -step); - to = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["c" /* addTicks */])(to, step); - } - } - - return { min: from, max: to }; - }; - - DateValueAxis.prototype.shouldRenderNote = function shouldRenderNote (value) { - var range = this.range(); - - return Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["e" /* dateComparer */])(value, range.min) >= 0 && Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["e" /* dateComparer */])(value, range.max) <= 0; - }; - - DateValueAxis.prototype.pan = function pan (delta) { - var range = this.translateRange(delta, true); - var limittedRange = this.limitRange(Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["o" /* toTime */])(range.min), Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["o" /* toTime */])(range.max), this.totalMin, this.totalMax, range.offset); - - if (limittedRange) { - return { - min: Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["n" /* toDate */])(limittedRange.min), - max: Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["n" /* toDate */])(limittedRange.max) - }; - } - }; - - DateValueAxis.prototype.pointsRange = function pointsRange (start, end) { - var startValue = this.getValue(start); - var endValue = this.getValue(end); - var min = Math.min(startValue, endValue); - var max = Math.max(startValue, endValue); - - return { - min: Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["n" /* toDate */])(min), - max: Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["n" /* toDate */])(max) - }; - }; - - DateValueAxis.prototype.zoomRange = function zoomRange (delta) { - var range = this.scaleRange(delta); - var min = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["n" /* toDate */])(Object(__WEBPACK_IMPORTED_MODULE_5__common__["F" /* limitValue */])(Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["o" /* toTime */])(range.min), this.totalMin, this.totalMax)); - var max = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["n" /* toDate */])(Object(__WEBPACK_IMPORTED_MODULE_5__common__["F" /* limitValue */])(Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["o" /* toTime */])(range.max), this.totalMin, this.totalMax)); - - return { - min: min, - max: max - }; - }; - - return DateValueAxis; -}(__WEBPACK_IMPORTED_MODULE_0__axis__["a" /* default */])); - -function timeUnits(delta) { - var unit = __WEBPACK_IMPORTED_MODULE_9__date_utils_constants__["b" /* HOURS */]; - - if (delta >= __WEBPACK_IMPORTED_MODULE_9__date_utils_constants__["n" /* TIME_PER_YEAR */]) { - unit = __WEBPACK_IMPORTED_MODULE_9__date_utils_constants__["p" /* YEARS */]; - } else if (delta >= __WEBPACK_IMPORTED_MODULE_9__date_utils_constants__["j" /* TIME_PER_MONTH */]) { - unit = __WEBPACK_IMPORTED_MODULE_9__date_utils_constants__["e" /* MONTHS */]; - } else if (delta >= __WEBPACK_IMPORTED_MODULE_9__date_utils_constants__["m" /* TIME_PER_WEEK */]) { - unit = __WEBPACK_IMPORTED_MODULE_9__date_utils_constants__["o" /* WEEKS */]; - } else if (delta >= __WEBPACK_IMPORTED_MODULE_9__date_utils_constants__["g" /* TIME_PER_DAY */]) { - unit = __WEBPACK_IMPORTED_MODULE_9__date_utils_constants__["a" /* DAYS */]; - } - - return unit; -} - -function applyDefaults(seriesMin, seriesMax, options) { - var min = options.min || seriesMin; - var max = options.max || seriesMax; - var baseUnit = options.baseUnit || (max && min ? timeUnits(Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["a" /* absoluteDateDiff */])(max, min)) : __WEBPACK_IMPORTED_MODULE_9__date_utils_constants__["b" /* HOURS */]); - var baseUnitTime = __WEBPACK_IMPORTED_MODULE_9__date_utils_constants__["l" /* TIME_PER_UNIT */][baseUnit]; - var autoMin = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["j" /* floorDate */])(Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["o" /* toTime */])(min) - 1, baseUnit) || Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["n" /* toDate */])(max); - var autoMax = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["d" /* ceilDate */])(Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["o" /* toTime */])(max) + 1, baseUnit); - var userMajorUnit = options.majorUnit ? options.majorUnit : undefined; - var majorUnit = userMajorUnit || Object(__WEBPACK_IMPORTED_MODULE_7__utils_ceil__["a" /* default */])( - Object(__WEBPACK_IMPORTED_MODULE_6__utils_auto_major_unit__["a" /* default */])(autoMin.getTime(), autoMax.getTime()), - baseUnitTime - ) / baseUnitTime; - var actualUnits = Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["i" /* duration */])(autoMin, autoMax, baseUnit); - var totalUnits = Object(__WEBPACK_IMPORTED_MODULE_7__utils_ceil__["a" /* default */])(actualUnits, majorUnit); - var unitsToAdd = totalUnits - actualUnits; - var head = Math.floor(unitsToAdd / 2); - var tail = unitsToAdd - head; - - if (!options.baseUnit) { - delete options.baseUnit; - } - - options.baseUnit = options.baseUnit || baseUnit; - options.min = options.min || Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["b" /* addDuration */])(autoMin, -head, baseUnit); - options.max = options.max || Object(__WEBPACK_IMPORTED_MODULE_8__date_utils__["b" /* addDuration */])(autoMax, tail, baseUnit); - options.minorUnit = options.minorUnit || majorUnit / 5; - options.majorUnit = majorUnit; - - return options; -} - -Object(__WEBPACK_IMPORTED_MODULE_5__common__["M" /* setDefaultOptions */])(DateValueAxis, { - type: __WEBPACK_IMPORTED_MODULE_4__common_constants__["i" /* DATE */], - majorGridLines: { - visible: true, - width: 1, - color: __WEBPACK_IMPORTED_MODULE_4__common_constants__["c" /* BLACK */] - }, - labels: { - dateFormats: __WEBPACK_IMPORTED_MODULE_3__constants__["b" /* DateLabelFormats */] - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (DateValueAxis); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/float-element.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__chart_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/chart-element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var FloatElement = (function (ChartElement) { - function FloatElement(options) { - ChartElement.call(this, options); - this._initDirection(); - } - - if ( ChartElement ) FloatElement.__proto__ = ChartElement; - FloatElement.prototype = Object.create( ChartElement && ChartElement.prototype ); - FloatElement.prototype.constructor = FloatElement; - - FloatElement.prototype._initDirection = function _initDirection () { - var options = this.options; - if (options.vertical) { - this.groupAxis = __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - this.elementAxis = __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */]; - this.groupSizeField = __WEBPACK_IMPORTED_MODULE_2__common_constants__["F" /* WIDTH */]; - this.elementSizeField = __WEBPACK_IMPORTED_MODULE_2__common_constants__["o" /* HEIGHT */]; - this.groupSpacing = options.spacing; - this.elementSpacing = options.vSpacing; - } else { - this.groupAxis = __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */]; - this.elementAxis = __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - this.groupSizeField = __WEBPACK_IMPORTED_MODULE_2__common_constants__["o" /* HEIGHT */]; - this.elementSizeField = __WEBPACK_IMPORTED_MODULE_2__common_constants__["F" /* WIDTH */]; - this.groupSpacing = options.vSpacing; - this.elementSpacing = options.spacing; - } - }; - - FloatElement.prototype.reflow = function reflow (targetBox) { - this.box = targetBox.clone(); - this.reflowChildren(); - }; - - FloatElement.prototype.reflowChildren = function reflowChildren () { - var this$1 = this; - - var ref = this; - var box = ref.box; - var elementAxis = ref.elementAxis; - var groupAxis = ref.groupAxis; - var elementSizeField = ref.elementSizeField; - var groupSizeField = ref.groupSizeField; - var ref$1 = this.groupOptions(); - var groups = ref$1.groups; - var groupsSize = ref$1.groupsSize; - var maxGroupElementsSize = ref$1.maxGroupElementsSize; - var groupsCount = groups.length; - var groupsStart = box[groupAxis + 1] + this.alignStart(groupsSize, box[groupSizeField]()); - - if (groupsCount) { - var groupStart = groupsStart; - - for (var groupIdx = 0; groupIdx < groupsCount; groupIdx++) { - var group = groups[groupIdx]; - var groupElements = group.groupElements; - var elementStart = box[elementAxis + 1]; - var groupElementsCount = groupElements.length; - - for (var idx = 0; idx < groupElementsCount; idx++) { - var element = groupElements[idx]; - var elementSize = this$1.elementSize(element); - var groupElementStart = groupStart + this$1.alignStart(elementSize[groupSizeField], group.groupSize); - - var elementBox = new __WEBPACK_IMPORTED_MODULE_1__box__["a" /* default */](); - elementBox[groupAxis + 1] = groupElementStart; - elementBox[groupAxis + 2] = groupElementStart + elementSize[groupSizeField]; - elementBox[elementAxis + 1] = elementStart; - elementBox[elementAxis + 2] = elementStart + elementSize[elementSizeField]; - - element.reflow(elementBox); - - elementStart += elementSize[elementSizeField] + this$1.elementSpacing; - } - groupStart += group.groupSize + this$1.groupSpacing; - } - box[groupAxis + 1] = groupsStart; - box[groupAxis + 2] = groupsStart + groupsSize; - box[elementAxis + 2] = box[elementAxis + 1] + maxGroupElementsSize; - } - }; - - FloatElement.prototype.alignStart = function alignStart (size, maxSize) { - var start = 0; - var align = this.options.align; - if (align === __WEBPACK_IMPORTED_MODULE_2__common_constants__["z" /* RIGHT */] || align === __WEBPACK_IMPORTED_MODULE_2__common_constants__["d" /* BOTTOM */]) { - start = maxSize - size; - } else if (align === __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */]) { - start = (maxSize - size) / 2; - } - return start; - }; - - FloatElement.prototype.groupOptions = function groupOptions () { - var this$1 = this; - - var ref = this; - var box = ref.box; - var children = ref.children; - var elementSizeField = ref.elementSizeField; - var groupSizeField = ref.groupSizeField; - var elementSpacing = ref.elementSpacing; - var groupSpacing = ref.groupSpacing; - var maxSize = Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])(box[elementSizeField]()); - var childrenCount = children.length; - var groups = []; - - var groupSize = 0; - var groupElementsSize = 0; - var groupsSize = 0; - var maxGroupElementsSize = 0; - var groupElements = []; - - for (var idx = 0; idx < childrenCount; idx++) { - var element = children[idx]; - if (!element.box) { - element.reflow(box); - } - - var elementSize = this$1.elementSize(element); - if (this$1.options.wrap && Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])(groupElementsSize + elementSpacing + elementSize[elementSizeField]) > maxSize) { - groups.push({ - groupElements: groupElements, - groupSize: groupSize, - groupElementsSize: groupElementsSize - }); - maxGroupElementsSize = Math.max(maxGroupElementsSize, groupElementsSize); - groupsSize += groupSpacing + groupSize; - groupSize = 0; - groupElementsSize = 0; - groupElements = []; - } - groupSize = Math.max(groupSize, elementSize[groupSizeField]); - if (groupElementsSize > 0) { - groupElementsSize += elementSpacing; - } - groupElementsSize += elementSize[elementSizeField]; - groupElements.push(element); - } - - groups.push({ - groupElements: groupElements, - groupSize: groupSize, - groupElementsSize: groupElementsSize - }); - maxGroupElementsSize = Math.max(maxGroupElementsSize, groupElementsSize); - groupsSize += groupSize; - - return { - groups: groups, - groupsSize: groupsSize, - maxGroupElementsSize: maxGroupElementsSize - }; - }; - - FloatElement.prototype.elementSize = function elementSize (element) { - return { - width: element.box.width(), - height: element.box.height() - }; - }; - - FloatElement.prototype.createVisual = function createVisual () {}; - - return FloatElement; -}(__WEBPACK_IMPORTED_MODULE_0__chart_element__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_3__common__["M" /* setDefaultOptions */])(FloatElement, { - vertical: true, - wrap: true, - vSpacing: 0, - spacing: 0 -}); - -/* harmony default export */ __webpack_exports__["a"] = (FloatElement); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/gradients.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); - - -var LINEAR = "linear"; -var RADIAL = "radial"; - -var GRADIENTS = { - glass: { - type: LINEAR, - rotation: 0, - stops: [ { - offset: 0, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0 - }, { - offset: 0.25, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0.3 - }, { - offset: 1, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0 - } ] - }, - sharpBevel: { - type: RADIAL, - stops: [ { - offset: 0, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0.55 - }, { - offset: 0.65, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0 - }, { - offset: 0.95, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0.25 - } ] - }, - roundedBevel: { - type: RADIAL, - stops: [ { - offset: 0.33, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0.06 - }, { - offset: 0.83, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0.2 - }, { - offset: 0.95, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0 - } ] - }, - roundedGlass: { - type: RADIAL, - supportVML: false, - stops: [ { - offset: 0, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0 - }, { - offset: 0.5, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0.3 - }, { - offset: 0.99, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0 - } ] - }, - sharpGlass: { - type: RADIAL, - supportVML: false, - stops: [ { - offset: 0, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0.2 - }, { - offset: 0.15, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0.15 - }, { - offset: 0.17, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0.35 - }, { - offset: 0.85, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0.05 - }, { - offset: 0.87, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0.15 - }, { - offset: 0.99, - color: __WEBPACK_IMPORTED_MODULE_0__common_constants__["E" /* WHITE */], - opacity: 0 - } ] - }, - bubbleShadow: { - type: RADIAL, - center: [ 0.5, 0.5 ], - radius: 0.5 - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (GRADIENTS); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/logarithmic-axis.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/axis.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__axis_label__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/axis-label.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_create_axis_tick__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/create-axis-tick.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_create_axis_grid_line__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/create-axis-grid-line.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_limit_coordinate__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/limit-coordinate.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - -var DEFAULT_MAJOR_UNIT = 10; - -var LogarithmicAxis = (function (Axis) { - function LogarithmicAxis(seriesMin, seriesMax, options, chartService) { - - var axisOptions = Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])({ majorUnit: DEFAULT_MAJOR_UNIT, min: seriesMin, max: seriesMax }, options); - var base = axisOptions.majorUnit; - var autoMax = autoAxisMax(seriesMax, base); - var autoMin = autoAxisMin(seriesMin, seriesMax, axisOptions); - var range = initRange(autoMin, autoMax, axisOptions, options); - - axisOptions.max = range.max; - axisOptions.min = range.min; - axisOptions.minorUnit = options.minorUnit || Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(base - 1, __WEBPACK_IMPORTED_MODULE_6__common_constants__["l" /* DEFAULT_PRECISION */]); - - Axis.call(this, axisOptions, chartService); - - this.totalMin = Object(__WEBPACK_IMPORTED_MODULE_7__common__["l" /* defined */])(options.min) ? Math.min(autoMin, options.min) : autoMin; - this.totalMax = Object(__WEBPACK_IMPORTED_MODULE_7__common__["l" /* defined */])(options.max) ? Math.max(autoMax, options.max) : autoMax; - this.logMin = Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(log(range.min, base), __WEBPACK_IMPORTED_MODULE_6__common_constants__["l" /* DEFAULT_PRECISION */]); - this.logMax = Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(log(range.max, base), __WEBPACK_IMPORTED_MODULE_6__common_constants__["l" /* DEFAULT_PRECISION */]); - this.seriesMin = seriesMin; - this.seriesMax = seriesMax; - - this.createLabels(); - } - - if ( Axis ) LogarithmicAxis.__proto__ = Axis; - LogarithmicAxis.prototype = Object.create( Axis && Axis.prototype ); - LogarithmicAxis.prototype.constructor = LogarithmicAxis; - - LogarithmicAxis.prototype.startValue = function startValue () { - return this.options.min; - }; - - LogarithmicAxis.prototype.getSlot = function getSlot (a, b, limit) { - var ref = this; - var options = ref.options; - var logMin = ref.logMin; - var logMax = ref.logMax; - var reverse = options.reverse; - var vertical = options.vertical; - var base = options.majorUnit; - var valueAxis = vertical ? __WEBPACK_IMPORTED_MODULE_6__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_6__common_constants__["G" /* X */]; - var lineBox = this.lineBox(); - var lineStart = lineBox[valueAxis + (reverse ? 2 : 1)]; - var lineSize = vertical ? lineBox.height() : lineBox.width(); - var dir = reverse ? -1 : 1; - var step = dir * (lineSize / (logMax - logMin)); - var slotBox = new __WEBPACK_IMPORTED_MODULE_2__box__["a" /* default */](lineBox.x1, lineBox.y1, lineBox.x1, lineBox.y1); - var start = a; - var end = b; - - if (!Object(__WEBPACK_IMPORTED_MODULE_7__common__["l" /* defined */])(start)) { - start = end || 1; - } - - if (!Object(__WEBPACK_IMPORTED_MODULE_7__common__["l" /* defined */])(end)) { - end = start || 1; - } - - if (start <= 0 || end <= 0) { - return null; - } - - if (limit) { - start = Math.max(Math.min(start, options.max), options.min); - end = Math.max(Math.min(end, options.max), options.min); - } - - start = log(start, base); - end = log(end, base); - - var p1, p2; - - if (vertical) { - p1 = logMax - Math.max(start, end); - p2 = logMax - Math.min(start, end); - } else { - p1 = Math.min(start, end) - logMin; - p2 = Math.max(start, end) - logMin; - } - - slotBox[valueAxis + 1] = Object(__WEBPACK_IMPORTED_MODULE_5__utils_limit_coordinate__["a" /* default */])(lineStart + step * (reverse ? p2 : p1)); - slotBox[valueAxis + 2] = Object(__WEBPACK_IMPORTED_MODULE_5__utils_limit_coordinate__["a" /* default */])(lineStart + step * (reverse ? p1 : p2)); - - return slotBox; - }; - - LogarithmicAxis.prototype.getValue = function getValue (point) { - var ref = this; - var options = ref.options; - var logMin = ref.logMin; - var logMax = ref.logMax; - var reverse = options.reverse; - var vertical = options.vertical; - var base = options.majorUnit; - var lineBox = this.lineBox(); - var dir = vertical === reverse ? 1 : -1; - var startEdge = dir === 1 ? 1 : 2; - var lineSize = vertical ? lineBox.height() : lineBox.width(); - var step = ((logMax - logMin) / lineSize); - var valueAxis = vertical ? __WEBPACK_IMPORTED_MODULE_6__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_6__common_constants__["G" /* X */]; - var lineStart = lineBox[valueAxis + startEdge]; - var offset = dir * (point[valueAxis] - lineStart); - var valueOffset = offset * step; - - if (offset < 0 || offset > lineSize) { - return null; - } - - var value = logMin + valueOffset; - - return Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(Math.pow(base, value), __WEBPACK_IMPORTED_MODULE_6__common_constants__["l" /* DEFAULT_PRECISION */]); - }; - - LogarithmicAxis.prototype.range = function range () { - var options = this.options; - return { min: options.min, max: options.max }; - }; - - LogarithmicAxis.prototype.scaleRange = function scaleRange (delta) { - var base = this.options.majorUnit; - var offset = -delta; - - return { - min: Math.pow(base, this.logMin - offset), - max: Math.pow(base, this.logMax + offset) - }; - }; - - LogarithmicAxis.prototype.translateRange = function translateRange (delta) { - var ref = this; - var options = ref.options; - var logMin = ref.logMin; - var logMax = ref.logMax; - var reverse = options.reverse; - var vertical = options.vertical; - var base = options.majorUnit; - var lineBox = this.lineBox(); - var size = vertical ? lineBox.height() : lineBox.width(); - var scale = size / (logMax - logMin); - var offset = Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(delta / scale, __WEBPACK_IMPORTED_MODULE_6__common_constants__["l" /* DEFAULT_PRECISION */]); - - if ((vertical || reverse) && !(vertical && reverse )) { - offset = -offset; - } - - return { - min: Math.pow(base, logMin + offset), - max: Math.pow(base, logMax + offset), - offset: offset - }; - }; - - LogarithmicAxis.prototype.labelsCount = function labelsCount () { - var floorMax = Math.floor(this.logMax); - var count = Math.floor(floorMax - this.logMin) + 1; - - return count; - }; - - LogarithmicAxis.prototype.getMajorTickPositions = function getMajorTickPositions () { - var ticks = []; - - this.traverseMajorTicksPositions(function (position) { - ticks.push(position); - }, { step: 1, skip: 0 }); - - return ticks; - }; - - LogarithmicAxis.prototype.createTicks = function createTicks (lineGroup) { - var options = this.options; - var majorTicks = options.majorTicks; - var minorTicks = options.minorTicks; - var vertical = options.vertical; - var mirror = options.labels.mirror; - var lineBox = this.lineBox(); - var ticks = []; - var tickLineOptions = { - // TODO - // _alignLines: options._alignLines, - vertical: vertical - }; - - function render(tickPosition, tickOptions) { - tickLineOptions.tickX = mirror ? lineBox.x2 : lineBox.x2 - tickOptions.size; - tickLineOptions.tickY = mirror ? lineBox.y1 - tickOptions.size : lineBox.y1; - tickLineOptions.position = tickPosition; - - lineGroup.append(Object(__WEBPACK_IMPORTED_MODULE_3__utils_create_axis_tick__["a" /* default */])(tickLineOptions, tickOptions)); - } - - if (majorTicks.visible) { - this.traverseMajorTicksPositions(render, majorTicks); - } - - if (minorTicks.visible) { - this.traverseMinorTicksPositions(render, minorTicks); - } - - return ticks; - }; - - LogarithmicAxis.prototype.createGridLines = function createGridLines (altAxis) { - var options = this.options; - var minorGridLines = options.minorGridLines; - var majorGridLines = options.majorGridLines; - var vertical = options.vertical; - var lineBox = altAxis.lineBox(); - var lineOptions = { - lineStart: lineBox[vertical ? "x1" : "y1"], - lineEnd: lineBox[vertical ? "x2" : "y2"], - vertical: vertical - }; - var majorTicks = []; - - var container = this.gridLinesVisual(); - function render(tickPosition, gridLine) { - if (!Object(__WEBPACK_IMPORTED_MODULE_7__common__["x" /* inArray */])(tickPosition, majorTicks)) { - lineOptions.position = tickPosition; - container.append(Object(__WEBPACK_IMPORTED_MODULE_4__utils_create_axis_grid_line__["a" /* default */])(lineOptions, gridLine)); - - majorTicks.push(tickPosition); - } - } - - if (majorGridLines.visible) { - this.traverseMajorTicksPositions(render, majorGridLines); - } - - if (minorGridLines.visible) { - this.traverseMinorTicksPositions(render, minorGridLines); - } - - return container.children; - }; - - LogarithmicAxis.prototype.traverseMajorTicksPositions = function traverseMajorTicksPositions (callback, tickOptions) { - var ref = this._lineOptions(); - var lineStart = ref.lineStart; - var step = ref.step; - var ref$1 = this; - var logMin = ref$1.logMin; - var logMax = ref$1.logMax; - - for (var power = Math.ceil(logMin) + tickOptions.skip; power <= logMax; power += tickOptions.step) { - var position = Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(lineStart + step * (power - logMin), __WEBPACK_IMPORTED_MODULE_6__common_constants__["l" /* DEFAULT_PRECISION */]); - callback(position, tickOptions); - } - }; - - LogarithmicAxis.prototype.traverseMinorTicksPositions = function traverseMinorTicksPositions (callback, tickOptions) { - var this$1 = this; - - var ref = this.options; - var min = ref.min; - var max = ref.max; - var minorUnit = ref.minorUnit; - var base = ref.majorUnit; - var ref$1 = this._lineOptions(); - var lineStart = ref$1.lineStart; - var step = ref$1.step; - var ref$2 = this; - var logMin = ref$2.logMin; - var logMax = ref$2.logMax; - var start = Math.floor(logMin); - - for (var power = start; power < logMax; power++) { - var minorOptions = this$1._minorIntervalOptions(power); - for (var idx = tickOptions.skip; idx < minorUnit; idx += tickOptions.step) { - var value = minorOptions.value + idx * minorOptions.minorStep; - if (value > max) { - break; - } - if (value >= min) { - var position = Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(lineStart + step * (log(value, base) - logMin), __WEBPACK_IMPORTED_MODULE_6__common_constants__["l" /* DEFAULT_PRECISION */]); - callback(position, tickOptions); - } - } - } - }; - - LogarithmicAxis.prototype.createAxisLabel = function createAxisLabel (index, labelOptions) { - var power = Math.ceil(this.logMin + index); - var value = Math.pow(this.options.majorUnit, power); - var text = this.axisLabelText(value, null, labelOptions); - - return new __WEBPACK_IMPORTED_MODULE_1__axis_label__["a" /* default */](value, text, index, null, labelOptions); - }; - - LogarithmicAxis.prototype.shouldRenderNote = function shouldRenderNote (value) { - var range = this.range(); - return range.min <= value && value <= range.max; - }; - - LogarithmicAxis.prototype.pan = function pan (delta) { - var range = this.translateRange(delta); - return this.limitRange(range.min, range.max, this.totalMin, this.totalMax, range.offset); - }; - - LogarithmicAxis.prototype.pointsRange = function pointsRange (start, end) { - var startValue = this.getValue(start); - var endValue = this.getValue(end); - var min = Math.min(startValue, endValue); - var max = Math.max(startValue, endValue); - - return { - min: min, - max: max - }; - }; - - LogarithmicAxis.prototype.zoomRange = function zoomRange (delta) { - var ref = this; - var options = ref.options; - var totalMin = ref.totalMin; - var totalMax = ref.totalMax; - var newRange = this.scaleRange(delta); - var min = Object(__WEBPACK_IMPORTED_MODULE_7__common__["F" /* limitValue */])(newRange.min, totalMin, totalMax); - var max = Object(__WEBPACK_IMPORTED_MODULE_7__common__["F" /* limitValue */])(newRange.max, totalMin, totalMax); - var base = options.majorUnit; - var acceptOptionsRange = max > min && options.min && options.max && (Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(log(options.max, base) - log(options.min, base), __WEBPACK_IMPORTED_MODULE_6__common_constants__["l" /* DEFAULT_PRECISION */]) < 1); - var acceptNewRange = !(options.min === totalMin && options.max === totalMax) && Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(log(max, base) - log(min, base), __WEBPACK_IMPORTED_MODULE_6__common_constants__["l" /* DEFAULT_PRECISION */]) >= 1; - - if (acceptOptionsRange || acceptNewRange) { - return { - min: min, - max: max - }; - } - }; - - LogarithmicAxis.prototype._minorIntervalOptions = function _minorIntervalOptions (power) { - var ref = this.options; - var minorUnit = ref.minorUnit; - var base = ref.majorUnit; - var value = Math.pow(base, power); - var nextValue = Math.pow(base, power + 1); - var difference = nextValue - value; - var minorStep = difference / minorUnit; - - return { - value: value, - minorStep: minorStep - }; - }; - - LogarithmicAxis.prototype._lineOptions = function _lineOptions () { - var ref = this.options; - var reverse = ref.reverse; - var vertical = ref.vertical; - var valueAxis = vertical ? __WEBPACK_IMPORTED_MODULE_6__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_6__common_constants__["G" /* X */]; - var lineBox = this.lineBox(); - var dir = vertical === reverse ? 1 : -1; - var startEdge = dir === 1 ? 1 : 2; - var lineSize = vertical ? lineBox.height() : lineBox.width(); - var step = dir * (lineSize / (this.logMax - this.logMin)); - var lineStart = lineBox[valueAxis + startEdge]; - - return { - step: step, - lineStart: lineStart, - lineBox: lineBox - }; - }; - - return LogarithmicAxis; -}(__WEBPACK_IMPORTED_MODULE_0__axis__["a" /* default */])); - -function initRange(autoMin, autoMax, axisOptions, options) { - var min = axisOptions.min; - var max = axisOptions.max; - - if (Object(__WEBPACK_IMPORTED_MODULE_7__common__["l" /* defined */])(axisOptions.axisCrossingValue) && axisOptions.axisCrossingValue <= 0) { - throwNegativeValuesError(); - } - - if (!Object(__WEBPACK_IMPORTED_MODULE_7__common__["l" /* defined */])(options.max)) { - max = autoMax; - } else if (options.max <= 0) { - throwNegativeValuesError(); - } - - if (!Object(__WEBPACK_IMPORTED_MODULE_7__common__["l" /* defined */])(options.min)) { - min = autoMin; - } else if (options.min <= 0) { - throwNegativeValuesError(); - } - - return { - min: min, - max: max - }; -} - -function autoAxisMin(min, max, options) { - var base = options.majorUnit; - var autoMin = min; - if (min <= 0) { - autoMin = max <= 1 ? Math.pow(base, -2) : 1; - } else if (!options.narrowRange) { - autoMin = Math.pow(base, Math.floor(log(min, base))); - } - return autoMin; -} - -function autoAxisMax(max, base) { - var logMaxRemainder = Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(log(max, base), __WEBPACK_IMPORTED_MODULE_6__common_constants__["l" /* DEFAULT_PRECISION */]) % 1; - var autoMax; - if (max <= 0) { - autoMax = base; - } else if (logMaxRemainder !== 0 && (logMaxRemainder < 0.3 || logMaxRemainder > 0.9)) { - autoMax = Math.pow(base, log(max, base) + 0.2); - } else { - autoMax = Math.pow(base, Math.ceil(log(max, base))); - } - - return autoMax; -} - -function throwNegativeValuesError() { - throw new Error("Non positive values cannot be used for a logarithmic axis"); -} - -function log(y, x) { - return Math.log(y) / Math.log(x); -} - -Object(__WEBPACK_IMPORTED_MODULE_7__common__["M" /* setDefaultOptions */])(LogarithmicAxis, { - type: "log", - majorUnit: DEFAULT_MAJOR_UNIT, - minorUnit: 1, - axisCrossingValue: 1, - vertical: true, - majorGridLines: { - visible: true, - width: 1, - color: __WEBPACK_IMPORTED_MODULE_6__common_constants__["c" /* BLACK */] - }, - zIndex: 1, - _deferLabels: true -}); - -/* harmony default export */ __webpack_exports__["a"] = (LogarithmicAxis); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/mixins/grid-lines-mixin.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - -var GridLinesMixin = { - createGridLines: function(altAxis) { - var options = this.options; - var radius = Math.abs(this.box.center().y - altAxis.lineBox().y1); - var gridLines = []; - var skipMajor = false; - var majorAngles, minorAngles; - - if (options.majorGridLines.visible) { - majorAngles = this.majorGridLineAngles(altAxis); - skipMajor = true; - - gridLines = this.renderMajorGridLines( - majorAngles, radius, options.majorGridLines - ); - } - - if (options.minorGridLines.visible) { - minorAngles = this.minorGridLineAngles(altAxis, skipMajor); - - Object(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* append */])(gridLines, this.renderMinorGridLines( - minorAngles, radius, options.minorGridLines, altAxis, skipMajor - )); - } - - return gridLines; - }, - - renderMajorGridLines: function(angles, radius, options) { - return this.renderGridLines(angles, radius, options); - }, - - renderMinorGridLines: function(angles, radius, options, altAxis, skipMajor) { - var radiusCallback = this.radiusCallback && this.radiusCallback(radius, altAxis, skipMajor); - return this.renderGridLines(angles, radius, options, radiusCallback); - }, - - renderGridLines: function(angles, radius, options, radiusCallback) { - var style = { - stroke: { - width: options.width, - color: options.color, - dashType: options.dashType - } - }; - - var center = this.box.center(); - var circle = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Circle([ center.x, center.y ], radius); - var container = this.gridLinesVisual(); - - for (var i = 0; i < angles.length; i++) { - var line = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path(style); - if (radiusCallback) { - circle.radius = radiusCallback(angles[i]); - } - - line.moveTo(circle.center) - .lineTo(circle.pointAt(angles[i] + 180)); - - container.append(line); - } - - return container.children; - }, - - gridLineAngles: function(altAxis, size, skip, step, skipAngles) { - var this$1 = this; - - var divs = this.intervals(size, skip, step, skipAngles); - var options = altAxis.options; - var altAxisVisible = options.visible && (options.line || {}).visible !== false; - - return Object(__WEBPACK_IMPORTED_MODULE_1__common__["G" /* map */])(divs, function (d) { - var alpha = this$1.intervalAngle(d); - - if (!altAxisVisible || alpha !== 90) { - return alpha; - } - }); - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (GridLinesMixin); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/mixins/radar-numeric-axis-mixin.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shape_builder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/shape-builder.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ring__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/ring.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - -var RadarNumericAxisMixin = { - options: { - majorGridLines: { - visible: true - } - }, - - createPlotBands: function() { - var this$1 = this; - - var ref = this.options; - var type = ref.majorGridLines.type; - var plotBands = ref.plotBands; if ( plotBands === void 0 ) plotBands = []; - var altAxis = this.plotArea.polarAxis; - var majorAngles = altAxis.majorAngles(); - var center = altAxis.box.center(); - var group = this._plotbandGroup = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group({ - zIndex: -1 - }); - - for (var i = 0; i < plotBands.length; i++) { - var band = plotBands[i]; - var bandStyle = { - fill: { - color: band.color, - opacity: band.opacity - }, - stroke: { - opacity: band.opacity - } - }; - - var slot = this$1.getSlot(band.from, band.to, true); - var ring = new __WEBPACK_IMPORTED_MODULE_2__ring__["a" /* default */](center, center.y - slot.y2, center.y - slot.y1, 0, 360); - - var shape = (void 0); - if (type === __WEBPACK_IMPORTED_MODULE_4__common_constants__["a" /* ARC */]) { - shape = __WEBPACK_IMPORTED_MODULE_1__shape_builder__["a" /* default */].current.createRing(ring, bandStyle); - } else { - shape = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromPoints(this$1.plotBandPoints(ring, majorAngles), bandStyle).close(); - } - - group.append(shape); - } - - this.appendVisual(group); - }, - - plotBandPoints: function(ring, angles) { - var innerPoints = []; - var outerPoints = []; - var center = [ ring.center.x, ring.center.y ]; - var innerCircle = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Circle(center, ring.innerRadius); - var outerCircle = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Circle(center, ring.radius); - - for (var i = 0; i < angles.length; i++) { - innerPoints.push(innerCircle.pointAt(angles[i] + 180)); - outerPoints.push(outerCircle.pointAt(angles[i] + 180)); - } - - innerPoints.reverse(); - innerPoints.push(innerPoints[0]); - outerPoints.push(outerPoints[0]); - - return outerPoints.concat(innerPoints); - }, - - createGridLines: function(altAxis) { - var options = this.options; - var majorTicks = this.radarMajorGridLinePositions(); - var majorAngles = altAxis.majorAngles(); - var center = altAxis.box.center(); - var gridLines = []; - - if (options.majorGridLines.visible) { - gridLines = this.renderGridLines( - center, majorTicks, majorAngles, options.majorGridLines - ); - } - - if (options.minorGridLines.visible) { - var minorTicks = this.radarMinorGridLinePositions(); - Object(__WEBPACK_IMPORTED_MODULE_5__common__["g" /* append */])(gridLines, this.renderGridLines( - center, minorTicks, majorAngles, options.minorGridLines - )); - } - - return gridLines; - }, - - renderGridLines: function(center, ticks, angles, options) { - var style = { - stroke: { - width: options.width, - color: options.color, - dashType: options.dashType - } - }; - var skip = options.skip; if ( skip === void 0 ) skip = 0; - var step = options.step; if ( step === void 0 ) step = 0; - var container = this.gridLinesVisual(); - - for (var tickIx = skip; tickIx < ticks.length; tickIx += step) { - var tickRadius = center.y - ticks[tickIx]; - if (tickRadius > 0) { - var circle = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Circle([ center.x, center.y ], tickRadius); - if (options.type === __WEBPACK_IMPORTED_MODULE_4__common_constants__["a" /* ARC */]) { - container.append(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Circle(circle, style)); - } else { - var line = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path(style); - for (var angleIx = 0; angleIx < angles.length; angleIx++) { - line.lineTo(circle.pointAt(angles[angleIx] + 180)); - } - - line.close(); - container.append(line); - } - } - } - - return container.children; - }, - - getValue: function(point) { - var lineBox = this.lineBox(); - var altAxis = this.plotArea.polarAxis; - var majorAngles = altAxis.majorAngles(); - var center = altAxis.box.center(); - var radius = point.distanceTo(center); - var distance = radius; - - if (this.options.majorGridLines.type !== __WEBPACK_IMPORTED_MODULE_4__common_constants__["a" /* ARC */] && majorAngles.length > 1) { - var dx = point.x - center.x; - var dy = point.y - center.y; - var theta = (Object(__WEBPACK_IMPORTED_MODULE_5__common__["m" /* deg */])(Math.atan2(dy, dx)) + 540) % 360; - - majorAngles.sort(function(a, b) { - return angularDistance(a, theta) - angularDistance(b, theta); - }); - - // Solve triangle (center, point, axis X) using one side (radius) and two angles. - // Angles are derived from triangle (center, point, gridline X) - var midAngle = angularDistance(majorAngles[0], majorAngles[1]) / 2; - var alpha = angularDistance(theta, majorAngles[0]); - var gamma = 90 - midAngle; - var beta = 180 - alpha - gamma; - - distance = radius * (Math.sin(Object(__WEBPACK_IMPORTED_MODULE_5__common__["J" /* rad */])(beta)) / Math.sin(Object(__WEBPACK_IMPORTED_MODULE_5__common__["J" /* rad */])(gamma))); - } - - return this.axisType().prototype.getValue.call( - this, new __WEBPACK_IMPORTED_MODULE_3__point__["a" /* default */](lineBox.x1, lineBox.y2 - distance) - ); - } -}; - -function angularDistance(a, b) { - return 180 - Math.abs(Math.abs(a - b) - 180); -} - -/* harmony default export */ __webpack_exports__["a"] = (RadarNumericAxisMixin); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/note.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__box_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box-element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__text_box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/text-box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__shape_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/shape-element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - -var DEFAULT_ICON_SIZE = 7; -var DEFAULT_LABEL_COLOR = "#fff"; - -var Note = (function (BoxElement) { - function Note(fields, options, chartService) { - BoxElement.call(this, options); - - this.fields = fields; - this.chartService = chartService; - - this.render(); - } - - if ( BoxElement ) Note.__proto__ = BoxElement; - Note.prototype = Object.create( BoxElement && BoxElement.prototype ); - Note.prototype.constructor = Note; - - Note.prototype.hide = function hide () { - this.options.visible = false; - }; - - Note.prototype.show = function show () { - this.options.visible = true; - }; - - Note.prototype.render = function render () { - var options = this.options; - - if (options.visible) { - var label = options.label; - var icon = options.icon; - var box = new __WEBPACK_IMPORTED_MODULE_4__box__["a" /* default */](); - var size = icon.size; - var text = this.fields.text; - var width, height; - - if (Object(__WEBPACK_IMPORTED_MODULE_6__common__["l" /* defined */])(label) && label.visible) { - var noteTemplate = Object(__WEBPACK_IMPORTED_MODULE_6__common__["t" /* getTemplate */])(label); - if (noteTemplate) { - text = noteTemplate(this.fields); - } else if (label.format) { - text = this.chartService.format.auto(label.format, text); - } - - if (!label.color) { - label.color = label.position === __WEBPACK_IMPORTED_MODULE_5__common_constants__["q" /* INSIDE */] ? DEFAULT_LABEL_COLOR : icon.background; - } - - this.label = new __WEBPACK_IMPORTED_MODULE_2__text_box__["a" /* default */](text, Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({}, label)); - - if (label.position === __WEBPACK_IMPORTED_MODULE_5__common_constants__["q" /* INSIDE */] && !Object(__WEBPACK_IMPORTED_MODULE_6__common__["l" /* defined */])(size)) { - if (icon.type === __WEBPACK_IMPORTED_MODULE_5__common_constants__["f" /* CIRCLE */]) { - size = Math.max(this.label.box.width(), this.label.box.height()); - } else { - width = this.label.box.width(); - height = this.label.box.height(); - } - box.wrap(this.label.box); - } - } - - icon.width = width || size || DEFAULT_ICON_SIZE; - icon.height = height || size || DEFAULT_ICON_SIZE; - - var marker = new __WEBPACK_IMPORTED_MODULE_3__shape_element__["a" /* default */](Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({}, icon)); - - this.marker = marker; - this.append(marker); - - if (this.label) { - this.append(this.label); - } - - marker.reflow(new __WEBPACK_IMPORTED_MODULE_4__box__["a" /* default */]()); - this.wrapperBox = box.wrap(marker.box); - } - }; - - Note.prototype.reflow = function reflow (targetBox) { - var ref = this; - var options = ref.options; - var label = ref.label; - var marker = ref.marker; - var wrapperBox = ref.wrapperBox; - var center = targetBox.center(); - var length = options.line.length; - var position = options.position; - - // TODO: Review - if (options.visible) { - var lineStart, box, contentBox; - - if (Object(__WEBPACK_IMPORTED_MODULE_6__common__["x" /* inArray */])(position, [ __WEBPACK_IMPORTED_MODULE_5__common_constants__["r" /* LEFT */], __WEBPACK_IMPORTED_MODULE_5__common_constants__["z" /* RIGHT */] ])) { - if (position === __WEBPACK_IMPORTED_MODULE_5__common_constants__["r" /* LEFT */]) { - contentBox = wrapperBox.alignTo(targetBox, position).translate(-length, targetBox.center().y - wrapperBox.center().y); - - if (options.line.visible) { - lineStart = [ targetBox.x1, center.y ]; - this.linePoints = [ - lineStart, - [ contentBox.x2, center.y ] - ]; - box = contentBox.clone().wrapPoint(lineStart); - } - } else { - contentBox = wrapperBox.alignTo(targetBox, position).translate(length, targetBox.center().y - wrapperBox.center().y); - - if (options.line.visible) { - lineStart = [ targetBox.x2, center.y ]; - this.linePoints = [ - lineStart, - [ contentBox.x1, center.y ] - ]; - box = contentBox.clone().wrapPoint(lineStart); - } - } - } else { - if (position === __WEBPACK_IMPORTED_MODULE_5__common_constants__["d" /* BOTTOM */]) { - contentBox = wrapperBox.alignTo(targetBox, position).translate(targetBox.center().x - wrapperBox.center().x, length); - - if (options.line.visible) { - lineStart = [ center.x, targetBox.y2 ]; - this.linePoints = [ - lineStart, - [ center.x, contentBox.y1 ] - ]; - box = contentBox.clone().wrapPoint(lineStart); - } - } else { - contentBox = wrapperBox.alignTo(targetBox, position).translate(targetBox.center().x - wrapperBox.center().x, -length); - - if (options.line.visible) { - lineStart = [ center.x, targetBox.y1 ]; - this.linePoints = [ - lineStart, - [ center.x, contentBox.y2 ] - ]; - box = contentBox.clone().wrapPoint(lineStart); - } - } - } - - if (marker) { - marker.reflow(contentBox); - } - - if (label) { - label.reflow(contentBox); - if (marker) { - if (options.label.position === __WEBPACK_IMPORTED_MODULE_5__common_constants__["y" /* OUTSIDE */]) { - label.box.alignTo(marker.box, position); - } - label.reflow(label.box); - } - } - - this.contentBox = contentBox; - this.targetBox = targetBox; - this.box = box || contentBox; - } - }; - - Note.prototype.createVisual = function createVisual () { - BoxElement.prototype.createVisual.call(this); - this.visual.options.noclip = this.options.noclip; - - if (this.options.visible) { - this.createLine(); - } - }; - - Note.prototype.renderVisual = function renderVisual () { - var this$1 = this; - - var options = this.options; - var customVisual = options.visual; - if (options.visible && customVisual) { - this.visual = customVisual(Object.assign(this.fields, { - sender: this.getSender(), - rect: this.targetBox.toRect(), - options: { - background: options.background, - border: options.background, - icon: options.icon, - label: options.label, - line: options.line, - position: options.position, - visible: options.visible - }, - createVisual: function () { - this$1.createVisual(); - this$1.renderChildren(); - var defaultVisual = this$1.visual; - delete this$1.visual; - return defaultVisual; - } - })); - this.addVisual(); - } else { - BoxElement.prototype.renderVisual.call(this); - } - }; - - Note.prototype.createLine = function createLine () { - var options = this.options.line; - - if (this.linePoints) { - var path = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromPoints(this.linePoints, { - stroke: { - color: options.color, - width: options.width, - dashType: options.dashType - } - }); - - Object(__WEBPACK_IMPORTED_MODULE_6__common__["f" /* alignPathToPixel */])(path); - this.visual.append(path); - } - }; - - Note.prototype.click = function click (widget, e) { - var args = this.eventArgs(e); - - if (!widget.trigger(__WEBPACK_IMPORTED_MODULE_5__common_constants__["v" /* NOTE_CLICK */], args)) { - e.preventDefault(); - } - }; - - Note.prototype.hover = function hover (widget, e) { - var args = this.eventArgs(e); - - if (!widget.trigger(__WEBPACK_IMPORTED_MODULE_5__common_constants__["w" /* NOTE_HOVER */], args)) { - e.preventDefault(); - } - }; - - Note.prototype.leave = function leave (widget) { - widget._unsetActivePoint(); - }; - - Note.prototype.eventArgs = function eventArgs (e) { - var options = this.options; - - return Object.assign(this.fields, { - element: Object(__WEBPACK_IMPORTED_MODULE_6__common__["r" /* eventElement */])(e), - text: Object(__WEBPACK_IMPORTED_MODULE_6__common__["l" /* defined */])(options.label) ? options.label.text : "", - visual: this.visual - }); - }; - - return Note; -}(__WEBPACK_IMPORTED_MODULE_1__box_element__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_6__common__["M" /* setDefaultOptions */])(Note, { - icon: { - visible: true, - type: __WEBPACK_IMPORTED_MODULE_5__common_constants__["f" /* CIRCLE */] - }, - label: { - position: __WEBPACK_IMPORTED_MODULE_5__common_constants__["q" /* INSIDE */], - visible: true, - align: __WEBPACK_IMPORTED_MODULE_5__common_constants__["e" /* CENTER */], - vAlign: __WEBPACK_IMPORTED_MODULE_5__common_constants__["e" /* CENTER */] - }, - line: { - visible: true - }, - visible: true, - position: __WEBPACK_IMPORTED_MODULE_5__common_constants__["B" /* TOP */], - zIndex: 2 -}); - -/* harmony default export */ __webpack_exports__["a"] = (Note); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/numeric-axis.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/axis.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__axis_label__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/axis-label.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_auto_major_unit__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/auto-major-unit.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_auto_axis_min__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/auto-axis-min.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_auto_axis_max__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/auto-axis-max.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_floor__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/floor.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_ceil__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/ceil.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_limit_coordinate__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/limit-coordinate.js"); - - - - - - - - - - - - - - - -var MIN_VALUE_RANGE = Math.pow(10, -__WEBPACK_IMPORTED_MODULE_3__common_constants__["l" /* DEFAULT_PRECISION */] + 1); - -var NumericAxis = (function (Axis) { - function NumericAxis(seriesMin, seriesMax, options, chartService) { - Axis.call(this, Object.assign({}, options, { - seriesMin: seriesMin, - seriesMax: seriesMax - }), chartService); - } - - if ( Axis ) NumericAxis.__proto__ = Axis; - NumericAxis.prototype = Object.create( Axis && Axis.prototype ); - NumericAxis.prototype.constructor = NumericAxis; - - NumericAxis.prototype.initUserOptions = function initUserOptions (options) { - var autoOptions = autoAxisOptions(options.seriesMin, options.seriesMax, options); - this.totalOptions = totalAxisOptions(autoOptions, options); - - return axisOptions(autoOptions, options); - }; - - NumericAxis.prototype.initFields = function initFields () { - this.totalMin = this.totalOptions.min; - this.totalMax = this.totalOptions.max; - this.totalMajorUnit = this.totalOptions.majorUnit; - this.seriesMin = this.options.seriesMin; - this.seriesMax = this.options.seriesMax; - }; - - NumericAxis.prototype.startValue = function startValue () { - return 0; - }; - - NumericAxis.prototype.range = function range () { - var options = this.options; - return { min: options.min, max: options.max }; - }; - - NumericAxis.prototype.getDivisions = function getDivisions (stepValue) { - if (stepValue === 0) { - return 1; - } - - var options = this.options; - var range = options.max - options.min; - - return Math.floor(Object(__WEBPACK_IMPORTED_MODULE_4__common__["L" /* round */])(range / stepValue, __WEBPACK_IMPORTED_MODULE_3__common_constants__["g" /* COORD_PRECISION */])) + 1; - }; - - NumericAxis.prototype.getTickPositions = function getTickPositions (unit, skipUnit) { - var options = this.options; - var vertical = options.vertical; - var reverse = options.reverse; - var lineBox = this.lineBox(); - var lineSize = vertical ? lineBox.height() : lineBox.width(); - var range = options.max - options.min; - var scale = lineSize / range; - var step = unit * scale; - var divisions = this.getDivisions(unit); - var dir = (vertical ? -1 : 1) * (reverse ? -1 : 1); - var startEdge = dir === 1 ? 1 : 2; - var positions = []; - var pos = lineBox[(vertical ? __WEBPACK_IMPORTED_MODULE_3__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_3__common_constants__["G" /* X */]) + startEdge]; - var skipStep = 0; - - if (skipUnit) { - skipStep = skipUnit / unit; - } - - for (var idx = 0; idx < divisions; idx++) { - if (idx % skipStep !== 0) { - positions.push(Object(__WEBPACK_IMPORTED_MODULE_4__common__["L" /* round */])(pos, __WEBPACK_IMPORTED_MODULE_3__common_constants__["g" /* COORD_PRECISION */])); - } - - pos = pos + step * dir; - } - - return positions; - }; - - NumericAxis.prototype.getMajorTickPositions = function getMajorTickPositions () { - return this.getTickPositions(this.options.majorUnit); - }; - - NumericAxis.prototype.getMinorTickPositions = function getMinorTickPositions () { - return this.getTickPositions(this.options.minorUnit); - }; - - NumericAxis.prototype.getSlot = function getSlot (a, b, limit) { - if ( limit === void 0 ) limit = false; - - var options = this.options; - var vertical = options.vertical; - var reverse = options.reverse; - var valueAxis = vertical ? __WEBPACK_IMPORTED_MODULE_3__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_3__common_constants__["G" /* X */]; - var lineBox = this.lineBox(); - var lineStart = lineBox[valueAxis + (reverse ? 2 : 1)]; - var lineSize = vertical ? lineBox.height() : lineBox.width(); - var dir = reverse ? -1 : 1; - var step = dir * (lineSize / (options.max - options.min)); - var slotBox = new __WEBPACK_IMPORTED_MODULE_2__box__["a" /* default */](lineBox.x1, lineBox.y1, lineBox.x1, lineBox.y1); - - var start = a; - var end = b; - - if (!Object(__WEBPACK_IMPORTED_MODULE_4__common__["l" /* defined */])(start)) { - start = end || 0; - } - - if (!Object(__WEBPACK_IMPORTED_MODULE_4__common__["l" /* defined */])(end)) { - end = start || 0; - } - - if (limit) { - start = Math.max(Math.min(start, options.max), options.min); - end = Math.max(Math.min(end, options.max), options.min); - } - - var p1, p2; - - if (vertical) { - p1 = options.max - Math.max(start, end); - p2 = options.max - Math.min(start, end); - } else { - p1 = Math.min(start, end) - options.min; - p2 = Math.max(start, end) - options.min; - } - - slotBox[valueAxis + 1] = Object(__WEBPACK_IMPORTED_MODULE_10__utils_limit_coordinate__["a" /* default */])(lineStart + step * (reverse ? p2 : p1)); - slotBox[valueAxis + 2] = Object(__WEBPACK_IMPORTED_MODULE_10__utils_limit_coordinate__["a" /* default */])(lineStart + step * (reverse ? p1 : p2)); - - return slotBox; - }; - - NumericAxis.prototype.getValue = function getValue (point) { - var options = this.options; - var vertical = options.vertical; - var reverse = options.reverse; - var max = Number(options.max); - var min = Number(options.min); - var valueAxis = vertical ? __WEBPACK_IMPORTED_MODULE_3__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_3__common_constants__["G" /* X */]; - var lineBox = this.lineBox(); - var lineStart = lineBox[valueAxis + (reverse ? 2 : 1)]; - var lineSize = vertical ? lineBox.height() : lineBox.width(); - var dir = reverse ? -1 : 1; - var offset = dir * (point[valueAxis] - lineStart); - var step = (max - min) / lineSize; - var valueOffset = offset * step; - - if (offset < 0 || offset > lineSize) { - return null; - } - - var value = vertical ? - max - valueOffset : - min + valueOffset; - - return Object(__WEBPACK_IMPORTED_MODULE_4__common__["L" /* round */])(value, __WEBPACK_IMPORTED_MODULE_3__common_constants__["l" /* DEFAULT_PRECISION */]); - }; - - NumericAxis.prototype.translateRange = function translateRange (delta) { - var options = this.options; - var vertical = options.vertical; - var reverse = options.reverse; - var max = options.max; - var min = options.min; - var lineBox = this.lineBox(); - var size = vertical ? lineBox.height() : lineBox.width(); - var range = max - min; - var scale = size / range; - var offset = Object(__WEBPACK_IMPORTED_MODULE_4__common__["L" /* round */])(delta / scale, __WEBPACK_IMPORTED_MODULE_3__common_constants__["l" /* DEFAULT_PRECISION */]); - - if ((vertical || reverse) && !(vertical && reverse )) { - offset = -offset; - } - - return { - min: min + offset, - max: max + offset, - offset: offset - }; - }; - - NumericAxis.prototype.scaleRange = function scaleRange (delta) { - var options = this.options; - var offset = -delta * options.majorUnit; - - return { - min: options.min - offset, - max: options.max + offset - }; - }; - - NumericAxis.prototype.labelsCount = function labelsCount () { - return this.getDivisions(this.options.majorUnit); - }; - - NumericAxis.prototype.createAxisLabel = function createAxisLabel (index, labelOptions) { - var options = this.options; - var value = Object(__WEBPACK_IMPORTED_MODULE_4__common__["L" /* round */])(options.min + (index * options.majorUnit), __WEBPACK_IMPORTED_MODULE_3__common_constants__["l" /* DEFAULT_PRECISION */]); - var text = this.axisLabelText(value, null, labelOptions); - - return new __WEBPACK_IMPORTED_MODULE_1__axis_label__["a" /* default */](value, text, index, null, labelOptions); - }; - - NumericAxis.prototype.shouldRenderNote = function shouldRenderNote (value) { - var range = this.range(); - return range.min <= value && value <= range.max; - }; - - NumericAxis.prototype.pan = function pan (delta) { - var range = this.translateRange(delta); - return this.limitRange(range.min, range.max, this.totalMin, this.totalMax, range.offset); - }; - - NumericAxis.prototype.pointsRange = function pointsRange (start, end) { - var startValue = this.getValue(start); - var endValue = this.getValue(end); - var min = Math.min(startValue, endValue); - var max = Math.max(startValue, endValue); - - if (this.isValidRange(min, max)) { - return { - min: min, - max: max - }; - } - }; - - NumericAxis.prototype.zoomRange = function zoomRange (delta) { - var ref = this; - var totalMin = ref.totalMin; - var totalMax = ref.totalMax; - var newRange = this.scaleRange(delta); - var min = Object(__WEBPACK_IMPORTED_MODULE_4__common__["F" /* limitValue */])(newRange.min, totalMin, totalMax); - var max = Object(__WEBPACK_IMPORTED_MODULE_4__common__["F" /* limitValue */])(newRange.max, totalMin, totalMax); - - if (this.isValidRange(min, max)) { - return { - min: min, - max: max - }; - } - }; - - NumericAxis.prototype.isValidRange = function isValidRange (min, max) { - return max - min > MIN_VALUE_RANGE; - }; - - return NumericAxis; -}(__WEBPACK_IMPORTED_MODULE_0__axis__["a" /* default */])); - -function autoAxisOptions(seriesMin, seriesMax, options) { - var narrowRange = options.narrowRange; - - var autoMin = Object(__WEBPACK_IMPORTED_MODULE_6__utils_auto_axis_min__["a" /* default */])(seriesMin, seriesMax, narrowRange); - var autoMax = Object(__WEBPACK_IMPORTED_MODULE_7__utils_auto_axis_max__["a" /* default */])(seriesMin, seriesMax, narrowRange); - - var majorUnit = Object(__WEBPACK_IMPORTED_MODULE_5__utils_auto_major_unit__["a" /* default */])(autoMin, autoMax); - var autoOptions = { - majorUnit: majorUnit - }; - - if (options.roundToMajorUnit !== false) { - if (autoMin < 0 && remainderClose(autoMin, majorUnit, 1 / 3)) { - autoMin -= majorUnit; - } - - if (autoMax > 0 && remainderClose(autoMax, majorUnit, 1 / 3)) { - autoMax += majorUnit; - } - } - - autoOptions.min = Object(__WEBPACK_IMPORTED_MODULE_8__utils_floor__["a" /* default */])(autoMin, majorUnit); - autoOptions.max = Object(__WEBPACK_IMPORTED_MODULE_9__utils_ceil__["a" /* default */])(autoMax, majorUnit); - - return autoOptions; -} - -function totalAxisOptions(autoOptions, options) { - return { - min: Object(__WEBPACK_IMPORTED_MODULE_4__common__["l" /* defined */])(options.min) ? Math.min(autoOptions.min, options.min) : autoOptions.min, - max: Object(__WEBPACK_IMPORTED_MODULE_4__common__["l" /* defined */])(options.max) ? Math.max(autoOptions.max, options.max) : autoOptions.max, - majorUnit: autoOptions.majorUnit - }; -} - -function axisOptions(autoOptions, userOptions) { - var options = userOptions; - var userSetMin, userSetMax; - - if (userOptions) { - userSetMin = Object(__WEBPACK_IMPORTED_MODULE_4__common__["l" /* defined */])(userOptions.min); - userSetMax = Object(__WEBPACK_IMPORTED_MODULE_4__common__["l" /* defined */])(userOptions.max); - - var userSetLimits = userSetMin || userSetMax; - - if (userSetLimits) { - if (userOptions.min === userOptions.max) { - if (userOptions.min > 0) { - userOptions.min = 0; - } else { - userOptions.max = 1; - } - } - } - - if (userOptions.majorUnit) { - autoOptions.min = Object(__WEBPACK_IMPORTED_MODULE_8__utils_floor__["a" /* default */])(autoOptions.min, userOptions.majorUnit); - autoOptions.max = Object(__WEBPACK_IMPORTED_MODULE_9__utils_ceil__["a" /* default */])(autoOptions.max, userOptions.majorUnit); - } else if (userSetLimits) { - options = Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])(autoOptions, userOptions); - - // Determine an auto major unit after min/max have been set - autoOptions.majorUnit = Object(__WEBPACK_IMPORTED_MODULE_5__utils_auto_major_unit__["a" /* default */])(options.min, options.max); - } - } - - autoOptions.minorUnit = (options.majorUnit || autoOptions.majorUnit) / 5; - - var result = Object(__WEBPACK_IMPORTED_MODULE_4__common__["k" /* deepExtend */])(autoOptions, options); - if (result.min >= result.max) { - if (userSetMin && !userSetMax) { - result.max = result.min + result.majorUnit; - } else if (!userSetMin && userSetMax) { - result.min = result.max - result.majorUnit; - } - } - - return result; -} - -function remainderClose(value, divisor, ratio) { - var remainder = Object(__WEBPACK_IMPORTED_MODULE_4__common__["L" /* round */])(Math.abs(value % divisor), __WEBPACK_IMPORTED_MODULE_3__common_constants__["l" /* DEFAULT_PRECISION */]); - var threshold = divisor * (1 - ratio); - - return remainder === 0 || remainder > threshold; -} - -Object(__WEBPACK_IMPORTED_MODULE_4__common__["M" /* setDefaultOptions */])(NumericAxis, { - type: "numeric", - min: 0, - max: 1, - vertical: true, - majorGridLines: { - visible: true, - width: 1, - color: __WEBPACK_IMPORTED_MODULE_3__common_constants__["c" /* BLACK */] - }, - labels: { - format: "#.####################" - }, - zIndex: 1 -}); - -/* harmony default export */ __webpack_exports__["a"] = (NumericAxis); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/point.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - -var Point = (function (Class) { - function Point(x, y) { - Class.call(this); - - this.x = x || 0; - this.y = y || 0; - } - - if ( Class ) Point.__proto__ = Class; - Point.prototype = Object.create( Class && Class.prototype ); - Point.prototype.constructor = Point; - - Point.prototype.clone = function clone () { - return new Point(this.x, this.y); - }; - - Point.prototype.equals = function equals (point) { - return point && this.x === point.x && this.y === point.y; - }; - - Point.prototype.rotate = function rotate (center, degrees) { - var theta = Object(__WEBPACK_IMPORTED_MODULE_1__common__["J" /* rad */])(degrees); - var cosT = Math.cos(theta); - var sinT = Math.sin(theta); - var cx = center.x; - var cy = center.y; - var ref = this; - var x = ref.x; - var y = ref.y; - - this.x = Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])( - cx + (x - cx) * cosT + (y - cy) * sinT, - __WEBPACK_IMPORTED_MODULE_0__common_constants__["g" /* COORD_PRECISION */] - ); - - this.y = Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])( - cy + (y - cy) * cosT - (x - cx) * sinT, - __WEBPACK_IMPORTED_MODULE_0__common_constants__["g" /* COORD_PRECISION */] - ); - - return this; - }; - - Point.prototype.multiply = function multiply (a) { - - this.x *= a; - this.y *= a; - - return this; - }; - - Point.prototype.distanceTo = function distanceTo (point) { - var dx = this.x - point.x; - var dy = this.y - point.y; - - return Math.sqrt(dx * dx + dy * dy); - }; - - Point.onCircle = function onCircle (center, angle, radius) { - var radians = Object(__WEBPACK_IMPORTED_MODULE_1__common__["J" /* rad */])(angle); - - return new Point( - center.x - radius * Math.cos(radians), - center.y - radius * Math.sin(radians) - ); - }; - - return Point; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - - -/* harmony default export */ __webpack_exports__["a"] = (Point); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/polar-axis.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_grid_lines_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/mixins/grid-lines-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__radar_category_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/radar-category-axis.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__numeric_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/numeric-axis.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/axis.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ring__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/ring.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - - -var PolarAxis = (function (Axis) { - function PolarAxis(options, chartService) { - Axis.call(this, options, chartService); - - var instanceOptions = this.options; - - instanceOptions.minorUnit = instanceOptions.minorUnit || instanceOptions.majorUnit / 2; - } - - if ( Axis ) PolarAxis.__proto__ = Axis; - PolarAxis.prototype = Object.create( Axis && Axis.prototype ); - PolarAxis.prototype.constructor = PolarAxis; - - PolarAxis.prototype.getDivisions = function getDivisions (stepValue) { - return __WEBPACK_IMPORTED_MODULE_3__numeric_axis__["a" /* default */].prototype.getDivisions.call(this, stepValue) - 1; - }; - - PolarAxis.prototype.reflow = function reflow (box) { - this.box = box; - this.reflowLabels(); - }; - - PolarAxis.prototype.reflowLabels = function reflowLabels () { - var this$1 = this; - - var ref = this; - var options = ref.options; - var labels = ref.labels; - var labelOptions = ref.options.labels; - var skip = labelOptions.skip || 0; - var step = labelOptions.step || 1; - - var measureBox = new __WEBPACK_IMPORTED_MODULE_6__box__["a" /* default */](); - var divs = this.intervals(options.majorUnit, skip, step); - - for (var i = 0; i < labels.length; i++) { - labels[i].reflow(measureBox); - var labelBox = labels[i].box; - - labels[i].reflow(this$1.getSlot(divs[i]).adjacentBox(0, labelBox.width(), labelBox.height())); - } - }; - - PolarAxis.prototype.lineBox = function lineBox () { - return this.box; - }; - - PolarAxis.prototype.intervals = function intervals (size, skipOption, stepOption, skipAngles) { - if ( skipAngles === void 0 ) skipAngles = false; - - var min = this.options.min; - var divisions = this.getDivisions(size); - var divs = []; - var skip = skipOption || 0; - var step = stepOption || 1; - - for (var i = skip; i < divisions; i += step) { - var current = (360 + min + i * size) % 360; - if (!(skipAngles && Object(__WEBPACK_IMPORTED_MODULE_8__common__["x" /* inArray */])(current, skipAngles))) { - divs.push(current); - } - } - - return divs; - }; - - PolarAxis.prototype.majorIntervals = function majorIntervals () { - return this.intervals(this.options.majorUnit); - }; - - PolarAxis.prototype.minorIntervals = function minorIntervals () { - return this.intervals(this.options.minorUnit); - }; - - PolarAxis.prototype.intervalAngle = function intervalAngle (i) { - return (540 - i - this.options.startAngle) % 360; - }; - - PolarAxis.prototype.createLine = function createLine () { - return []; - }; - - PolarAxis.prototype.majorGridLineAngles = function majorGridLineAngles (altAxis) { - var majorGridLines = this.options.majorGridLines; - return this.gridLineAngles(altAxis, this.options.majorUnit, majorGridLines.skip, majorGridLines.step); - }; - - PolarAxis.prototype.minorGridLineAngles = function minorGridLineAngles (altAxis, skipMajor) { - var options = this.options; - var minorGridLines = options.minorGridLines; - var majorGridLines = options.majorGridLines; - var majorGridLineAngles = skipMajor ? this.intervals(options.majorUnit, majorGridLines.skip, majorGridLines.step) : null; - - return this.gridLineAngles(altAxis, options.minorUnit, minorGridLines.skip, minorGridLines.step, majorGridLineAngles); - }; - - PolarAxis.prototype.plotBandSlot = function plotBandSlot (band) { - return this.getSlot(band.from, band.to); - }; - - PolarAxis.prototype.getSlot = function getSlot (a, b) { - var ref = this; - var options = ref.options; - var box = ref.box; - var startAngle = options.startAngle; - var start = Object(__WEBPACK_IMPORTED_MODULE_8__common__["F" /* limitValue */])(a, options.min, options.max); - var end = Object(__WEBPACK_IMPORTED_MODULE_8__common__["F" /* limitValue */])(b || start, start, options.max); - - if (options.reverse) { - start *= -1; - end *= -1; - } - - start = (540 - start - startAngle) % 360; - end = (540 - end - startAngle) % 360; - - if (end < start) { - var tmp = start; - start = end; - end = tmp; - } - - return new __WEBPACK_IMPORTED_MODULE_5__ring__["a" /* default */](box.center(), 0, box.height() / 2, start, end - start); - }; - - PolarAxis.prototype.slot = function slot (from, to) { - if ( to === void 0 ) to = from; - - var options = this.options; - var start = 360 - options.startAngle; - var slot = this.getSlot(from, to); - var min = Math.min(from, to); - var max = Math.max(from, to); - var startAngle, endAngle; - - if (options.reverse) { - startAngle = min; - endAngle = max; - } else { - startAngle = 360 - max; - endAngle = 360 - min; - } - - startAngle = (startAngle + start) % 360; - endAngle = (endAngle + start) % 360; - - return new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Arc([ slot.center.x, slot.center.y ], { - startAngle: startAngle, - endAngle: endAngle, - radiusX: slot.radius, - radiusY: slot.radius - }); - }; - - PolarAxis.prototype.getValue = function getValue (point) { - var options = this.options; - var center = this.box.center(); - var dx = point.x - center.x; - var dy = point.y - center.y; - var theta = Math.round(Object(__WEBPACK_IMPORTED_MODULE_8__common__["m" /* deg */])(Math.atan2(dy, dx))); - var start = options.startAngle; - - if (!options.reverse) { - theta *= -1; - start *= -1; - } - - return (theta + start + 360) % 360; - }; - - PolarAxis.prototype.valueRange = function valueRange () { - return { - min: 0, - max: Math.PI * 2 - }; - }; - - return PolarAxis; -}(__WEBPACK_IMPORTED_MODULE_4__axis__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_8__common__["M" /* setDefaultOptions */])(PolarAxis, { - type: "polar", - startAngle: 0, - reverse: false, - majorUnit: 60, - min: 0, - max: 360, - labels: { - margin: Object(__WEBPACK_IMPORTED_MODULE_8__common__["s" /* getSpacing */])(10) - }, - majorGridLines: { - color: __WEBPACK_IMPORTED_MODULE_7__common_constants__["c" /* BLACK */], - visible: true, - width: 1 - }, - minorGridLines: { - color: "#aaa" - } -}); - -Object(__WEBPACK_IMPORTED_MODULE_8__common__["k" /* deepExtend */])(PolarAxis.prototype, __WEBPACK_IMPORTED_MODULE_1__mixins_grid_lines_mixin__["a" /* default */], { - createPlotBands: __WEBPACK_IMPORTED_MODULE_2__radar_category_axis__["a" /* default */].prototype.createPlotBands, - majorAngles: __WEBPACK_IMPORTED_MODULE_2__radar_category_axis__["a" /* default */].prototype.majorAngles, - range: __WEBPACK_IMPORTED_MODULE_3__numeric_axis__["a" /* default */].prototype.range, - labelsCount: __WEBPACK_IMPORTED_MODULE_3__numeric_axis__["a" /* default */].prototype.labelsCount, - createAxisLabel: __WEBPACK_IMPORTED_MODULE_3__numeric_axis__["a" /* default */].prototype.createAxisLabel -}); - -/* harmony default export */ __webpack_exports__["a"] = (PolarAxis); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/radar-category-axis.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_grid_lines_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/mixins/grid-lines-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__category_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/category-axis.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__shape_builder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/shape-builder.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ring__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/ring.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - -var RadarCategoryAxis = (function (CategoryAxis) { - function RadarCategoryAxis () { - CategoryAxis.apply(this, arguments); - } - - if ( CategoryAxis ) RadarCategoryAxis.__proto__ = CategoryAxis; - RadarCategoryAxis.prototype = Object.create( CategoryAxis && CategoryAxis.prototype ); - RadarCategoryAxis.prototype.constructor = RadarCategoryAxis; - - RadarCategoryAxis.prototype.range = function range () { - return { min: 0, max: this.options.categories.length }; - }; - - RadarCategoryAxis.prototype.reflow = function reflow (box) { - this.box = box; - this.reflowLabels(); - }; - - RadarCategoryAxis.prototype.lineBox = function lineBox () { - return this.box; - }; - - RadarCategoryAxis.prototype.reflowLabels = function reflowLabels () { - var this$1 = this; - - var ref = this; - var labels = ref.labels; - var labelOptions = ref.options.labels; - var skip = labelOptions.skip || 0; - var step = labelOptions.step || 1; - var measureBox = new __WEBPACK_IMPORTED_MODULE_5__box__["a" /* default */](); - - for (var i = 0; i < labels.length; i++) { - labels[i].reflow(measureBox); - var labelBox = labels[i].box; - - labels[i].reflow(this$1.getSlot(skip + i * step).adjacentBox( - 0, labelBox.width(), labelBox.height() - )); - } - }; - - RadarCategoryAxis.prototype.intervals = function intervals (size, skipOption, stepOption, skipAngles) { - if ( skipAngles === void 0 ) skipAngles = false; - - var options = this.options; - var categories = options.categories.length; - var divCount = categories / size || 1; - var divAngle = 360 / divCount; - var skip = skipOption || 0; - var step = stepOption || 1; - var divs = []; - var angle = 0; - - for (var i = skip; i < divCount; i += step) { - if (options.reverse) { - angle = 360 - i * divAngle; - } else { - angle = i * divAngle; - } - - angle = Object(__WEBPACK_IMPORTED_MODULE_7__common__["L" /* round */])(angle, __WEBPACK_IMPORTED_MODULE_6__common_constants__["g" /* COORD_PRECISION */]) % 360; - - if (!(skipAngles && Object(__WEBPACK_IMPORTED_MODULE_7__common__["x" /* inArray */])(angle, skipAngles))) { - divs.push(angle); - } - } - - return divs; - }; - - RadarCategoryAxis.prototype.majorIntervals = function majorIntervals () { - return this.intervals(1); - }; - - RadarCategoryAxis.prototype.minorIntervals = function minorIntervals () { - return this.intervals(0.5); - }; - - RadarCategoryAxis.prototype.intervalAngle = function intervalAngle (interval) { - return (360 + interval + this.options.startAngle) % 360; - }; - - RadarCategoryAxis.prototype.majorAngles = function majorAngles () { - var this$1 = this; - - return Object(__WEBPACK_IMPORTED_MODULE_7__common__["G" /* map */])(this.majorIntervals(), function (interval) { return this$1.intervalAngle(interval); }); - }; - - RadarCategoryAxis.prototype.createLine = function createLine () { - return []; - }; - - RadarCategoryAxis.prototype.majorGridLineAngles = function majorGridLineAngles (altAxis) { - var majorGridLines = this.options.majorGridLines; - return this.gridLineAngles(altAxis, 1, majorGridLines.skip, majorGridLines.step); - }; - - RadarCategoryAxis.prototype.minorGridLineAngles = function minorGridLineAngles (altAxis, skipMajor) { - var ref = this.options; - var minorGridLines = ref.minorGridLines; - var majorGridLines = ref.majorGridLines; - var majorGridLineAngles = skipMajor ? this.intervals(1, majorGridLines.skip, majorGridLines.step) : null; - - return this.gridLineAngles(altAxis, 0.5, minorGridLines.skip, minorGridLines.step, majorGridLineAngles); - }; - - RadarCategoryAxis.prototype.radiusCallback = function radiusCallback (radius, altAxis, skipMajor) { - if (altAxis.options.type !== __WEBPACK_IMPORTED_MODULE_6__common_constants__["a" /* ARC */]) { - var minorAngle = Object(__WEBPACK_IMPORTED_MODULE_7__common__["J" /* rad */])(360 / (this.options.categories.length * 2)); - var minorRadius = Math.cos(minorAngle) * radius; - var majorAngles = this.majorAngles(); - - var radiusCallback = function(angle) { - if (!skipMajor && Object(__WEBPACK_IMPORTED_MODULE_7__common__["x" /* inArray */])(angle, majorAngles)) { - return radius; - } - - return minorRadius; - }; - return radiusCallback; - } - }; - - RadarCategoryAxis.prototype.createPlotBands = function createPlotBands () { - var this$1 = this; - - var plotBands = this.options.plotBands || []; - - var group = this._plotbandGroup = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group({ - zIndex: -1 - }); - - for (var i = 0; i < plotBands.length; i++) { - var band = plotBands[i]; - var slot = this$1.plotBandSlot(band); - var singleSlot = this$1.getSlot(band.from); - - var head = band.from - Math.floor(band.from); - slot.startAngle += head * singleSlot.angle; - - var tail = Math.ceil(band.to) - band.to; - slot.angle -= (tail + head) * singleSlot.angle; - - var ring = __WEBPACK_IMPORTED_MODULE_3__shape_builder__["a" /* default */].current.createRing(slot, { - fill: { - color: band.color, - opacity: band.opacity - }, - stroke: { - opacity: band.opacity - } - }); - group.append(ring); - } - - this.appendVisual(group); - }; - - RadarCategoryAxis.prototype.plotBandSlot = function plotBandSlot (band) { - return this.getSlot(band.from, band.to - 1); - }; - - RadarCategoryAxis.prototype.getSlot = function getSlot (from, to) { - var options = this.options; - var justified = options.justified; - var box = this.box; - var divs = this.majorAngles(); - var totalDivs = divs.length; - var slotAngle = 360 / totalDivs; - var fromValue = from; - - if (options.reverse && !justified) { - fromValue = (fromValue + 1) % totalDivs; - } - - fromValue = Object(__WEBPACK_IMPORTED_MODULE_7__common__["F" /* limitValue */])(Math.floor(fromValue), 0, totalDivs - 1); - var slotStart = divs[fromValue]; - - if (justified) { - slotStart = slotStart - slotAngle / 2; - - if (slotStart < 0) { - slotStart += 360; - } - } - - var toValue = Object(__WEBPACK_IMPORTED_MODULE_7__common__["F" /* limitValue */])(Math.ceil(to || fromValue), fromValue, totalDivs - 1); - var slots = toValue - fromValue + 1; - var angle = slotAngle * slots; - - return new __WEBPACK_IMPORTED_MODULE_4__ring__["a" /* default */](box.center(), 0, box.height() / 2, slotStart, angle); - }; - - RadarCategoryAxis.prototype.slot = function slot (from, to) { - var slot = this.getSlot(from, to); - var startAngle = slot.startAngle + 180; - var endAngle = startAngle + slot.angle; - - return new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Arc([ slot.center.x, slot.center.y ], { - startAngle: startAngle, - endAngle: endAngle, - radiusX: slot.radius, - radiusY: slot.radius - }); - }; - - RadarCategoryAxis.prototype.pointCategoryIndex = function pointCategoryIndex (point) { - var this$1 = this; - - var length = this.options.categories.length; - var index = null; - - for (var i = 0; i < length; i++) { - var slot = this$1.getSlot(i); - if (slot.containsPoint(point)) { - index = i; - break; - } - } - - return index; - }; - - return RadarCategoryAxis; -}(__WEBPACK_IMPORTED_MODULE_2__category_axis__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_7__common__["M" /* setDefaultOptions */])(RadarCategoryAxis, { - startAngle: 90, - labels: { - margin: Object(__WEBPACK_IMPORTED_MODULE_7__common__["s" /* getSpacing */])(10) - }, - majorGridLines: { - visible: true - }, - justified: true -}); -Object(__WEBPACK_IMPORTED_MODULE_7__common__["k" /* deepExtend */])(RadarCategoryAxis.prototype, __WEBPACK_IMPORTED_MODULE_1__mixins_grid_lines_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (RadarCategoryAxis); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/radar-logarithmic-axis.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__logarithmic_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/logarithmic-axis.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_radar_numeric_axis_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/mixins/radar-numeric-axis-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var RadarLogarithmicAxis = (function (LogarithmicAxis) { - function RadarLogarithmicAxis () { - LogarithmicAxis.apply(this, arguments); - } - - if ( LogarithmicAxis ) RadarLogarithmicAxis.__proto__ = LogarithmicAxis; - RadarLogarithmicAxis.prototype = Object.create( LogarithmicAxis && LogarithmicAxis.prototype ); - RadarLogarithmicAxis.prototype.constructor = RadarLogarithmicAxis; - - RadarLogarithmicAxis.prototype.radarMajorGridLinePositions = function radarMajorGridLinePositions () { - var positions = []; - - this.traverseMajorTicksPositions(function(position) { - positions.push(position); - }, this.options.majorGridLines); - - return positions; - }; - - RadarLogarithmicAxis.prototype.radarMinorGridLinePositions = function radarMinorGridLinePositions () { - var positions = []; - - this.traverseMinorTicksPositions(function(position) { - positions.push(position); - }, this.options.minorGridLines); - - return positions; - }; - - RadarLogarithmicAxis.prototype.axisType = function axisType () { - return LogarithmicAxis; - }; - - return RadarLogarithmicAxis; -}(__WEBPACK_IMPORTED_MODULE_0__logarithmic_axis__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])(RadarLogarithmicAxis.prototype, __WEBPACK_IMPORTED_MODULE_1__mixins_radar_numeric_axis_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (RadarLogarithmicAxis); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/radar-numeric-axis.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__numeric_axis__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/numeric-axis.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_radar_numeric_axis_mixin__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/mixins/radar-numeric-axis-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var RadarNumericAxis = (function (NumericAxis) { - function RadarNumericAxis () { - NumericAxis.apply(this, arguments); - } - - if ( NumericAxis ) RadarNumericAxis.__proto__ = NumericAxis; - RadarNumericAxis.prototype = Object.create( NumericAxis && NumericAxis.prototype ); - RadarNumericAxis.prototype.constructor = RadarNumericAxis; - - RadarNumericAxis.prototype.radarMajorGridLinePositions = function radarMajorGridLinePositions () { - return this.getTickPositions(this.options.majorUnit); - }; - - RadarNumericAxis.prototype.radarMinorGridLinePositions = function radarMinorGridLinePositions () { - var options = this.options; - var minorSkipStep = 0; - - if (options.majorGridLines.visible) { - minorSkipStep = options.majorUnit; - } - return this.getTickPositions(options.minorUnit, minorSkipStep); - }; - - RadarNumericAxis.prototype.axisType = function axisType () { - return NumericAxis; - }; - - return RadarNumericAxis; -}(__WEBPACK_IMPORTED_MODULE_0__numeric_axis__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])(RadarNumericAxis.prototype, __WEBPACK_IMPORTED_MODULE_1__mixins_radar_numeric_axis_mixin__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (RadarNumericAxis); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/ring.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__point__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - -var Ring = (function (Class) { - function Ring(center, innerRadius, radius, startAngle, angle) { - Class.call(this); - - this.center = center; - this.innerRadius = innerRadius; - this.radius = radius; - this.startAngle = startAngle; - this.angle = angle; - } - - if ( Class ) Ring.__proto__ = Class; - Ring.prototype = Object.create( Class && Class.prototype ); - Ring.prototype.constructor = Ring; - - Ring.prototype.clone = function clone () { - return new Ring(this.center, this.innerRadius, this.radius, this.startAngle, this.angle); - }; - - Ring.prototype.middle = function middle () { - return this.startAngle + this.angle / 2; - }; - - Ring.prototype.setRadius = function setRadius (newRadius, innerRadius) { - if (innerRadius) { - this.innerRadius = newRadius; - } else { - this.radius = newRadius; - } - - return this; - }; - - // TODO: Remove and replace with Point.onCircle - Ring.prototype.point = function point (angle, innerRadius) { - var radianAngle = Object(__WEBPACK_IMPORTED_MODULE_3__common__["J" /* rad */])(angle); - var ax = Math.cos(radianAngle); - var ay = Math.sin(radianAngle); - var radius = innerRadius ? this.innerRadius : this.radius; - var x = Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])(this.center.x - (ax * radius), __WEBPACK_IMPORTED_MODULE_2__common_constants__["g" /* COORD_PRECISION */]); - var y = Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])(this.center.y - (ay * radius), __WEBPACK_IMPORTED_MODULE_2__common_constants__["g" /* COORD_PRECISION */]); - - return new __WEBPACK_IMPORTED_MODULE_1__point__["a" /* default */](x, y); - }; - - Ring.prototype.adjacentBox = function adjacentBox (distance, width, height) { - var sector = this.clone().expand(distance); - var midAndle = sector.middle(); - var midPoint = sector.point(midAndle); - var hw = width / 2; - var hh = height / 2; - var sa = Math.sin(Object(__WEBPACK_IMPORTED_MODULE_3__common__["J" /* rad */])(midAndle)); - var ca = Math.cos(Object(__WEBPACK_IMPORTED_MODULE_3__common__["J" /* rad */])(midAndle)); - var x = midPoint.x - hw; - var y = midPoint.y - hh; - - if (Math.abs(sa) < 0.9) { - x += hw * -ca / Math.abs(ca); - } - - if (Math.abs(ca) < 0.9) { - y += hh * -sa / Math.abs(sa); - } - - return new __WEBPACK_IMPORTED_MODULE_0__box__["a" /* default */](x, y, x + width, y + height); - }; - - Ring.prototype.containsPoint = function containsPoint (p) { - var center = this.center; - var innerRadius = this.innerRadius; - var radius = this.radius; - var startAngle = this.startAngle; - var endAngle = this.startAngle + this.angle; - var dx = p.x - center.x; - var dy = p.y - center.y; - var vector = new __WEBPACK_IMPORTED_MODULE_1__point__["a" /* default */](dx, dy); - var startPoint = this.point(startAngle); - var startVector = new __WEBPACK_IMPORTED_MODULE_1__point__["a" /* default */](startPoint.x - center.x, startPoint.y - center.y); - var endPoint = this.point(endAngle); - var endVector = new __WEBPACK_IMPORTED_MODULE_1__point__["a" /* default */](endPoint.x - center.x, endPoint.y - center.y); - var dist = Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])(dx * dx + dy * dy, __WEBPACK_IMPORTED_MODULE_2__common_constants__["g" /* COORD_PRECISION */]); - - return (startVector.equals(vector) || Object(__WEBPACK_IMPORTED_MODULE_3__common__["i" /* clockwise */])(startVector, vector)) && - !Object(__WEBPACK_IMPORTED_MODULE_3__common__["i" /* clockwise */])(endVector, vector) && - dist >= innerRadius * innerRadius && dist <= radius * radius; - }; - - Ring.prototype.getBBox = function getBBox () { - var this$1 = this; - - var box = new __WEBPACK_IMPORTED_MODULE_0__box__["a" /* default */](__WEBPACK_IMPORTED_MODULE_2__common_constants__["s" /* MAX_VALUE */], __WEBPACK_IMPORTED_MODULE_2__common_constants__["s" /* MAX_VALUE */], __WEBPACK_IMPORTED_MODULE_2__common_constants__["t" /* MIN_VALUE */], __WEBPACK_IMPORTED_MODULE_2__common_constants__["t" /* MIN_VALUE */]); - var startAngle = Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])(this.startAngle % 360); - var endAngle = Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])((startAngle + this.angle) % 360); - var innerRadius = this.innerRadius; - var allAngles = [ 0, 90, 180, 270, startAngle, endAngle ].sort(numericComparer); - var startAngleIndex = allAngles.indexOf(startAngle); - var endAngleIndex = allAngles.indexOf(endAngle); - var angles; - - if (startAngle === endAngle) { - angles = allAngles; - } else { - if (startAngleIndex < endAngleIndex) { - angles = allAngles.slice(startAngleIndex, endAngleIndex + 1); - } else { - angles = [].concat( - allAngles.slice(0, endAngleIndex + 1), - allAngles.slice(startAngleIndex, allAngles.length) - ); - } - } - - for (var i = 0; i < angles.length; i++) { - var point = this$1.point(angles[i]); - box.wrapPoint(point); - box.wrapPoint(point, innerRadius); - } - - if (!innerRadius) { - box.wrapPoint(this.center); - } - - return box; - }; - - Ring.prototype.expand = function expand (value) { - this.radius += value; - return this; - }; - - return Ring; -}(__WEBPACK_IMPORTED_MODULE_3__common__["a" /* Class */])); - -function numericComparer(a, b) { - return a - b; -} - -/* harmony default export */ __webpack_exports__["a"] = (Ring); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/root-element.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__chart_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/chart-element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__gradients__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/gradients.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_box_diff__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/box-diff.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - - - - -var RootElement = (function (ChartElement) { - function RootElement(options) { - ChartElement.call(this, options); - - var rootOptions = this.options; - rootOptions.width = parseInt(rootOptions.width, 10); - rootOptions.height = parseInt(rootOptions.height, 10); - - this.gradients = {}; - } - - if ( ChartElement ) RootElement.__proto__ = ChartElement; - RootElement.prototype = Object.create( ChartElement && ChartElement.prototype ); - RootElement.prototype.constructor = RootElement; - - RootElement.prototype.reflow = function reflow () { - var ref = this; - var options = ref.options; - var children = ref.children; - var currentBox = new __WEBPACK_IMPORTED_MODULE_3__box__["a" /* default */](0, 0, options.width, options.height); - - this.box = currentBox.unpad(options.margin); - - for (var i = 0; i < children.length; i++) { - children[i].reflow(currentBox); - currentBox = Object(__WEBPACK_IMPORTED_MODULE_4__utils_box_diff__["a" /* default */])(currentBox, children[i].box) || new __WEBPACK_IMPORTED_MODULE_3__box__["a" /* default */](); - } - }; - - RootElement.prototype.createVisual = function createVisual () { - this.visual = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group(); - this.createBackground(); - }; - - RootElement.prototype.createBackground = function createBackground () { - var options = this.options; - var border = options.border || {}; - var box = this.box.clone().pad(options.margin).unpad(border.width); - - var background = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(box.toRect(), { - stroke: { - color: border.width ? border.color : "", - width: border.width, - dashType: border.dashType - }, - fill: { - color: options.background, - opacity: options.opacity - }, - zIndex: -10 - }); - - this.visual.append(background); - }; - - RootElement.prototype.getRoot = function getRoot () { - return this; - }; - - RootElement.prototype.createGradient = function createGradient (options) { - var gradients = this.gradients; - var hashCode = Object(__WEBPACK_IMPORTED_MODULE_6__common__["I" /* objectKey */])(options); - var gradient = __WEBPACK_IMPORTED_MODULE_2__gradients__["a" /* default */][options.gradient]; - var drawingGradient; - - if (gradients[hashCode]) { - drawingGradient = gradients[hashCode]; - } else { - var gradientOptions = Object.assign({}, gradient, options); - if (gradient.type === "linear") { - drawingGradient = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].LinearGradient(gradientOptions); - } else { - if (options.innerRadius) { - gradientOptions.stops = innerRadialStops(gradientOptions); - } - drawingGradient = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].RadialGradient(gradientOptions); - drawingGradient.supportVML = gradient.supportVML !== false; - } - gradients[hashCode] = drawingGradient; - } - - return drawingGradient; - }; - - RootElement.prototype.cleanGradients = function cleanGradients () { - var gradients = this.gradients; - for (var hashCode in gradients) { - gradients[hashCode]._observers = [];//add clear observers method in drawing ObserversMixin - } - }; - - RootElement.prototype.size = function size () { - var options = this.options; - return new __WEBPACK_IMPORTED_MODULE_3__box__["a" /* default */](0, 0, options.width, options.height); - }; - - return RootElement; -}(__WEBPACK_IMPORTED_MODULE_1__chart_element__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_6__common__["M" /* setDefaultOptions */])(RootElement, { - width: __WEBPACK_IMPORTED_MODULE_5__common_constants__["m" /* DEFAULT_WIDTH */], - height: __WEBPACK_IMPORTED_MODULE_5__common_constants__["k" /* DEFAULT_HEIGHT */], - background: __WEBPACK_IMPORTED_MODULE_5__common_constants__["E" /* WHITE */], - border: { - color: __WEBPACK_IMPORTED_MODULE_5__common_constants__["c" /* BLACK */], - width: 0 - }, - margin: Object(__WEBPACK_IMPORTED_MODULE_6__common__["s" /* getSpacing */])(5), - zIndex: -2 -}); - -function innerRadialStops(options) { - var stops = options.stops; - var usedSpace = ((options.innerRadius / options.radius) * 100); - var length = stops.length; - var currentStops = []; - - for (var i = 0; i < length; i++) { - var currentStop = Object.assign({}, stops[i]); - currentStop.offset = (currentStop.offset * (100 - usedSpace) + usedSpace) / 100; - currentStops.push(currentStop); - } - - return currentStops; -} - -/* harmony default export */ __webpack_exports__["a"] = (RootElement); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/sector.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ring__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/ring.js"); - - -var Sector = (function (Ring) { - function Sector(center, radius, startAngle, angle) { - Ring.call(this, center, 0, radius, startAngle, angle); - } - - if ( Ring ) Sector.__proto__ = Ring; - Sector.prototype = Object.create( Ring && Ring.prototype ); - Sector.prototype.constructor = Sector; - - Sector.prototype.expand = function expand (value) { - return Ring.prototype.expand.call(this, value); - }; - - Sector.prototype.clone = function clone () { - return new Sector(this.center, this.radius, this.startAngle, this.angle); - }; - - Sector.prototype.setRadius = function setRadius (newRadius) { - this.radius = newRadius; - - return this; - }; - - return Sector; -}(__WEBPACK_IMPORTED_MODULE_0__ring__["a" /* default */])); - -/* unused harmony default export */ var _unused_webpack_default_export = (Sector); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/shape-builder.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - -var DIRECTION_ANGLE = 0.001; //any value that will make the endAngle bigger than the start angle will work here. - -var ShapeBuilder = (function (Class) { - function ShapeBuilder () { - Class.apply(this, arguments); - } - - if ( Class ) ShapeBuilder.__proto__ = Class; - ShapeBuilder.prototype = Object.create( Class && Class.prototype ); - ShapeBuilder.prototype.constructor = ShapeBuilder; - - ShapeBuilder.prototype.createRing = function createRing (sector, options) { - var startAngle = sector.startAngle + 180; - var endAngle = sector.angle + startAngle; - - //required in order to avoid reversing the arc direction in cases like 0.000000000000001 + 100 === 100 - if (sector.angle > 0 && startAngle === endAngle) { - endAngle += DIRECTION_ANGLE; - } - - var center = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(sector.center.x, sector.center.y); - var radius = Math.max(sector.radius, 0); - var innerRadius = Math.max(sector.innerRadius, 0); - var arc = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Arc(center, { - startAngle: startAngle, - endAngle: endAngle, - radiusX: radius, - radiusY: radius - }); - var path = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromArc(arc, options).close(); - - if (innerRadius) { - arc.radiusX = arc.radiusY = innerRadius; - var innerEnd = arc.pointAt(endAngle); - path.lineTo(innerEnd.x, innerEnd.y); - path.arc(endAngle, startAngle, innerRadius, innerRadius, true); - } else { - path.lineTo(center.x, center.y); - } - - return path; - }; - - return ShapeBuilder; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -ShapeBuilder.current = new ShapeBuilder(); - -/* harmony default export */ __webpack_exports__["a"] = (ShapeBuilder); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/shape-element.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__box_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box-element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - -var ShapeElement = (function (BoxElement) { - function ShapeElement(options, pointData) { - BoxElement.call(this, options); - - this.pointData = pointData; - } - - if ( BoxElement ) ShapeElement.__proto__ = BoxElement; - ShapeElement.prototype = Object.create( BoxElement && BoxElement.prototype ); - ShapeElement.prototype.constructor = ShapeElement; - - ShapeElement.prototype.getElement = function getElement () { - var ref = this; - var options = ref.options; - var box = ref.paddingBox; - var type = options.type; - var rotation = options.rotation; - var center = box.center(); - var halfWidth = box.width() / 2; - - if (!options.visible || !this.hasBox()) { - return null; - } - - var style = this.visualStyle(); - var element; - - if (type === __WEBPACK_IMPORTED_MODULE_2__common_constants__["f" /* CIRCLE */]) { - element = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Circle( - new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Circle([ - Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])(box.x1 + halfWidth, __WEBPACK_IMPORTED_MODULE_2__common_constants__["g" /* COORD_PRECISION */]), - Object(__WEBPACK_IMPORTED_MODULE_3__common__["L" /* round */])(box.y1 + box.height() / 2, __WEBPACK_IMPORTED_MODULE_2__common_constants__["g" /* COORD_PRECISION */]) - ], halfWidth), - style - ); - } else if (type === __WEBPACK_IMPORTED_MODULE_2__common_constants__["C" /* TRIANGLE */]) { - element = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromPoints([ - [ box.x1 + halfWidth, box.y1 ], - [ box.x1, box.y2 ], - [ box.x2, box.y2 ] - ], style).close(); - } else if (type === __WEBPACK_IMPORTED_MODULE_2__common_constants__["h" /* CROSS */]) { - element = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].MultiPath(style); - - element.moveTo(box.x1, box.y1).lineTo(box.x2, box.y2); - element.moveTo(box.x1, box.y2).lineTo(box.x2, box.y1); - } else { - element = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(box.toRect(), style); - } - - if (rotation) { - element.transform(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform() - .rotate(-rotation, [ center.x, center.y ]) - ); - } - - element.options.zIndex = options.zIndex; - return element; - }; - - ShapeElement.prototype.createElement = function createElement () { - var this$1 = this; - - var customVisual = this.options.visual; - var pointData = this.pointData || {}; - var visual; - - if (customVisual) { - visual = customVisual({ - value: pointData.value, - dataItem: pointData.dataItem, - sender: this.getSender(), - series: pointData.series, - category: pointData.category, - rect: this.paddingBox.toRect(), - options: this.visualOptions(), - createVisual: function () { return this$1.getElement(); } - }); - } else { - visual = this.getElement(); - } - - return visual; - }; - - ShapeElement.prototype.visualOptions = function visualOptions () { - var options = this.options; - return { - background: options.background, - border: options.border, - margin: options.margin, - padding: options.padding, - type: options.type, - size: options.width, - visible: options.visible - }; - }; - - ShapeElement.prototype.createVisual = function createVisual () { - this.visual = this.createElement(); - }; - - return ShapeElement; -}(__WEBPACK_IMPORTED_MODULE_1__box_element__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_3__common__["M" /* setDefaultOptions */])(ShapeElement, { - type: __WEBPACK_IMPORTED_MODULE_2__common_constants__["f" /* CIRCLE */], - align: __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */], - vAlign: __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */] -}); - -/* harmony default export */ __webpack_exports__["a"] = (ShapeElement); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/text-box.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__box_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box-element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__float_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/float-element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__text__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/text.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_rect_to_box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/utils/rect-to-box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); - - - - - - - - - - - - -var ROWS_SPLIT_REGEX = /\n/m; - -var TextBox = (function (BoxElement) { - function TextBox(content, options) { - BoxElement.call(this, options); - this.content = content; - - this._initContainer(); - if (this.options._autoReflow !== false) { - this.reflow(new __WEBPACK_IMPORTED_MODULE_4__box__["a" /* default */]()); - } - } - - if ( BoxElement ) TextBox.__proto__ = BoxElement; - TextBox.prototype = Object.create( BoxElement && BoxElement.prototype ); - TextBox.prototype.constructor = TextBox; - - TextBox.prototype._initContainer = function _initContainer () { - var options = this.options; - var rows = String(this.content).split(ROWS_SPLIT_REGEX); - var floatElement = new __WEBPACK_IMPORTED_MODULE_2__float_element__["a" /* default */]({ vertical: true, align: options.align, wrap: false }); - var textOptions = Object(__WEBPACK_IMPORTED_MODULE_6__common__["k" /* deepExtend */])({ }, options, { opacity: 1, animation: null }); - - this.container = floatElement; - this.append(floatElement); - - for (var rowIdx = 0; rowIdx < rows.length; rowIdx++) { - var text = new __WEBPACK_IMPORTED_MODULE_3__text__["a" /* default */](rows[rowIdx].trim(), textOptions); - floatElement.append(text); - } - }; - - TextBox.prototype.reflow = function reflow (targetBox) { - var options = this.options; - var visualFn = options.visual; - this.container.options.align = options.align; - - if (visualFn && !this._boxReflow) { - var visualBox = targetBox; - if (!visualBox.hasSize()) { - this._boxReflow = true; - this.reflow(visualBox); - this._boxReflow = false; - visualBox = this.box; - } - var visual = this.visual = visualFn(this.visualContext(visualBox)); - - if (visual) { - visualBox = Object(__WEBPACK_IMPORTED_MODULE_5__utils_rect_to_box__["a" /* default */])(visual.clippedBBox() || new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect()); - - visual.options.zIndex = options.zIndex; - } - - this.box = this.contentBox = this.paddingBox = visualBox; - } else { - BoxElement.prototype.reflow.call(this, targetBox); - - if (options.rotation) { - var margin = Object(__WEBPACK_IMPORTED_MODULE_6__common__["s" /* getSpacing */])(options.margin); - var box = this.box.unpad(margin); - - this.targetBox = targetBox; - this.normalBox = box.clone(); - - box = this.rotate(); - box.translate(margin.left - margin.right, margin.top - margin.bottom); - - this.rotatedBox = box.clone(); - - box.pad(margin); - } - } - }; - - TextBox.prototype.createVisual = function createVisual () { - var options = this.options; - - if (!options.visible) { - return; - } - - this.visual = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group({ - transform: this.rotationTransform(), - zIndex: options.zIndex, - noclip: options.noclip - }); - - if (this.hasBox()) { - var box = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path.fromRect(this.paddingBox.toRect(), this.visualStyle()); - this.visual.append(box); - } - }; - - TextBox.prototype.renderVisual = function renderVisual () { - if (this.options.visual) { - var visual = this.visual; - if (visual && !Object(__WEBPACK_IMPORTED_MODULE_6__common__["l" /* defined */])(visual.options.noclip)) { - visual.options.noclip = this.options.noclip; - } - this.addVisual(); - this.createAnimation(); - } else { - BoxElement.prototype.renderVisual.call(this); - } - }; - - TextBox.prototype.visualOptions = function visualOptions () { - var options = this.options; - return { - background: options.background, - border: options.border, - color: options.color, - font: options.font, - margin: options.margin, - padding: options.padding, - visible: options.visible - }; - }; - - TextBox.prototype.visualContext = function visualContext (targetBox) { - var this$1 = this; - - - return { - text: this.content, - rect: targetBox.toRect(), - sender: this.getSender(), - options: this.visualOptions(), - createVisual: function () { - this$1._boxReflow = true; - this$1.reflow(targetBox); - this$1._boxReflow = false; - return this$1.getDefaultVisual(); - } - }; - }; - - TextBox.prototype.getDefaultVisual = function getDefaultVisual () { - this.createVisual(); - this.renderChildren(); - var visual = this.visual; - delete this.visual; - return visual; - }; - - TextBox.prototype.rotate = function rotate () { - var options = this.options; - this.box.rotate(options.rotation); - this.align(this.targetBox, __WEBPACK_IMPORTED_MODULE_7__common_constants__["G" /* X */], options.align); - this.align(this.targetBox, __WEBPACK_IMPORTED_MODULE_7__common_constants__["H" /* Y */], options.vAlign); - return this.box; - }; - - TextBox.prototype.rotationTransform = function rotationTransform () { - var rotation = this.options.rotation; - if (!rotation) { - return null; - } - - var ref = this.normalBox.center(); - var cx = ref.x; - var cy = ref.y; - var boxCenter = this.rotatedBox.center(); - - return __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform() - .translate(boxCenter.x - cx, boxCenter.y - cy) - .rotate(rotation, [ cx, cy ]); - }; - - return TextBox; -}(__WEBPACK_IMPORTED_MODULE_1__box_element__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (TextBox); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/text.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__chart_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/chart-element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - - -var DrawingText = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Text; - -var Text = (function (ChartElement) { - function Text(content, options) { - ChartElement.call(this, options); - - this.content = content; - - // Calculate size - this.reflow(new __WEBPACK_IMPORTED_MODULE_2__box__["a" /* default */]()); - } - - if ( ChartElement ) Text.__proto__ = ChartElement; - Text.prototype = Object.create( ChartElement && ChartElement.prototype ); - Text.prototype.constructor = Text; - - Text.prototype.reflow = function reflow (targetBox) { - var options = this.options; - var size = options.size = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].util.measureText(this.content, { font: options.font }); - - this.baseline = size.baseline; - - this.box = new __WEBPACK_IMPORTED_MODULE_2__box__["a" /* default */](targetBox.x1, targetBox.y1, - targetBox.x1 + size.width, targetBox.y1 + size.height); - }; - - Text.prototype.createVisual = function createVisual () { - var ref = this.options; - var font = ref.font; - var color = ref.color; - var opacity = ref.opacity; - var cursor = ref.cursor; - - this.visual = new DrawingText(this.content, this.box.toRect().topLeft(), { - font: font, - fill: { color: color, opacity: opacity }, - cursor: cursor - }); - }; - - return Text; -}(__WEBPACK_IMPORTED_MODULE_1__chart_element__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_4__common__["M" /* setDefaultOptions */])(Text, { - font: __WEBPACK_IMPORTED_MODULE_3__common_constants__["j" /* DEFAULT_FONT */], - color: __WEBPACK_IMPORTED_MODULE_3__common_constants__["c" /* BLACK */] -}); - -/* harmony default export */ __webpack_exports__["a"] = (Text); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/title.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__chart_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/chart-element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__text_box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/text-box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - -var Title = (function (ChartElement) { - function Title(options) { - ChartElement.call(this, options); - - this.append( - new __WEBPACK_IMPORTED_MODULE_1__text_box__["a" /* default */](this.options.text, Object.assign({}, this.options, { - vAlign: this.options.position - })) - ); - } - - if ( ChartElement ) Title.__proto__ = ChartElement; - Title.prototype = Object.create( ChartElement && ChartElement.prototype ); - Title.prototype.constructor = Title; - - Title.prototype.reflow = function reflow (targetBox) { - ChartElement.prototype.reflow.call(this, targetBox); - this.box.snapTo(targetBox, __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]); - }; - - Title.buildTitle = function buildTitle (options, parent, defaultOptions) { - var titleOptions = options; - - if (typeof options === "string") { - titleOptions = { text: options }; - } - - titleOptions = Object.assign({ visible: true }, defaultOptions, titleOptions); - - var title; - if (titleOptions && titleOptions.visible && titleOptions.text) { - title = new Title(titleOptions); - parent.append(title); - } - - return title; - }; - - return Title; -}(__WEBPACK_IMPORTED_MODULE_0__chart_element__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_3__common__["M" /* setDefaultOptions */])(Title, { - color: __WEBPACK_IMPORTED_MODULE_2__common_constants__["c" /* BLACK */], - position: __WEBPACK_IMPORTED_MODULE_2__common_constants__["B" /* TOP */], - align: __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* CENTER */], - margin: Object(__WEBPACK_IMPORTED_MODULE_3__common__["s" /* getSpacing */])(5), - padding: Object(__WEBPACK_IMPORTED_MODULE_3__common__["s" /* getSpacing */])(5) -}); - -/* harmony default export */ __webpack_exports__["a"] = (Title); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/utils/auto-axis-max.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = autoAxisMax; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/constants.js"); - - -function autoAxisMax(min, max, narrow) { - if (!min && !max) { - return 1; - } - - var axisMax; - - if (min <= 0 && max <= 0) { - var maxValue = min === max ? 0 : max; - - var diff = Math.abs((maxValue - min) / maxValue); - if (narrow === false || (!narrow && diff > __WEBPACK_IMPORTED_MODULE_0__constants__["c" /* ZERO_THRESHOLD */])) { - return 0; - } - - axisMax = Math.min(0, maxValue - ((min - maxValue) / 2)); - } else { - axisMax = max; - } - - return axisMax; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/utils/auto-axis-min.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = autoAxisMin; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/constants.js"); - - -function autoAxisMin(min, max, narrow) { - if (!min && !max) { - return 0; - } - - var axisMin; - - if (min >= 0 && max >= 0) { - var minValue = min === max ? 0 : min; - - var diff = (max - minValue) / max; - if (narrow === false || (!narrow && diff > __WEBPACK_IMPORTED_MODULE_0__constants__["c" /* ZERO_THRESHOLD */])) { - return 0; - } - - axisMin = Math.max(0, minValue - ((max - minValue) / 2)); - } else { - axisMin = min; - } - - return axisMin; -} - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/utils/auto-major-unit.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = autoMajorUnit; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - -function autoMajorUnit(min, max) { - var diff = Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])(max - min, __WEBPACK_IMPORTED_MODULE_0__common_constants__["l" /* DEFAULT_PRECISION */] - 1); - - if (diff === 0) { - if (max === 0) { - return 0.1; - } - - diff = Math.abs(max); - } - - var scale = Math.pow(10, Math.floor(Math.log(diff) / Math.log(10))); - var relativeValue = Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])((diff / scale), __WEBPACK_IMPORTED_MODULE_0__common_constants__["l" /* DEFAULT_PRECISION */]); - var scaleMultiplier = 1; - - if (relativeValue < 1.904762) { - scaleMultiplier = 0.2; - } else if (relativeValue < 4.761904) { - scaleMultiplier = 0.5; - } else if (relativeValue < 9.523809) { - scaleMultiplier = 1; - } else { - scaleMultiplier = 2; - } - - return Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])(scale * scaleMultiplier, __WEBPACK_IMPORTED_MODULE_0__common_constants__["l" /* DEFAULT_PRECISION */]); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/utils/box-diff.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = boxDiff; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - -function boxDiff(r, s) { - if (r.x1 === s.x1 && r.y1 === s.y1 && r.x2 === s.x2 && r.y2 === s.y2) { - return s; - } - - var a = Math.min(r.x1, s.x1); - var b = Math.max(r.x1, s.x1); - var c = Math.min(r.x2, s.x2); - var d = Math.max(r.x2, s.x2); - var e = Math.min(r.y1, s.y1); - var f = Math.max(r.y1, s.y1); - var g = Math.min(r.y2, s.y2); - var h = Math.max(r.y2, s.y2); - var boxes = []; - - // X = intersection, 0-7 = possible difference areas - // h +-+-+-+ - // . |5|6|7| - // g +-+-+-+ - // . |3|X|4| - // f +-+-+-+ - // . |0|1|2| - // e +-+-+-+ - // . a b c d - - // we'll always have rectangles 1, 3, 4 and 6 - boxes[0] = new __WEBPACK_IMPORTED_MODULE_0__box__["a" /* default */](b, e, c, f); - boxes[1] = new __WEBPACK_IMPORTED_MODULE_0__box__["a" /* default */](a, f, b, g); - boxes[2] = new __WEBPACK_IMPORTED_MODULE_0__box__["a" /* default */](c, f, d, g); - boxes[3] = new __WEBPACK_IMPORTED_MODULE_0__box__["a" /* default */](b, g, c, h); - - // decide which corners - if (r.x1 === a && r.y1 === e || s.x1 === a && s.y1 === e) { // corners 0 and 7 - boxes[4] = new __WEBPACK_IMPORTED_MODULE_0__box__["a" /* default */](a, e, b, f); - boxes[5] = new __WEBPACK_IMPORTED_MODULE_0__box__["a" /* default */](c, g, d, h); - } else { // corners 2 and 5 - boxes[4] = new __WEBPACK_IMPORTED_MODULE_0__box__["a" /* default */](c, e, d, f); - boxes[5] = new __WEBPACK_IMPORTED_MODULE_0__box__["a" /* default */](a, g, b, h); - } - - return Object(__WEBPACK_IMPORTED_MODULE_1__common__["v" /* grep */])(boxes, function(box) { - return box.height() > 0 && box.width() > 0; - })[0]; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/utils/ceil.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = ceil; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - -function ceil(value, step) { - return Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])(Math.ceil(value / step) * step, __WEBPACK_IMPORTED_MODULE_0__common_constants__["l" /* DEFAULT_PRECISION */]); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/utils/create-axis-grid-line.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = createAxisGridLine; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - -function createAxisGridLine(options, gridLine) { - var lineStart = options.lineStart; - var lineEnd = options.lineEnd; - var position = options.position; - - var line = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path({ - stroke: { - width: gridLine.width, - color: gridLine.color, - dashType: gridLine.dashType - } - }); - - if (options.vertical) { - line.moveTo(lineStart, position) - .lineTo(lineEnd, position); - } else { - line.moveTo(position, lineStart) - .lineTo(position, lineEnd); - } - - Object(__WEBPACK_IMPORTED_MODULE_1__common__["f" /* alignPathToPixel */])(line); - - return line; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/utils/create-axis-tick.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = createAxisTick; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - -function createAxisTick(options, tickOptions) { - var tickX = options.tickX; - var tickY = options.tickY; - var position = options.position; - - var tick = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path({ - stroke: { - width: tickOptions.width, - color: tickOptions.color - } - }); - - if (options.vertical) { - tick.moveTo(tickX, position) - .lineTo(tickX + tickOptions.size, position); - } else { - tick.moveTo(position, tickY) - .lineTo(position, tickY + tickOptions.size); - } - - Object(__WEBPACK_IMPORTED_MODULE_1__common__["f" /* alignPathToPixel */])(tick); - - return tick; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/utils/floor.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = floor; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - -function floor(value, step) { - return Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])(Math.floor(value / step) * step, __WEBPACK_IMPORTED_MODULE_0__common_constants__["l" /* DEFAULT_PRECISION */]); -} - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/utils/limit-coordinate.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = limitCoordinate; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/constants.js"); - - -function limitCoordinate(value) { - return Math.max(Math.min(value, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* COORDINATE_LIMIT */]), -__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* COORDINATE_LIMIT */]); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/core/utils/rect-to-box.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = rectToBox; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__box__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core/box.js"); - - -function rectToBox(rect) { - var origin = rect.origin; - var bottomRight = rect.bottomRight(); - - return new __WEBPACK_IMPORTED_MODULE_0__box__["a" /* default */](origin.x, origin.y, bottomRight.x, bottomRight.y); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__date_utils_absolute_date_diff__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/absolute-date-diff.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__date_utils_absolute_date_diff__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__date_utils_add_duration__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/add-duration.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__date_utils_add_duration__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__date_utils_add_ticks__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/add-ticks.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__date_utils_add_ticks__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__date_utils_ceil_date__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/ceil-date.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_3__date_utils_ceil_date__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__date_utils_date_comparer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/date-comparer.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_4__date_utils_date_comparer__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__date_utils_date_diff__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/date-diff.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_5__date_utils_date_diff__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__date_utils_date_equals__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/date-equals.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_6__date_utils_date_equals__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__date_utils_date_index__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/date-index.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_7__date_utils_date_index__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__date_utils_duration__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/duration.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_8__date_utils_duration__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__date_utils_floor_date__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/floor-date.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_9__date_utils_floor_date__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__date_utils_lte_date_index__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/lte-date-index.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_10__date_utils_lte_date_index__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__date_utils_start_of_week__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/start-of-week.js"); -/* unused harmony reexport startOfWeek */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__date_utils_to_date__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/to-date.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_12__date_utils_to_date__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__date_utils_parse_date__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/parse-date.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_13__date_utils_parse_date__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__date_utils_parse_dates__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/parse-dates.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_14__date_utils_parse_dates__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__date_utils_to_time__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/to-time.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_15__date_utils_to_time__["a"]; }); - - - - - - - - - - - - - - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/absolute-date-diff.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = absoluteDateDiff; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/constants.js"); - - -function absoluteDateDiff(a, b) { - var diff = a.getTime() - b; - var offsetDiff = a.getTimezoneOffset() - b.getTimezoneOffset(); - - return diff - (offsetDiff * __WEBPACK_IMPORTED_MODULE_0__constants__["i" /* TIME_PER_MINUTE */]); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/add-duration.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = addDuration; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__add_ticks__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/add-ticks.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__to_date__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/to-date.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__start_of_week__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/start-of-week.js"); - - - - - -function adjustDST(date, hours) { - if (hours === 0 && date.getHours() === 23) { - date.setHours(date.getHours() + 2); - return true; - } - - return false; -} - -function addHours(date, hours) { - var roundedDate = new Date(date); - - roundedDate.setMinutes(0, 0, 0); - - var tzDiff = (date.getTimezoneOffset() - roundedDate.getTimezoneOffset()) * __WEBPACK_IMPORTED_MODULE_0__constants__["i" /* TIME_PER_MINUTE */]; - - return Object(__WEBPACK_IMPORTED_MODULE_1__add_ticks__["a" /* default */])(roundedDate, tzDiff + hours * __WEBPACK_IMPORTED_MODULE_0__constants__["h" /* TIME_PER_HOUR */]); -} - -function addDuration(dateValue, value, unit, weekStartDay) { - var result = dateValue; - - if (dateValue) { - var date = Object(__WEBPACK_IMPORTED_MODULE_2__to_date__["a" /* default */])(dateValue); - var hours = date.getHours(); - - if (unit === __WEBPACK_IMPORTED_MODULE_0__constants__["p" /* YEARS */]) { - result = new Date(date.getFullYear() + value, 0, 1); - adjustDST(result, 0); - } else if (unit === __WEBPACK_IMPORTED_MODULE_0__constants__["e" /* MONTHS */]) { - result = new Date(date.getFullYear(), date.getMonth() + value, 1); - adjustDST(result, hours); - } else if (unit === __WEBPACK_IMPORTED_MODULE_0__constants__["o" /* WEEKS */]) { - result = addDuration(Object(__WEBPACK_IMPORTED_MODULE_3__start_of_week__["a" /* default */])(date, weekStartDay), value * 7, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* DAYS */]); - adjustDST(result, hours); - } else if (unit === __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* DAYS */]) { - result = new Date(date.getFullYear(), date.getMonth(), date.getDate() + value); - adjustDST(result, hours); - } else if (unit === __WEBPACK_IMPORTED_MODULE_0__constants__["b" /* HOURS */]) { - result = addHours(date, value); - } else if (unit === __WEBPACK_IMPORTED_MODULE_0__constants__["d" /* MINUTES */]) { - result = Object(__WEBPACK_IMPORTED_MODULE_1__add_ticks__["a" /* default */])(date, value * __WEBPACK_IMPORTED_MODULE_0__constants__["i" /* TIME_PER_MINUTE */]); - - if (result.getSeconds() > 0) { - result.setSeconds(0); - } - } else if (unit === __WEBPACK_IMPORTED_MODULE_0__constants__["f" /* SECONDS */]) { - result = Object(__WEBPACK_IMPORTED_MODULE_1__add_ticks__["a" /* default */])(date, value * __WEBPACK_IMPORTED_MODULE_0__constants__["k" /* TIME_PER_SECOND */]); - } else if (unit === __WEBPACK_IMPORTED_MODULE_0__constants__["c" /* MILLISECONDS */]) { - result = Object(__WEBPACK_IMPORTED_MODULE_1__add_ticks__["a" /* default */])(date, value); - } - - if (unit !== __WEBPACK_IMPORTED_MODULE_0__constants__["c" /* MILLISECONDS */] && result.getMilliseconds() > 0) { - result.setMilliseconds(0); - } - } - - return result; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/add-ticks.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = addTicks; -function addTicks(date, ticks) { - return new Date(date.getTime() + ticks); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/ceil-date.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = ceilDate; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__floor_date__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/floor-date.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__add_duration__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/add-duration.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__to_date__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/to-date.js"); - - - - -function ceilDate(dateValue, unit, weekStartDay) { - var date = Object(__WEBPACK_IMPORTED_MODULE_2__to_date__["a" /* default */])(dateValue); - - if (date && Object(__WEBPACK_IMPORTED_MODULE_0__floor_date__["a" /* default */])(date, unit, weekStartDay).getTime() === date.getTime()) { - return date; - } - - return Object(__WEBPACK_IMPORTED_MODULE_1__add_duration__["a" /* default */])(date, 1, unit, weekStartDay); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/constants.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return MILLISECONDS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return SECONDS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return MINUTES; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return HOURS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DAYS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return WEEKS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return MONTHS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return YEARS; }); -/* unused harmony export TIME_PER_MILLISECOND */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return TIME_PER_SECOND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return TIME_PER_MINUTE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return TIME_PER_HOUR; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return TIME_PER_DAY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return TIME_PER_WEEK; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return TIME_PER_MONTH; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return TIME_PER_YEAR; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return TIME_PER_UNIT; }); -var MILLISECONDS = "milliseconds"; -var SECONDS = "seconds"; -var MINUTES = "minutes"; -var HOURS = "hours"; -var DAYS = "days"; -var WEEKS = "weeks"; -var MONTHS = "months"; -var YEARS = "years"; - -var TIME_PER_MILLISECOND = 1; -var TIME_PER_SECOND = 1000; -var TIME_PER_MINUTE = 60 * TIME_PER_SECOND; -var TIME_PER_HOUR = 60 * TIME_PER_MINUTE; -var TIME_PER_DAY = 24 * TIME_PER_HOUR; -var TIME_PER_WEEK = 7 * TIME_PER_DAY; -var TIME_PER_MONTH = 31 * TIME_PER_DAY; -var TIME_PER_YEAR = 365 * TIME_PER_DAY; -var TIME_PER_UNIT = { - "years": TIME_PER_YEAR, - "months": TIME_PER_MONTH, - "weeks": TIME_PER_WEEK, - "days": TIME_PER_DAY, - "hours": TIME_PER_HOUR, - "minutes": TIME_PER_MINUTE, - "seconds": TIME_PER_SECOND, - "milliseconds": TIME_PER_MILLISECOND -}; - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/date-comparer.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = dateComparer; -function dateComparer(a, b) { - if (a && b) { - return a.getTime() - b.getTime(); - } - - return -1; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/date-diff.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = dateDiff; -function dateDiff(a, b) { - return a.getTime() - b; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/date-equals.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = dateEquals; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_time__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/to-time.js"); - - -function dateEquals(a, b) { - if (a && b) { - return Object(__WEBPACK_IMPORTED_MODULE_0__to_time__["a" /* default */])(a) === Object(__WEBPACK_IMPORTED_MODULE_0__to_time__["a" /* default */])(b); - } - - return a === b; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/date-index.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = dateIndex; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__date_diff__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/date-diff.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__absolute_date_diff__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/absolute-date-diff.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__to_date__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/to-date.js"); - - - - - -function timeIndex(date, start, baseUnit) { - return Object(__WEBPACK_IMPORTED_MODULE_2__absolute_date_diff__["a" /* default */])(date, start) / __WEBPACK_IMPORTED_MODULE_0__constants__["l" /* TIME_PER_UNIT */][baseUnit]; -} - -function dateIndex(value, start, baseUnit, baseUnitStep) { - var date = Object(__WEBPACK_IMPORTED_MODULE_3__to_date__["a" /* default */])(value); - var startDate = Object(__WEBPACK_IMPORTED_MODULE_3__to_date__["a" /* default */])(start); - var index; - - if (baseUnit === __WEBPACK_IMPORTED_MODULE_0__constants__["e" /* MONTHS */]) { - index = (date.getMonth() - startDate.getMonth() + (date.getFullYear() - startDate.getFullYear()) * 12) + - timeIndex(date, new Date(date.getFullYear(), date.getMonth()), __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* DAYS */]) / new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate(); - } else if (baseUnit === __WEBPACK_IMPORTED_MODULE_0__constants__["p" /* YEARS */]) { - index = date.getFullYear() - startDate.getFullYear() + dateIndex(date, new Date(date.getFullYear(), 0), __WEBPACK_IMPORTED_MODULE_0__constants__["e" /* MONTHS */], 1) / 12; - } else if (baseUnit === __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* DAYS */] || baseUnit === __WEBPACK_IMPORTED_MODULE_0__constants__["o" /* WEEKS */]) { - index = timeIndex(date, startDate, baseUnit); - } else { - index = Object(__WEBPACK_IMPORTED_MODULE_1__date_diff__["a" /* default */])(date, start) / __WEBPACK_IMPORTED_MODULE_0__constants__["l" /* TIME_PER_UNIT */][baseUnit]; - } - - return index / baseUnitStep; -} - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/duration.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = duration; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__date_diff__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/date-diff.js"); - - - -function duration(a, b, unit) { - var diff; - - if (unit === __WEBPACK_IMPORTED_MODULE_0__constants__["p" /* YEARS */]) { - diff = b.getFullYear() - a.getFullYear(); - } else if (unit === __WEBPACK_IMPORTED_MODULE_0__constants__["e" /* MONTHS */]) { - diff = duration(a, b, __WEBPACK_IMPORTED_MODULE_0__constants__["p" /* YEARS */]) * 12 + b.getMonth() - a.getMonth(); - } else if (unit === __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* DAYS */]) { - diff = Math.floor(Object(__WEBPACK_IMPORTED_MODULE_1__date_diff__["a" /* default */])(b, a) / __WEBPACK_IMPORTED_MODULE_0__constants__["g" /* TIME_PER_DAY */]); - } else { - diff = Math.floor(Object(__WEBPACK_IMPORTED_MODULE_1__date_diff__["a" /* default */])(b, a) / __WEBPACK_IMPORTED_MODULE_0__constants__["l" /* TIME_PER_UNIT */][unit]); - } - - return diff; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/floor-date.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = floorDate; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__add_duration__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/add-duration.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__to_date__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/to-date.js"); - - - -function floorDate(date, unit, weekStartDay) { - return Object(__WEBPACK_IMPORTED_MODULE_0__add_duration__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__to_date__["a" /* default */])(date), 0, unit, weekStartDay); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/lte-date-index.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = lteDateIndex; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__date_equals__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/date-equals.js"); - - -function lteDateIndex(date, sortedDates) { - var low = 0; - var high = sortedDates.length - 1; - var index; - - while (low <= high) { - index = Math.floor((low + high) / 2); - var currentDate = sortedDates[index]; - - if (currentDate < date) { - low = index + 1; - continue; - } - - if (currentDate > date) { - high = index - 1; - continue; - } - - while (Object(__WEBPACK_IMPORTED_MODULE_0__date_equals__["a" /* default */])(sortedDates[index - 1], date)) { - index--; - } - - return index; - } - - if (sortedDates[index] <= date) { - return index; - } - - return index - 1; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/parse-date.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = parseDate; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__to_date__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/to-date.js"); - - - -function parseDate(intlService, date) { - var result; - if (Object(__WEBPACK_IMPORTED_MODULE_0__common__["D" /* isString */])(date)) { - result = intlService.parseDate(date) || Object(__WEBPACK_IMPORTED_MODULE_1__to_date__["a" /* default */])(date); - } else { - result = Object(__WEBPACK_IMPORTED_MODULE_1__to_date__["a" /* default */])(date); - } - return result; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/parse-dates.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = parseDates; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__parse_date__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/parse-date.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - -function parseDates(intlService, dates) { - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["z" /* isArray */])(dates)) { - var result = []; - for (var idx = 0; idx < dates.length; idx++) { - result.push(Object(__WEBPACK_IMPORTED_MODULE_0__parse_date__["a" /* default */])(intlService, dates[idx])); - } - - return result; - } - - return Object(__WEBPACK_IMPORTED_MODULE_0__parse_date__["a" /* default */])(intlService, dates); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/start-of-week.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = startOfWeek; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__add_ticks__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/add-ticks.js"); - - - -function startOfWeek(date, weekStartDay) { - if ( weekStartDay === void 0 ) weekStartDay = 0; - - var daysToSubtract = 0; - var day = date.getDay(); - - if (!isNaN(day)) { - while (day !== weekStartDay) { - if (day === 0) { - day = 6; - } else { - day--; - } - - daysToSubtract++; - } - } - - return Object(__WEBPACK_IMPORTED_MODULE_1__add_ticks__["a" /* default */])(date, -daysToSubtract * __WEBPACK_IMPORTED_MODULE_0__constants__["g" /* TIME_PER_DAY */]); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/to-date.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = toDate; -function toDate(value) { - var result; - - if (value instanceof Date) { - result = value; - } else if (value) { - result = new Date(value); - } - - return result; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/date-utils/to-time.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = toTime; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__to_date__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils/to-date.js"); - - - -function toTime(value) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__common__["z" /* isArray */])(value)) { - var result = []; - for (var idx = 0; idx < value.length; idx++) { - result.push(toTime(value[idx])); - } - - return result; - } else if (value) { - return Object(__WEBPACK_IMPORTED_MODULE_1__to_date__["a" /* default */])(value).getTime(); - } -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/drawing-utils.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return append; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return bindEvents; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return defined; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return deg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return elementOffset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return elementSize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return eventElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return eventCoordinates; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return last; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return limitValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return objectKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return rad; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return round; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return unbindEvents; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return valueOrDefault; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["i"]; }); - - -var ref = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].util; -var append = ref.append; -var bindEvents = ref.bindEvents; -var defined = ref.defined; -var deg = ref.deg; -var elementOffset = ref.elementOffset; -var elementSize = ref.elementSize; -var eventElement = ref.eventElement; -var eventCoordinates = ref.eventCoordinates; -var last = ref.last; -var limitValue = ref.limitValue; -var objectKey = ref.objectKey; -var rad = ref.rad; -var round = ref.round; -var unbindEvents = ref.unbindEvents; -var valueOrDefault = ref.valueOrDefault; - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gauges_gauge__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/gauge.js"); -/* unused harmony reexport Gauge */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__gauges_linear_linear_gauge__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/linear/linear-gauge.js"); -/* unused harmony reexport LinearGauge */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__gauges_linear_linear_pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/linear/linear-pointer.js"); -/* unused harmony reexport LinearPointer */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__gauges_linear_arrow_linear_pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/linear/arrow-linear-pointer.js"); -/* unused harmony reexport ArrowLinearPointer */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__gauges_linear_bar_linear_pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/linear/bar-linear-pointer.js"); -/* unused harmony reexport BarLinearPointer */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__gauges_linear_linear_scale__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/linear/linear-scale.js"); -/* unused harmony reexport LinearScale */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__gauges_radial_radial_gauge__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/radial/radial-gauge.js"); -/* unused harmony reexport RadialGauge */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__gauges_radial_radial_pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/radial/radial-pointer.js"); -/* unused harmony reexport RadialPointer */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__gauges_radial_radial_scale__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/radial/radial-scale.js"); -/* unused harmony reexport RadialScale */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__gauges_arc_arc_gauge__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/arc/arc-gauge.js"); -/* unused harmony reexport ArcGauge */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__gauges_arc_range_pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/arc/range-pointer.js"); -/* unused harmony reexport RangePointer */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__gauges_arc_arc_scale__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/arc/arc-scale.js"); -/* unused harmony reexport ArcScale */ - - - - - - - - - - - - - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/arc/arc-gauge.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__radial_radial_gauge__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/radial/radial-gauge.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arc_scale__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/arc/arc-scale.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__range_pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/arc/range-pointer.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - - - - -var ArcGauge = (function (RadialGauge) { - function ArcGauge () { - RadialGauge.apply(this, arguments); - } - - if ( RadialGauge ) ArcGauge.__proto__ = RadialGauge; - ArcGauge.prototype = Object.create( RadialGauge && RadialGauge.prototype ); - ArcGauge.prototype.constructor = ArcGauge; - - ArcGauge.prototype._initTheme = function _initTheme (theme) { - RadialGauge.prototype._initTheme.call(this, theme); - - this.options.color = this.options.color || (this.theme.pointer || {}).color; - }; - - ArcGauge.prototype._createModel = function _createModel () { - var options = this.options; - var scale = this.scale = new __WEBPACK_IMPORTED_MODULE_1__arc_scale__["a" /* default */](options.scale, this.contextService); - - var pointer = new __WEBPACK_IMPORTED_MODULE_2__range_pointer__["a" /* default */](scale, Object(__WEBPACK_IMPORTED_MODULE_3__common__["k" /* deepExtend */])({}, { - colors: options.colors, - color: options.color, - value: options.value, - opacity: options.opacity, - animation: { - transitions: options.transitions - } - })); - - this.pointers = [ pointer ]; - }; - - ArcGauge.prototype._buildPointers = function _buildPointers (pointers) { - for (var i = 0; i < pointers.length; i++) { - var current = pointers[i]; - current.render(); - - current.value(current.options.value); - } - }; - - ArcGauge.prototype._setValueOptions = function _setValueOptions (value) { - this.options.value = value; - }; - - ArcGauge.prototype.currentColor = function currentColor () { - var pointer = this.pointers[0]; - if (pointer) { - return pointer.currentColor(); - } - }; - - ArcGauge.prototype.centerLabelPosition = function centerLabelPosition (width, height) { - var size = this.getSize(); - var center = this.scale.arc.center; - - var left = center.x - width / 2; - var top = center.y - height / 2; - - if (width < size.width) { - var right = left + width; - - left = Math.max(left, 0); - - if (right > size.width) { - left -= right - size.width; - } - } - - if (height < size.height) { - var bbox = this.scale.bbox; - var yLimit = bbox.bottomRight().y; - var bottom = top + height; - - top = Math.max(top, bbox.origin.y); - - if (bottom > yLimit) { - top -= bottom - yLimit; - } - } - - return { - left: left, - top: top - }; - }; - - return ArcGauge; -}(__WEBPACK_IMPORTED_MODULE_0__radial_radial_gauge__["a" /* default */])); - -/* unused harmony default export */ var _unused_webpack_default_export = (ArcGauge); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/arc/arc-scale.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__radial_radial_scale__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/radial/radial-scale.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - -var ArcScale = (function (RadialScale) { - function ArcScale () { - RadialScale.apply(this, arguments); - } - - if ( RadialScale ) ArcScale.__proto__ = RadialScale; - ArcScale.prototype = Object.create( RadialScale && RadialScale.prototype ); - ArcScale.prototype.constructor = ArcScale; - - ArcScale.prototype.rangeSegments = function rangeSegments () { - var ref = this.options; - var min = ref.min; - var max = ref.max; - var rangePlaceholderColor = ref.rangePlaceholderColor; - - return [ { from: min, to: max, color: rangePlaceholderColor, lineCap: 'round' } ]; - }; - - ArcScale.prototype.hasRanges = function hasRanges () { - return true; - }; - - ArcScale.prototype.placeholderRangeAngle = function placeholderRangeAngle (angle) { - var geometry = this.ranges.children[0].geometry(); - - if (this.options.reverse) { - geometry.setEndAngle(angle); - } else { - geometry.setStartAngle(angle); - } - }; - - ArcScale.prototype.addRange = function addRange (from, to, options) { - var reverse = this.options.reverse; - - var startAngle = this.slotAngle(reverse ? to : from); - var endAngle = this.slotAngle(reverse ? from : to); - - var range = this.createRange(startAngle, endAngle, this.getRangeRadius(), options); - - this.ranges.append(range); - - return range; - }; - - return ArcScale; -}(__WEBPACK_IMPORTED_MODULE_0__radial_radial_scale__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["M" /* setDefaultOptions */])(ArcScale, { - min: 0, - max: 100, - - majorTicks: { - visible: false - }, - - minorTicks: { - visible: false - }, - - labels: { - visible: false - }, - - startAngle: 0, - endAngle: 180 -}); - -/* harmony default export */ __webpack_exports__["a"] = (ArcScale); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/arc/range-pointer-animation.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/constants.js"); - - - - -var MAX_DURATION = 800; - -var RangePointerAnimation = (function (superclass) { - function RangePointerAnimation(element, options) { - superclass.call(this, element, options); - - var animationOptions = this.options; - var duration = (Math.abs(animationOptions.newAngle - animationOptions.oldAngle) / animationOptions.duration) * 1000; - animationOptions.duration = Object(__WEBPACK_IMPORTED_MODULE_1__common__["F" /* limitValue */])(duration, __WEBPACK_IMPORTED_MODULE_2__constants__["a" /* ANGULAR_SPEED */], MAX_DURATION); - - var startColor = element.elements.options.get("stroke.color"); - var color = element.currentColor(); - if (startColor !== color) { - this.startColor = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["b" /* Color */](startColor); - this.color = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["b" /* Color */](color); - } - } - - if ( superclass ) RangePointerAnimation.__proto__ = superclass; - RangePointerAnimation.prototype = Object.create( superclass && superclass.prototype ); - RangePointerAnimation.prototype.constructor = RangePointerAnimation; - - RangePointerAnimation.prototype.step = function step (pos) { - var ref = this; - var options = ref.options; - var startColor = ref.startColor; - var color = ref.color; - var angle = Object(__WEBPACK_IMPORTED_MODULE_1__common__["y" /* interpolateValue */])(options.oldAngle, options.newAngle, pos); - this.element.angle(angle); - - if (color) { - var r = Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])(Object(__WEBPACK_IMPORTED_MODULE_1__common__["y" /* interpolateValue */])(startColor.r, color.r, pos)); - var g = Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])(Object(__WEBPACK_IMPORTED_MODULE_1__common__["y" /* interpolateValue */])(startColor.g, color.g, pos)); - var b = Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])(Object(__WEBPACK_IMPORTED_MODULE_1__common__["y" /* interpolateValue */])(startColor.b, color.b, pos)); - - this.element.stroke(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["b" /* Color */](r, g, b).toHex()); - } - }; - - return RangePointerAnimation; -}(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Animation)); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["M" /* setDefaultOptions */])(RangePointerAnimation, { - easing: __WEBPACK_IMPORTED_MODULE_2__constants__["j" /* LINEAR */], - duration: __WEBPACK_IMPORTED_MODULE_2__constants__["a" /* ANGULAR_SPEED */] -}); - -__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].AnimationFactory.current.register(__WEBPACK_IMPORTED_MODULE_2__constants__["n" /* RADIAL_RANGE_POINTER */], RangePointerAnimation); - -/* harmony default export */ __webpack_exports__["a"] = (RangePointerAnimation); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/arc/range-pointer.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/pointer.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__range_pointer_animation__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/arc/range-pointer-animation.js"); - - - - - -var RangePointer = (function (Pointer) { - function RangePointer () { - Pointer.apply(this, arguments); - } - - if ( Pointer ) RangePointer.__proto__ = Pointer; - RangePointer.prototype = Object.create( Pointer && Pointer.prototype ); - RangePointer.prototype.constructor = RangePointer; - - RangePointer.prototype.repaint = function repaint () { - var ref = this; - var scale = ref.scale; - var options = ref.options; - var oldAngle = scale.slotAngle(options._oldValue); - var newAngle = scale.slotAngle(options.value); - - if (this.animation) { - this.animation.abort(); - } - - if (options.animation.transitions === false) { - this.angle(newAngle); - this.stroke(this.currentColor()); - } else { - this.animation = new __WEBPACK_IMPORTED_MODULE_3__range_pointer_animation__["a" /* default */](this, Object(__WEBPACK_IMPORTED_MODULE_0__common__["k" /* deepExtend */])(options.animation, { - oldAngle: oldAngle, - newAngle: newAngle - })); - - this.animation.play(); - } - }; - - RangePointer.prototype.angle = function angle (value) { - var geometry = this.elements.geometry(); - if (this.scale.options.reverse) { - geometry.setStartAngle(value); - } else { - geometry.setEndAngle(value); - } - this.scale.placeholderRangeAngle(value); - }; - - RangePointer.prototype.stroke = function stroke (value) { - this.elements.stroke(value); - }; - - RangePointer.prototype.render = function render () { - if (this.elements) { - return; - } - - var ref = this; - var scale = ref.scale; - var options = ref.options; - - if (options.animation !== false) { - Object(__WEBPACK_IMPORTED_MODULE_0__common__["k" /* deepExtend */])(options.animation, { - startAngle: 0, - center: scale.arc.center, - reverse: scale.options.reverse - }); - } - - this.elements = scale.addRange(scale.options.min, this.options.value, { - color: this.currentColor(), - opacity: options.opacity, - lineCap: 'round' - }); - }; - - RangePointer.prototype.currentColor = function currentColor () { - var ref = this.scale.options; - var min = ref.min; - var max = ref.max; - var ref$1 = this.options; - var colors = ref$1.colors; - var color = ref$1.color; - var value = ref$1.value; - var currentValue = Object(__WEBPACK_IMPORTED_MODULE_0__common__["B" /* isNumber */])(value) ? value : min; - - if (colors) { - for (var idx = 0; idx < colors.length; idx++) { - var ref$2 = colors[idx]; - var rangeColor = ref$2.color; - var from = ref$2.from; if ( from === void 0 ) from = min; - var to = ref$2.to; if ( to === void 0 ) to = max; - - if (from <= currentValue && currentValue <= to) { - return rangeColor; - } - } - } - - return color; - }; - - RangePointer.prototype.reflow = function reflow () { - this.render(); - - this.bbox = this.elements.bbox(); - }; - - return RangePointer; -}(__WEBPACK_IMPORTED_MODULE_2__pointer__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_0__common__["M" /* setDefaultOptions */])(RangePointer, { - animation: { - type: __WEBPACK_IMPORTED_MODULE_1__constants__["n" /* RADIAL_RANGE_POINTER */], - duration: __WEBPACK_IMPORTED_MODULE_1__constants__["a" /* ANGULAR_SPEED */] - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (RangePointer); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/constants.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ANGULAR_SPEED; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return LINEAR_SPEED; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ARROW; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ARROW_POINTER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return BAR_POINTER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return DEFAULT_HEIGHT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return DEFAULT_LINE_WIDTH; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return DEFAULT_WIDTH; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return DEGREE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return INSIDE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return LINEAR; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return OUTSIDE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return RADIAL_POINTER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return RADIAL_RANGE_POINTER; }); -var ANGULAR_SPEED = 150; -var LINEAR_SPEED = 250; -var ARROW = "arrow"; -var ARROW_POINTER = "arrowPointer"; -var BAR_POINTER = "barPointer"; -var DEFAULT_HEIGHT = 200; -var DEFAULT_LINE_WIDTH = 0.5; -var DEFAULT_WIDTH = 200; -var DEGREE = Math.PI / 180; -var INSIDE = "inside"; -var LINEAR = "linear"; -var OUTSIDE = "outside"; -var RADIAL_POINTER = "radialPointer"; -var RADIAL_RANGE_POINTER = "radialRangePointer"; - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/gauge.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/utils.js"); - - - - - - -var DEFAULT_MARGIN = 5; -var Path = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path; -var Surface = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Surface; - -var Gauge = (function (Class) { - function Gauge(element, userOptions, theme, context) { - if ( context === void 0 ) context = {}; - - Class.call(this); - - this.element = element; - this.theme = theme; - this.contextService = new __WEBPACK_IMPORTED_MODULE_3__services__["a" /* ChartService */](this, context); - this._originalOptions = Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])({}, this.options, userOptions); - this.options = Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])({}, this._originalOptions); - this._initTheme(theme); - - this.redraw(); - } - - if ( Class ) Gauge.__proto__ = Class; - Gauge.prototype = Object.create( Class && Class.prototype ); - Gauge.prototype.constructor = Gauge; - - Gauge.prototype.destroy = function destroy () { - this.surface.destroy(); - - delete this.element; - delete this.surfaceElement; - }; - - Gauge.prototype.value = function value (pointerValue) { - var pointer = this.pointers[0]; - - if (arguments.length === 0) { - return pointer.value(); - } - - pointer.value(pointerValue); - this._setValueOptions(pointerValue); - }; - - Gauge.prototype._draw = function _draw () { - var surface = this.surface; - - surface.clear(); - surface.draw(this._visuals); - }; - - Gauge.prototype.exportVisual = function exportVisual () { - return this._visuals; - }; - - Gauge.prototype.allValues = function allValues (values) { - var pointers = this.pointers; - var allValues = []; - - if (arguments.length === 0) { - for (var i = 0; i < pointers.length; i++) { - allValues.push(pointers[i].value()); - } - - return allValues; - } - - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["z" /* isArray */])(values)) { - for (var i$1 = 0; i$1 < values.length; i$1++) { - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["B" /* isNumber */])(values[i$1])) { - pointers[i$1].value(values[i$1]); - } - } - } - - this._setValueOptions(values); - }; - - Gauge.prototype._setValueOptions = function _setValueOptions (values) { - var pointers = [].concat(this.options.pointer); - var arrayValues = [].concat(values); - - for (var i = 0; i < arrayValues.length; i++) { - pointers[i].value = arrayValues[i]; - } - }; - - Gauge.prototype.resize = function resize () { - var transitions = this.options.transitions; - - this._toggleTransitions(false); - - this.redraw(); - - this._toggleTransitions(transitions); - }; - - Gauge.prototype.redraw = function redraw () { - var size = this._surfaceSize(); - var wrapper = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect([ 0, 0 ], [ size.width, size.height ]); - - this._initSurface(); - - this.gaugeArea = this._createGaugeArea(); - - this._createModel(); - - var bbox = Object(__WEBPACK_IMPORTED_MODULE_4__utils__["c" /* unpad */])(wrapper.bbox(), this._gaugeAreaMargin); - this.reflow(bbox); - }; - - Gauge.prototype.setOptions = function setOptions (options, theme) { - this._originalOptions = Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])(this._originalOptions, options); - this.options = Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])({}, this._originalOptions); - - this._initTheme(theme); - - this.redraw(); - }; - - Gauge.prototype._initTheme = function _initTheme (theme) { - var currentTheme = theme || this.theme || {}; - this.theme = currentTheme; - - this.options = Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])({}, currentTheme, this.options); - var options = this.options; - var pointer = options.pointer; - - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["z" /* isArray */])(pointer)) { - var pointers = []; - for (var i = 0; i < pointer.length; i++) { - pointers.push(Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])({}, currentTheme.pointer, pointer[i])); - } - options.pointer = pointers; - } - }; - - Gauge.prototype._createGaugeArea = function _createGaugeArea () { - var options = this.options.gaugeArea; - var size = this.surface.size(); - var border = options.border || {}; - var areaGeometry = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect([ 0, 0 ], [ size.width, size.height ]); - - this._gaugeAreaMargin = options.margin || DEFAULT_MARGIN; - - if (border.width > 0) { - areaGeometry = Object(__WEBPACK_IMPORTED_MODULE_4__utils__["c" /* unpad */])(areaGeometry, border.width); - } - - var gaugeArea = Path.fromRect(areaGeometry, { - stroke: { - color: border.width ? border.color : "", - width: border.width, - dashType: border.dashType, - lineJoin: "round", - lineCap: "round" - }, - fill: { - color: options.background - } - }); - - return gaugeArea; - }; - - Gauge.prototype._initSurface = function _initSurface () { - var ref = this; - var options = ref.options; - var surface = ref.surface; - var element = this._surfaceElement(); - var size = this._surfaceSize(); - - Object(__WEBPACK_IMPORTED_MODULE_1__common__["o" /* elementSize */])(element, size); - - if (!surface || surface.options.type !== options.renderAs) { - if (surface) { - surface.destroy(); - } - - this.surface = Surface.create(element, { - type: options.renderAs - }); - } else { - this.surface.clear(); - this.surface.resize(); - } - }; - - Gauge.prototype._surfaceSize = function _surfaceSize () { - var options = this.options; - var size = this._getSize(); - - if (options.gaugeArea) { - Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])(size, options.gaugeArea); - } - - return size; - }; - - Gauge.prototype._surfaceElement = function _surfaceElement () { - if (!this.surfaceElement) { - this.surfaceElement = document.createElement('div'); - this.element.appendChild(this.surfaceElement); - } - - return this.surfaceElement; - }; - - Gauge.prototype.getSize = function getSize () { - return this._getSize(); - }; - - Gauge.prototype._getSize = function _getSize () { - var element = this.element; - var defaultSize = this._defaultSize(); - var width = element.offsetWidth; - var height = element.offsetHeight; - - if (!width) { - width = defaultSize.width; - } - - if (!height) { - height = defaultSize.height; - } - - return { width: width, height: height }; - }; - - Gauge.prototype._defaultSize = function _defaultSize () { - return { - width: __WEBPACK_IMPORTED_MODULE_2__constants__["g" /* DEFAULT_WIDTH */], - height: __WEBPACK_IMPORTED_MODULE_2__constants__["e" /* DEFAULT_HEIGHT */] - }; - }; - - Gauge.prototype._toggleTransitions = function _toggleTransitions (value) { - var this$1 = this; - - this.options.transitions = value; - for (var i = 0; i < this.pointers.length; i++) { - this$1.pointers[i].options.animation.transitions = value; - } - }; - - return Gauge; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["M" /* setDefaultOptions */])(Gauge, { - plotArea: {}, - theme: "default", - renderAs: "", - pointer: {}, - scale: {}, - gaugeArea: {} -}); - -/* harmony default export */ __webpack_exports__["a"] = (Gauge); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/linear/arrow-linear-pointer-animation.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/constants.js"); - - - - -var ArrowLinearPointerAnimation = (function (superclass) { - function ArrowLinearPointerAnimation () { - superclass.apply(this, arguments); - } - - if ( superclass ) ArrowLinearPointerAnimation.__proto__ = superclass; - ArrowLinearPointerAnimation.prototype = Object.create( superclass && superclass.prototype ); - ArrowLinearPointerAnimation.prototype.constructor = ArrowLinearPointerAnimation; - - ArrowLinearPointerAnimation.prototype.setup = function setup () { - var options = this.options; - var margin = options.margin; - var from = options.from; - var to = options.to; - var vertical = options.vertical; - var axis = vertical ? "x1" : "y1"; - - if (options.mirror === vertical) { - from[axis] -= margin; to[axis] -= margin; - } else { - from[axis] += margin; to[axis] += margin; - } - - var fromScale = this.fromScale = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(from.x1, from.y1); - var toScale = this.toScale = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(to.x1, to.y1); - - if (options.duration !== 0) { - options.duration = Math.max((fromScale.distanceTo(toScale) / options.duration) * 1000, 1); - } - }; - - ArrowLinearPointerAnimation.prototype.step = function step (pos) { - var translateX = Object(__WEBPACK_IMPORTED_MODULE_1__common__["y" /* interpolateValue */])(this.fromScale.x, this.toScale.x, pos); - var translateY = Object(__WEBPACK_IMPORTED_MODULE_1__common__["y" /* interpolateValue */])(this.fromScale.y, this.toScale.y, pos); - - this.element.transform(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform().translate(translateX, translateY)); - }; - - return ArrowLinearPointerAnimation; -}(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Animation)); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["M" /* setDefaultOptions */])(ArrowLinearPointerAnimation, { - easing: __WEBPACK_IMPORTED_MODULE_2__constants__["j" /* LINEAR */], - duration: __WEBPACK_IMPORTED_MODULE_2__constants__["k" /* LINEAR_SPEED */] -}); - -__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].AnimationFactory.current.register(__WEBPACK_IMPORTED_MODULE_2__constants__["c" /* ARROW_POINTER */], ArrowLinearPointerAnimation); - -/* harmony default export */ __webpack_exports__["a"] = (ArrowLinearPointerAnimation); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/linear/arrow-linear-pointer.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__linear_pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/linear/linear-pointer.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__arrow_linear_pointer_animation__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/linear/arrow-linear-pointer-animation.js"); - - - - - - -var Point = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point; -var Path = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path; - -var ArrowLinearPointer = (function (LinearPointer) { - function ArrowLinearPointer(scale, options) { - LinearPointer.call(this, scale, options); - - if (!Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(this.options.size)) { - this.options.size = this.scale.options.majorTicks.size * 0.6; - } - } - - if ( LinearPointer ) ArrowLinearPointer.__proto__ = LinearPointer; - ArrowLinearPointer.prototype = Object.create( LinearPointer && LinearPointer.prototype ); - ArrowLinearPointer.prototype.constructor = ArrowLinearPointer; - - ArrowLinearPointer.prototype.pointerShape = function pointerShape () { - var ref = this; - var scale = ref.scale; - var size = ref.options.size; - var halfSize = size / 2; - var sign = (scale.options.mirror ? -1 : 1); - var shape; - - if (scale.options.vertical) { - shape = [ - new Point(0, 0 - halfSize), new Point(0 - sign * size, 0), new Point(0, 0 + halfSize) - ]; - } else { - shape = [ - new Point(0 - halfSize, 0), new Point(0, 0 + sign * size), new Point(0 + halfSize, 0) - ]; - } - - return shape; - }; - - ArrowLinearPointer.prototype.repaint = function repaint () { - var ref = this; - var scale = ref.scale; - var options = ref.options; - var animation = new __WEBPACK_IMPORTED_MODULE_4__arrow_linear_pointer_animation__["a" /* default */](this.elements, Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])(options.animation, { - vertical: scale.options.vertical, - mirror: scale.options.mirror, - margin: this._margin(options.margin), - from: scale.getSlot(options._oldValue), - to: scale.getSlot(options.value) - })); - - if (options.animation.transitions === false) { - animation.options.duration = 0; - } - - animation.setup(); - animation.play(); - }; - - ArrowLinearPointer.prototype.render = function render () { - var ref = this; - var scale = ref.scale; - var options = ref.options; - var elementOptions = this.getElementOptions(); - var shape = this.pointerShape(options.value); - - options.animation.type = __WEBPACK_IMPORTED_MODULE_2__constants__["c" /* ARROW_POINTER */]; - - var elements = new Path({ - stroke: elementOptions.stroke, - fill: elementOptions.fill - }).moveTo(shape[0]).lineTo(shape[1]).lineTo(shape[2]).close(); - - var slot = scale.getSlot(options.value); - elements.transform(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform().translate(slot.x1, slot.y1)); - - this.elements = elements; - - return elements; - }; - - return ArrowLinearPointer; -}(__WEBPACK_IMPORTED_MODULE_3__linear_pointer__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (ArrowLinearPointer); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/linear/bar-linear-pointer-animation.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/constants.js"); - - - - - -var BarLinearPointerAnimation = (function (superclass) { - function BarLinearPointerAnimation () { - superclass.apply(this, arguments); - } - - if ( superclass ) BarLinearPointerAnimation.__proto__ = superclass; - BarLinearPointerAnimation.prototype = Object.create( superclass && superclass.prototype ); - BarLinearPointerAnimation.prototype.constructor = BarLinearPointerAnimation; - - BarLinearPointerAnimation.prototype.setup = function setup () { - var options = this.options; - var axis = this.axis = options.vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - var to = this.to = options.newPoints[0][axis]; - var from = this.from = options.oldPoints[0][axis]; - - if (options.duration !== 0) { - options.duration = Math.max((Math.abs(to - from) / options.speed) * 1000, 1); - } - - this._set(from); - }; - - BarLinearPointerAnimation.prototype.step = function step (pos) { - var value = Object(__WEBPACK_IMPORTED_MODULE_1__common__["y" /* interpolateValue */])(this.from, this.to, pos); - this._set(value); - }; - - BarLinearPointerAnimation.prototype._set = function _set (value) { - var setter = "set" + this.axis.toUpperCase(); - var points = this.options.newPoints; - - points[0][setter](value); - points[1][setter](value); - }; - - return BarLinearPointerAnimation; -}(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Animation)); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["M" /* setDefaultOptions */])(BarLinearPointerAnimation, { - easing: __WEBPACK_IMPORTED_MODULE_3__constants__["j" /* LINEAR */], - speed: __WEBPACK_IMPORTED_MODULE_3__constants__["k" /* LINEAR_SPEED */] -}); - -__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].AnimationFactory.current.register(__WEBPACK_IMPORTED_MODULE_3__constants__["d" /* BAR_POINTER */], BarLinearPointerAnimation); - -/* harmony default export */ __webpack_exports__["a"] = (BarLinearPointerAnimation); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/linear/bar-linear-pointer.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__linear_pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/linear/linear-pointer.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__bar_linear_pointer_animation__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/linear/bar-linear-pointer-animation.js"); - - - - - - -var Group = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group; -var Path = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path; - -var BarLinearPointer = (function (LinearPointer) { - function BarLinearPointer(scale, options) { - LinearPointer.call(this, scale, options); - - if (!Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(this.options.size)) { - this.options.size = this.scale.options.majorTicks.size * 0.3; - } - } - - if ( LinearPointer ) BarLinearPointer.__proto__ = LinearPointer; - BarLinearPointer.prototype = Object.create( LinearPointer && LinearPointer.prototype ); - BarLinearPointer.prototype.constructor = BarLinearPointer; - - BarLinearPointer.prototype.pointerShape = function pointerShape (value) { - var ref = this; - var scale = ref.scale; - var options = ref.options; - var ref$1 = scale.options; - var mirror = ref$1.mirror; - var vertical = ref$1.vertical; - var dir = mirror === vertical ? -1 : 1; - var size = options.size * dir; - var minSlot = scale.getSlot(scale.options.min); - var slot = scale.getSlot(value); - var axis = vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */]; - var sizeAxis = vertical ? __WEBPACK_IMPORTED_MODULE_2__common_constants__["G" /* X */] : __WEBPACK_IMPORTED_MODULE_2__common_constants__["H" /* Y */]; - var margin = this._margin() * dir; - - var p1 = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(); - p1[axis] = minSlot[axis + "1"]; - p1[sizeAxis] = minSlot[sizeAxis + "1"]; - - var p2 = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(); - p2[axis] = slot[axis + "1"]; - p2[sizeAxis] = slot[sizeAxis + "1"]; - - if (vertical) { - p1.translate(margin, 0); - p2.translate(margin, 0); - } else { - p1.translate(0, margin); - p2.translate(0, margin); - } - - var p3 = p2.clone(); - var p4 = p1.clone(); - - if (vertical) { - p3.translate(size, 0); - p4.translate(size, 0); - } else { - p3.translate(0, size); - p4.translate(0, size); - } - - return [ p1, p2, p3, p4 ]; - }; - - BarLinearPointer.prototype.repaint = function repaint () { - var ref = this; - var scale = ref.scale; - var options = ref.options; - var shape = this.pointerShape(options.value); - var pointerPath = this.elements.children[0]; - var oldShape = this.pointerShape(options._oldValue); - - pointerPath.moveTo(shape[0]).lineTo(shape[1]).lineTo(shape[2]).lineTo(shape[3]).close(); - - var animation = new __WEBPACK_IMPORTED_MODULE_4__bar_linear_pointer_animation__["a" /* default */](pointerPath, Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])(options.animation, { - reverse: scale.options.reverse, - vertical: scale.options.vertical, - oldPoints: [ oldShape[1], oldShape[2] ], - newPoints: [ shape[1], shape[2] ] - })); - - if (options.animation.transitions === false) { - animation.options.duration = 0; - } - - animation.setup(); - animation.play(); - }; - - BarLinearPointer.prototype.render = function render () { - var group = new Group(); - var elementOptions = this.getElementOptions(); - - var pointer = new Path({ - stroke: elementOptions.stroke, - fill: elementOptions.fill - }); - - group.append(pointer); - - this.elements = group; - - return group; - }; - - return BarLinearPointer; -}(__WEBPACK_IMPORTED_MODULE_3__linear_pointer__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (BarLinearPointer); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/linear/linear-gauge.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__gauge__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/gauge.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__linear_scale__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/linear/linear-scale.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__arrow_linear_pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/linear/arrow-linear-pointer.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__bar_linear_pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/linear/bar-linear-pointer.js"); - - - - - - - - - -var DEFAULT_MIN_WIDTH = 60; -var DEFAULT_MIN_HEIGHT = 60; - -var Group = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group; - -var LinearGauge = (function (Gauge) { - function LinearGauge () { - Gauge.apply(this, arguments); - } - - if ( Gauge ) LinearGauge.__proto__ = Gauge; - LinearGauge.prototype = Object.create( Gauge && Gauge.prototype ); - LinearGauge.prototype.constructor = LinearGauge; - - LinearGauge.prototype.reflow = function reflow (bbox) { - var pointers = this.pointers; - var bboxX = bbox.origin.x; - var bboxY = bbox.origin.y; - - var box = new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */](bboxX, bboxY, bboxX + bbox.width(), bboxY + bbox.height()); - - this.scale.reflow(box); - this._shrinkScaleWidth(box); - - for (var i = 0; i < pointers.length; i++) { - pointers[i].reflow(); - } - - this.bbox = this._getBox(box); - this._alignElements(); - this._shrinkElements(); - this._buildVisual(); - this._draw(); - }; - - LinearGauge.prototype._buildVisual = function _buildVisual () { - var visuals = new Group(); - var scaleElements = this.scale.render(); - var pointers = this.pointers; - - visuals.append(this.gaugeArea); - visuals.append(scaleElements); - - for (var i = 0; i < pointers.length; i++) { - var current = pointers[i]; - visuals.append(current.render()); - current.value(current.options.value); - } - - this._visuals = visuals; - }; - - LinearGauge.prototype._createModel = function _createModel () { - var this$1 = this; - - var options = this.options; - var scale = this.scale = new __WEBPACK_IMPORTED_MODULE_5__linear_scale__["a" /* default */](options.scale, this.contextService); - - this.pointers = []; - - var pointers = options.pointer; - pointers = Object(__WEBPACK_IMPORTED_MODULE_2__common__["z" /* isArray */])(pointers) ? pointers : [ pointers ]; - - for (var i = 0; i < pointers.length; i++) { - var currentOptions = Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])({}, pointers[i], { - animation: { - transitions: options.transitions - } - }); - var pointerType = currentOptions.shape === __WEBPACK_IMPORTED_MODULE_3__constants__["b" /* ARROW */] ? __WEBPACK_IMPORTED_MODULE_6__arrow_linear_pointer__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_7__bar_linear_pointer__["a" /* default */]; - - this$1.pointers.push(new pointerType(scale, currentOptions)); - } - }; - - LinearGauge.prototype._defaultSize = function _defaultSize () { - var vertical = this.options.scale.vertical; - - return { - width: vertical ? DEFAULT_MIN_WIDTH : __WEBPACK_IMPORTED_MODULE_3__constants__["g" /* DEFAULT_WIDTH */], - height: vertical ? __WEBPACK_IMPORTED_MODULE_3__constants__["e" /* DEFAULT_HEIGHT */] : DEFAULT_MIN_HEIGHT - }; - }; - - LinearGauge.prototype._getBox = function _getBox (box) { - var ref = this; - var scale = ref.scale; - var pointers = ref.pointers; - var boxCenter = box.center(); - var plotAreaBox = pointers[0].box.clone().wrap(scale.box); - - for (var i = 0; i < pointers.length; i++) { - plotAreaBox.wrap(pointers[i].box.clone()); - } - - var size; - if (scale.options.vertical) { - size = plotAreaBox.width() / 2; - plotAreaBox = new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */]( - boxCenter.x - size, box.y1, - boxCenter.x + size, box.y2 - ); - } else { - size = plotAreaBox.height() / 2; - plotAreaBox = new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */]( - box.x1, boxCenter.y - size, - box.x2, boxCenter.y + size - ); - } - - return plotAreaBox; - }; - - LinearGauge.prototype._alignElements = function _alignElements () { - var this$1 = this; - - var ref = this; - var scale = ref.scale; - var pointers = ref.pointers; - var scaleBox = scale.box; - var box = pointers[0].box.clone().wrap(scale.box); - var plotAreaBox = this.bbox; - - for (var i = 0; i < pointers.length; i++) { - box.wrap(pointers[i].box.clone()); - } - - var diff; - if (scale.options.vertical) { - diff = plotAreaBox.center().x - box.center().x; - scale.reflow(new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */]( - scaleBox.x1 + diff, plotAreaBox.y1, - scaleBox.x2 + diff, plotAreaBox.y2 - )); - } else { - diff = plotAreaBox.center().y - box.center().y; - scale.reflow(new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */]( - scaleBox.x1, scaleBox.y1 + diff, - scaleBox.x2, scaleBox.y2 + diff - )); - } - - for (var i$1 = 0; i$1 < pointers.length; i$1++) { - pointers[i$1].reflow(this$1.bbox); - } - }; - - LinearGauge.prototype._shrinkScaleWidth = function _shrinkScaleWidth (bbox) { - var ref = this; - var scale = ref.scale; - if (!scale.options.vertical) { - var overflow = scale.contentBox().width() - bbox.width(); - if (overflow > 0) { - scale.box.shrink(overflow, 0); - scale.box.alignTo(bbox, 'center'); - scale.reflow(scale.box); - } - } - }; - - LinearGauge.prototype._shrinkElements = function _shrinkElements () { - var this$1 = this; - - var ref = this; - var scale = ref.scale; - var pointers = ref.pointers; - var scaleBox = scale.box.clone(); - var pos = scale.options.vertical ? "y" : "x"; - var pointerBox = pointers[0].box; - - for (var i = 0; i < pointers.length; i++) { - pointerBox.wrap(pointers[i].box.clone()); - } - - scaleBox[pos + 1] += Math.max(scaleBox[pos + 1] - pointerBox[pos + 1], 0); - scaleBox[pos + 2] -= Math.max(pointerBox[pos + 2] - scaleBox[pos + 2], 0); - - scale.reflow(scaleBox); - - for (var i$1 = 0; i$1 < pointers.length; i$1++) { - pointers[i$1].reflow(this$1.bbox); - } - }; - - return LinearGauge; -}(__WEBPACK_IMPORTED_MODULE_4__gauge__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["M" /* setDefaultOptions */])(LinearGauge, { - transitions: true, - gaugeArea: { - background: "" - }, - scale: { - vertical: true - } -}); - -/* unused harmony default export */ var _unused_webpack_default_export = (LinearGauge); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/linear/linear-pointer.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/pointer.js"); - - - - - - -var LinearPointer = (function (Pointer) { - function LinearPointer(scale, options) { - Pointer.call(this, scale, options); - - this.options = Object(__WEBPACK_IMPORTED_MODULE_0__common__["k" /* deepExtend */])({ - track: { - visible: Object(__WEBPACK_IMPORTED_MODULE_0__common__["l" /* defined */])(options.track) - } - }, this.options); - } - - if ( Pointer ) LinearPointer.__proto__ = Pointer; - LinearPointer.prototype = Object.create( Pointer && Pointer.prototype ); - LinearPointer.prototype.constructor = LinearPointer; - - LinearPointer.prototype.reflow = function reflow () { - var ref = this; - var options = ref.options; - var scale = ref.scale; - var ref$1 = scale.options; - var mirror = ref$1.mirror; - var vertical = ref$1.vertical; - var scaleLine = scale.lineBox(); - var trackSize = options.track.size || options.size; - var pointerHalfSize = options.size / 2; - var margin = Object(__WEBPACK_IMPORTED_MODULE_0__common__["s" /* getSpacing */])(options.margin); - var space = vertical ? - margin[mirror ? "left" : "right"] : - margin[mirror ? "bottom" : "top"]; - var pointerBox, pointerRangeBox, trackBox; - - space = mirror ? -space : space; - - if (vertical) { - trackBox = new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */]( - scaleLine.x1 + space, scaleLine.y1, - scaleLine.x1 + space, scaleLine.y2); - - if (mirror) { - trackBox.x1 -= trackSize; - } else { - trackBox.x2 += trackSize; - } - - if (options.shape !== __WEBPACK_IMPORTED_MODULE_3__constants__["d" /* BAR_POINTER */]) { - pointerRangeBox = new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */]( - scaleLine.x2 + space, scaleLine.y1 - pointerHalfSize, - scaleLine.x2 + space, scaleLine.y2 + pointerHalfSize - ); - pointerBox = pointerRangeBox; - } - } else { - trackBox = new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */]( - scaleLine.x1, scaleLine.y1 - space, - scaleLine.x2, scaleLine.y1 - space); - - if (mirror) { - trackBox.y2 += trackSize; - } else { - trackBox.y1 -= trackSize; - } - - if (options.shape !== __WEBPACK_IMPORTED_MODULE_3__constants__["d" /* BAR_POINTER */]) { - pointerRangeBox = new __WEBPACK_IMPORTED_MODULE_1__core__["a" /* Box */]( - scaleLine.x1 - pointerHalfSize, scaleLine.y1 - space, - scaleLine.x2 + pointerHalfSize, scaleLine.y1 - space - ); - pointerBox = pointerRangeBox; - } - } - - this.trackBox = trackBox; - this.pointerRangeBox = pointerRangeBox; - this.box = pointerBox || trackBox.clone().pad(options.border.width); - }; - - LinearPointer.prototype.getElementOptions = function getElementOptions () { - var options = this.options; - - return { - fill: { - color: options.color, - opacity: options.opacity - }, - stroke: Object(__WEBPACK_IMPORTED_MODULE_0__common__["l" /* defined */])(options.border) ? { - color: options.border.width ? options.border.color || options.color : "", - width: options.border.width, - dashType: options.border.dashType, - opacity: options.opacity - } : null - }; - }; - - LinearPointer.prototype._margin = function _margin () { - var ref = this; - var scale = ref.scale; - var options = ref.options; - var ref$1 = scale.options; - var mirror = ref$1.mirror; - var vertical = ref$1.vertical; - var margin = Object(__WEBPACK_IMPORTED_MODULE_0__common__["s" /* getSpacing */])(options.margin); - - var space = vertical ? - margin[mirror ? "left" : "right"] : - margin[mirror ? "bottom" : "top"]; - - return space; - }; - - return LinearPointer; -}(__WEBPACK_IMPORTED_MODULE_4__pointer__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_0__common__["M" /* setDefaultOptions */])(LinearPointer, { - shape: __WEBPACK_IMPORTED_MODULE_3__constants__["d" /* BAR_POINTER */], - - track: { - border: { - width: 1 - } - }, - - color: __WEBPACK_IMPORTED_MODULE_2__common_constants__["c" /* BLACK */], - border: { - width: 1 - }, - opacity: 1, - - margin: Object(__WEBPACK_IMPORTED_MODULE_0__common__["s" /* getSpacing */])(3), - animation: { - type: __WEBPACK_IMPORTED_MODULE_3__constants__["d" /* BAR_POINTER */] - }, - visible: true -}); - -/* harmony default export */ __webpack_exports__["a"] = (LinearPointer); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/linear/linear-scale.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/utils.js"); - - - - - - - - -var Path = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path; -var Group = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group; -var Point = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point; - -function renderAxisTick(tickRenderOptions, tickOptions) { - var position = tickRenderOptions.position; - var tickX = tickRenderOptions.tickX; - var tickY = tickRenderOptions.tickY; - var start, end; - - if (tickRenderOptions.vertical) { - start = new Point(tickX, position); - end = new Point(tickX + tickOptions.size, position); - } else { - start = new Point(position, tickY); - end = new Point(position, tickY + tickOptions.size); - } - - var tickPath = new Path({ - stroke: { - color: tickOptions.color, - width: tickOptions.width - } - }).moveTo(start).lineTo(end); - - return tickPath; -} - -function renderTicks(tickGroup, tickPositions, tickRenderOptions, tickOptions) { - var count = tickPositions.length; - - if (tickOptions.visible) { - var mirror = tickRenderOptions.mirror; - var lineBox = tickRenderOptions.lineBox; - for (var i = tickOptions.skip; i < count; i += tickOptions.step) { - if (i % tickOptions.skipUnit === 0) { - continue; - } - - tickRenderOptions.tickX = mirror ? lineBox.x2 : lineBox.x2 - tickOptions.size; - tickRenderOptions.tickY = mirror ? lineBox.y1 - tickOptions.size : lineBox.y1; - tickRenderOptions.position = tickPositions[i]; - - tickGroup.append(renderAxisTick(tickRenderOptions, tickOptions)); - } - } -} - -var LinearScale = (function (NumericAxis) { - function LinearScale(options, service) { - var scaleOptions = options || {}; - if (!Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(scaleOptions.reverse) && scaleOptions.vertical === false && (service || {}).rtl) { - scaleOptions.reverse = true; - } - - NumericAxis.call(this, 0, 1, scaleOptions, service); - - this.options.minorUnit = this.options.minorUnit || this.options.majorUnit / 10; - } - - if ( NumericAxis ) LinearScale.__proto__ = NumericAxis; - LinearScale.prototype = Object.create( NumericAxis && NumericAxis.prototype ); - LinearScale.prototype.constructor = LinearScale; - - LinearScale.prototype.initUserOptions = function initUserOptions (options) { - var scaleOptions = Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])({}, this.options, options); - scaleOptions = Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])({}, scaleOptions , { labels: { mirror: scaleOptions.mirror } }); - scaleOptions.majorUnit = scaleOptions.majorUnit || Object(__WEBPACK_IMPORTED_MODULE_3__core__["w" /* autoMajorUnit */])(scaleOptions.min, scaleOptions.max); - - return scaleOptions; - }; - - LinearScale.prototype.initFields = function initFields () { - }; - - LinearScale.prototype.render = function render () { - var elements = this.elements = new Group(); - var labels = this.renderLabels(); - var scaleLine = this.renderLine(); - var scaleTicks = this.renderTicks(); - var ranges = this.renderRanges(); - - elements.append(scaleLine, labels, scaleTicks, ranges); - - return elements; - }; - - LinearScale.prototype.renderRanges = function renderRanges () { - var this$1 = this; - - var options = this.options; - var min = options.min; - var max = options.max; - var vertical = options.vertical; - var mirror = options.labels.mirror; - var ranges = options.ranges || []; - var elements = new Group(); - var count = ranges.length; - var rangeSize = options.rangeSize || options.minorTicks.size / 2; - - for (var i = 0; i < count; i++) { - var range = Object(__WEBPACK_IMPORTED_MODULE_5__utils__["b" /* getRange */])(ranges[i], min, max); - var slot = this$1.getSlot(range.from, range.to); - var slotX = vertical ? this$1.lineBox() : slot; - var slotY = vertical ? slot : this$1.lineBox(); - if (vertical) { - slotX.x1 -= rangeSize * (mirror ? -1 : 1); - } else { - slotY.y2 += rangeSize * (mirror ? -1 : 1); - } - - elements.append(Path.fromRect(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect([ slotX.x1, slotY.y1 ], [ slotX.x2 - slotX.x1, slotY.y2 - slotY.y1 ]), { - fill: { color: range.color, opacity: range.opacity }, - stroke: { } - })); - } - - return elements; - }; - - LinearScale.prototype.renderLabels = function renderLabels () { - var ref = this; - var labels = ref.labels; - var options = ref.options; - var elements = new Group(); - - for (var i = 0; i < labels.length; i++) { - elements.append(Object(__WEBPACK_IMPORTED_MODULE_5__utils__["a" /* buildLabelElement */])(labels[i], options.labels)); - } - - return elements; - }; - - LinearScale.prototype.renderLine = function renderLine () { - var line = this.options.line; - var lineBox = this.lineBox(); - var elements = new Group(); - - if (line.width > 0 && line.visible) { - var linePath = new Path({ - stroke: { - color: line.color, - dashType: line.dashType, - width: line.width - } - }); - - linePath.moveTo(lineBox.x1, lineBox.y1).lineTo(lineBox.x2, lineBox.y2); - elements.append(linePath); - } - - return elements; - }; - - LinearScale.prototype.renderTicks = function renderTicks$1 () { - var ticks = new Group(); - var options = this.options; - var majorUnit = options.majorTicks.visible ? options.majorUnit : 0; - var tickRenderOptions = { - vertical: options.vertical, - mirror: options.labels.mirror, - lineBox: this.lineBox() - }; - - renderTicks(ticks, this.getMajorTickPositions(), tickRenderOptions, options.majorTicks); - renderTicks(ticks, this.getMinorTickPositions(), tickRenderOptions, Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])({}, { - skipUnit: majorUnit / options.minorUnit - }, options.minorTicks)); - - return ticks; - }; - - return LinearScale; -}(__WEBPACK_IMPORTED_MODULE_3__core__["k" /* NumericAxis */])); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["M" /* setDefaultOptions */])(LinearScale, { - min: 0, - max: 50, - - majorTicks: { - size: 15, - align: __WEBPACK_IMPORTED_MODULE_4__constants__["i" /* INSIDE */], - color: __WEBPACK_IMPORTED_MODULE_2__common_constants__["c" /* BLACK */], - width: __WEBPACK_IMPORTED_MODULE_4__constants__["f" /* DEFAULT_LINE_WIDTH */], - visible: true - }, - - minorTicks: { - size: 10, - align: __WEBPACK_IMPORTED_MODULE_4__constants__["i" /* INSIDE */], - color: __WEBPACK_IMPORTED_MODULE_2__common_constants__["c" /* BLACK */], - width: __WEBPACK_IMPORTED_MODULE_4__constants__["f" /* DEFAULT_LINE_WIDTH */], - visible: true - }, - - line: { - width: __WEBPACK_IMPORTED_MODULE_4__constants__["f" /* DEFAULT_LINE_WIDTH */] - }, - - labels: { - position: __WEBPACK_IMPORTED_MODULE_4__constants__["i" /* INSIDE */], - padding: 2 - }, - mirror: false, - _alignLines: false -}); - -/* harmony default export */ __webpack_exports__["a"] = (LinearScale); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/pointer.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); - - - -var Pointer = (function (Class) { - function Pointer(scale, userOptions) { - Class.call(this); - - var ref = scale.options; - var min = ref.min; - var max = ref.max; - var options = this.options = Object(__WEBPACK_IMPORTED_MODULE_0__common__["k" /* deepExtend */])({}, this.options, userOptions); - - options.fill = options.color; - - this.scale = scale; - - if (Object(__WEBPACK_IMPORTED_MODULE_0__common__["l" /* defined */])(options.value)) { - options.value = Object(__WEBPACK_IMPORTED_MODULE_0__common__["F" /* limitValue */])(options.value, min, max); - } else { - options.value = min; - } - } - - if ( Class ) Pointer.__proto__ = Class; - Pointer.prototype = Object.create( Class && Class.prototype ); - Pointer.prototype.constructor = Pointer; - - Pointer.prototype.value = function value (newValue) { - var options = this.options; - var value = options.value; - - if (arguments.length === 0) { - return value; - } - - var ref = this.scale.options; - var min = ref.min; - var max = ref.max; - - options._oldValue = Object(__WEBPACK_IMPORTED_MODULE_0__common__["l" /* defined */])(options._oldValue) ? options.value : min; - options.value = Object(__WEBPACK_IMPORTED_MODULE_0__common__["F" /* limitValue */])(newValue, min, max); - - if (this.elements) { - this.repaint(); - } - }; - - return Pointer; -}(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* Class */])); - -Object(__WEBPACK_IMPORTED_MODULE_0__common__["M" /* setDefaultOptions */])(Pointer, { - color: __WEBPACK_IMPORTED_MODULE_1__common_constants__["c" /* BLACK */] -}); - -/* harmony default export */ __webpack_exports__["a"] = (Pointer); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/radial/radial-gauge.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__gauge__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/gauge.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__radial_scale__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/radial/radial-scale.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__radial_pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/radial/radial-pointer.js"); - - - - - - - -var Group = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group; - -var RadialGauge = (function (Gauge) { - function RadialGauge () { - Gauge.apply(this, arguments); - } - - if ( Gauge ) RadialGauge.__proto__ = Gauge; - RadialGauge.prototype = Object.create( Gauge && Gauge.prototype ); - RadialGauge.prototype.constructor = RadialGauge; - - RadialGauge.prototype.reflow = function reflow (bbox) { - var this$1 = this; - - var pointers = this.pointers; - this.scale.reflow(bbox); - this._initialPlotArea = this.scale.bbox; - - for (var i = 0; i < pointers.length; i++) { - pointers[i].reflow(this$1.scale.arc); - this$1._initialPlotArea = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect.union(this$1._initialPlotArea, pointers[i].bbox); - } - - this.fitScale(bbox); - this.alignScale(bbox); - this._buildVisual(this.gaugeArea, pointers, this.scale); - this._draw(); - }; - - RadialGauge.prototype._buildVisual = function _buildVisual (gaugeArea, pointers, scale) { - var visuals = this._visuals = new Group(); - - visuals.append(gaugeArea); - visuals.append(scale.ticks); - visuals.append(scale.ranges); - this._buildPointers(pointers); - visuals.append(scale.labelElements); - }; - - RadialGauge.prototype._buildPointers = function _buildPointers (pointers) { - var this$1 = this; - - for (var i = 0; i < pointers.length; i++) { - var current = pointers[i]; - current.render(); - this$1._visuals.append(current.elements); - - current.value(current.options.value); - } - }; - - RadialGauge.prototype.fitScale = function fitScale (bbox) { - var this$1 = this; - - var arc = this.scale.arc; - var plotAreaBox = this._initialPlotArea; - var step = Math.abs(this.getDiff(plotAreaBox, bbox)); - var min = Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])(step, __WEBPACK_IMPORTED_MODULE_2__common_constants__["g" /* COORD_PRECISION */]); - var max = Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])(-step, __WEBPACK_IMPORTED_MODULE_2__common_constants__["g" /* COORD_PRECISION */]); - var minDiff, midDiff, maxDiff, mid, oldDiff; - var staleFlag = 0; - var i = 0; - - while (i++ < 100) { - staleFlag = (oldDiff === maxDiff) ? (staleFlag + 1) : 0; - - if (staleFlag > 5) { - break; - } - - if (min !== mid) { - minDiff = this$1.getPlotBox(min, bbox, arc); - if (0 <= minDiff && minDiff <= 2) { - break; - } - } - - if (max !== mid) { - maxDiff = this$1.getPlotBox(max, bbox, arc); - if (0 <= maxDiff && maxDiff <= 2) { - break; - } - } - - if (minDiff > 0 && maxDiff > 0) { - mid = min * 2; - } else if (minDiff < 0 && maxDiff < 0) { - mid = max * 2; - } else { - mid = Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])(((min + max) / 2) || 1, __WEBPACK_IMPORTED_MODULE_2__common_constants__["g" /* COORD_PRECISION */]); - } - - midDiff = this$1.getPlotBox(mid, bbox, arc); - if (0 <= midDiff && midDiff <= 2) { - break; - } - - oldDiff = maxDiff; - - if (midDiff > 0) { - max = mid; - maxDiff = midDiff; - } else { - min = mid; - minDiff = midDiff; - } - } - }; - - RadialGauge.prototype.getPlotBox = function getPlotBox (step, bbox, arc) { - var this$1 = this; - - var scale = this.scale; - var pointers = this.pointers; - var radius = arc.getRadiusX(); - var scaleArc = arc.clone(); - - scaleArc.setRadiusX(radius + step).setRadiusY(radius + step); - - scale.arc = scaleArc; - scale.reflow(bbox); - this.plotBbox = scale.bbox; - - for (var i = 0; i < pointers.length; i++) { - pointers[i].reflow(scaleArc); - this$1.plotBbox = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect.union(this$1.plotBbox, pointers[i].bbox); - } - - return this.getDiff(this.plotBbox, bbox); - }; - - RadialGauge.prototype.getDiff = function getDiff (plotBox, box) { - return Math.min(box.width() - plotBox.width(), box.height() - plotBox.height()); - }; - - RadialGauge.prototype.alignScale = function alignScale (bbox) { - var this$1 = this; - - var plotBoxCenter = this.plotBbox.center(); - var boxCenter = bbox.center(); - var paddingX = plotBoxCenter.x - boxCenter.x; - var paddingY = plotBoxCenter.y - boxCenter.y; - var ref = this; - var scale = ref.scale; - var pointers = ref.pointers; - - scale.arc.center.x -= paddingX; - scale.arc.center.y -= paddingY; - - scale.reflow(bbox); - - for (var i = 0; i < pointers.length; i++) { - pointers[i].reflow(scale.arc); - this$1.plotBbox = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect.union(scale.bbox, pointers[i].bbox); - } - }; - - RadialGauge.prototype._createModel = function _createModel () { - var this$1 = this; - - var options = this.options; - var pointers = options.pointer; - var scale = this.scale = new __WEBPACK_IMPORTED_MODULE_4__radial_scale__["a" /* default */](options.scale, this.contextService); - - this.pointers = []; - - var pointersArr = Object(__WEBPACK_IMPORTED_MODULE_1__common__["z" /* isArray */])(pointers) ? pointers : [ pointers ]; - for (var i = 0; i < pointersArr.length; i++) { - var current = new __WEBPACK_IMPORTED_MODULE_5__radial_pointer__["a" /* default */](scale, Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])({}, pointersArr[i], { - animation: { - transitions: options.transitions - } - })); - - this$1.pointers.push(current); - } - }; - - return RadialGauge; -}(__WEBPACK_IMPORTED_MODULE_3__gauge__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["M" /* setDefaultOptions */])(RadialGauge, { - transitions: true, - gaugeArea: { - background: "" - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (RadialGauge); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/radial/radial-pointer-animation.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/constants.js"); - - - - -var RadialPointerAnimation = (function (superclass) { - function RadialPointerAnimation(element, options) { - superclass.call(this, element, options); - - var animationOptions = this.options; - - animationOptions.duration = Math.max((Math.abs(animationOptions.newAngle - animationOptions.oldAngle) / animationOptions.duration) * 1000, 1); - } - - if ( superclass ) RadialPointerAnimation.__proto__ = superclass; - RadialPointerAnimation.prototype = Object.create( superclass && superclass.prototype ); - RadialPointerAnimation.prototype.constructor = RadialPointerAnimation; - - RadialPointerAnimation.prototype.step = function step (pos) { - var options = this.options; - var angle = Object(__WEBPACK_IMPORTED_MODULE_1__common__["y" /* interpolateValue */])(options.oldAngle, options.newAngle, pos); - - this.element.transform(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform().rotate(angle, options.center)); - }; - - return RadialPointerAnimation; -}(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Animation)); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["M" /* setDefaultOptions */])(RadialPointerAnimation, { - easing: __WEBPACK_IMPORTED_MODULE_2__constants__["j" /* LINEAR */], - duration: __WEBPACK_IMPORTED_MODULE_2__constants__["a" /* ANGULAR_SPEED */] -}); - -__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].AnimationFactory.current.register(__WEBPACK_IMPORTED_MODULE_2__constants__["m" /* RADIAL_POINTER */], RadialPointerAnimation); - -/* harmony default export */ __webpack_exports__["a"] = (RadialPointerAnimation); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/radial/radial-pointer.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__pointer__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/pointer.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__radial_pointer_animation__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/radial/radial-pointer-animation.js"); - - - - - - - -var CAP_SIZE = 0.05; -var Circle = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Circle; -var Group = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group; -var Path = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path; - -var RadialPointer = (function (Pointer) { - function RadialPointer () { - Pointer.apply(this, arguments); - } - - if ( Pointer ) RadialPointer.__proto__ = Pointer; - RadialPointer.prototype = Object.create( Pointer && Pointer.prototype ); - RadialPointer.prototype.constructor = RadialPointer; - - RadialPointer.prototype.setAngle = function setAngle (angle) { - this.elements.transform(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform().rotate(angle, this.center)); - }; - - RadialPointer.prototype.repaint = function repaint () { - var ref = this; - var scale = ref.scale; - var options = ref.options; - var oldAngle = scale.slotAngle(options._oldValue); - var newAngle = scale.slotAngle(options.value); - - if (options.animation.transitions === false) { - this.setAngle(newAngle); - } else { - new __WEBPACK_IMPORTED_MODULE_4__radial_pointer_animation__["a" /* default */](this.elements, Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])(options.animation, { - oldAngle: oldAngle, - newAngle: newAngle - })).play(); - } - }; - - RadialPointer.prototype.render = function render () { - var ref = this; - var scale = ref.scale; - var options = ref.options; - var elements = new Group(); - - if (options.animation !== false) { - Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])(options.animation, { - startAngle: 0, - center: scale.arc.center, - reverse: scale.options.reverse - }); - } - - elements.append(this._renderNeedle(), this._renderCap()); - - this.elements = elements; - this.setAngle(__WEBPACK_IMPORTED_MODULE_2__constants__["h" /* DEGREE */]); - - return elements; - }; - - RadialPointer.prototype.reflow = function reflow (arc) { - var center = this.center = arc.center; - var radius = this.radius = arc.getRadiusX(); - var capSize = this.capSize = Math.round(radius * this.options.cap.size); - - this.bbox = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect.fromPoints(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(center.x - capSize, center.y - capSize), - new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(center.x + capSize, center.y + capSize)); - }; - - RadialPointer.prototype._renderNeedle = function _renderNeedle () { - var minorTickSize = this.scale.options.minorTicks.size; - var center = this.center; - var needleColor = this.options.color; - - var needlePath = new Path({ - fill: { color: needleColor }, - stroke: { color: needleColor, width: __WEBPACK_IMPORTED_MODULE_2__constants__["f" /* DEFAULT_LINE_WIDTH */] } - }); - - needlePath.moveTo(center.x + this.radius - minorTickSize, center.y) - .lineTo(center.x, center.y - (this.capSize / 2)) - .lineTo(center.x, center.y + (this.capSize / 2)) - .close(); - - return needlePath; - }; - - RadialPointer.prototype._renderCap = function _renderCap () { - var options = this.options; - var capColor = options.cap.color || options.color; - var circle = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Circle(this.center, this.capSize); - - var cap = new Circle(circle, { - fill: { color: capColor }, - stroke: { color: capColor } - }); - - return cap; - }; - - return RadialPointer; -}(__WEBPACK_IMPORTED_MODULE_3__pointer__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["M" /* setDefaultOptions */])(RadialPointer, { - cap: { - size: CAP_SIZE - }, - arrow: { - width: 16, - height: 14 - }, - animation: { - type: __WEBPACK_IMPORTED_MODULE_2__constants__["m" /* RADIAL_POINTER */], - duration: __WEBPACK_IMPORTED_MODULE_2__constants__["a" /* ANGULAR_SPEED */] - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (RadialPointer); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/radial/radial-scale.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/constants.js"); - - - - - - - - -var GEO_ARC_ADJUST_ANGLE = 180; - -var Arc = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Arc; -var Path = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path; -var Group = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group; - -function drawTicks(arc, tickAngles, unit, tickOptions) { - var ticks = new Group(); - var center = arc.center; - var radius = arc.getRadiusX(); - - if (tickOptions.visible) { - for (var i = 0; i < tickAngles.length; i++) { - var tickStart = arc.pointAt(tickAngles[i]); - var tickEnd = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(center.x + radius - tickOptions.size, center.y).rotate(tickAngles[i], center); - - ticks.append(new Path({ - stroke: { - color: tickOptions.color, - width: tickOptions.width - } - }).moveTo(tickStart).lineTo(tickEnd)); - } - } - - return ticks; -} - -function rangeSegment(from, to, color, opacity) { - return { from: from, to: to, color: color, opacity: opacity }; -} - -var RadialScale = (function (NumericAxis) { - function RadialScale(options, service) { - NumericAxis.call(this, 0, 1, options, service); - } - - if ( NumericAxis ) RadialScale.__proto__ = NumericAxis; - RadialScale.prototype = Object.create( NumericAxis && NumericAxis.prototype ); - RadialScale.prototype.constructor = RadialScale; - - RadialScale.prototype.initUserOptions = function initUserOptions (options) { - var scaleOptions = Object(__WEBPACK_IMPORTED_MODULE_1__common__["k" /* deepExtend */])({}, this.options, options); - scaleOptions.majorUnit = scaleOptions.majorUnit || Object(__WEBPACK_IMPORTED_MODULE_3__core__["w" /* autoMajorUnit */])(scaleOptions.min, scaleOptions.max); - scaleOptions.minorUnit = scaleOptions.minorUnit || scaleOptions.majorUnit / 10; - - return scaleOptions; - }; - - RadialScale.prototype.initFields = function initFields () { - }; - - RadialScale.prototype.render = function render (center, radius) { - var arc = this.renderArc(center, radius); - - this.bbox = arc.bbox(); - this.labelElements = this.renderLabels(); - this.ticks = this.renderTicks(); - this.ranges = this.renderRanges(); - }; - - RadialScale.prototype.reflow = function reflow (bbox) { - var center = bbox.center(); - var radius = Math.min(bbox.height(), bbox.width()) / 2; - - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(this.bbox)) { - this.bbox = this.arc.bbox(); - this.radius(this.arc.getRadiusX()); - this.repositionRanges(); - this.renderLabels(); - } else { - return this.render(center, radius); - } - }; - - RadialScale.prototype.slotAngle = function slotAngle (value) { - var ref = this.options; - var min = ref.min; - var max = ref.max; - var reverse = ref.reverse; - var startAngle = ref.startAngle; - var endAngle = ref.endAngle; - var angle = endAngle - startAngle; - var result; - - if (reverse) { - result = endAngle - (value - min) / (max - min) * angle; - } else { - result = ((value - min) / (max - min) * angle) + startAngle; - } - - return result + GEO_ARC_ADJUST_ANGLE; - }; - - RadialScale.prototype.hasRanges = function hasRanges () { - var ranges = this.options.ranges; - - return ranges && ranges.length; - }; - - RadialScale.prototype.renderLabels = function renderLabels () { - var this$1 = this; - - var options = this.options; - var majorTickSize = options.majorTicks.size; - var arc = this.arc.clone(); - var radius = arc.getRadiusX(); - var tickAngles = this.tickAngles(arc, options.majorUnit); - var rangeSize = options.rangeSize = options.rangeSize || radius * 0.1; - var labelsGroup = new Group(); - - var rangeDistance = radius * 0.05; - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(this.options.rangeDistance)) { - rangeDistance = this.options.rangeDistance; - } else { - this.options.rangeDistance = rangeDistance; - } - - var labelsOptions = options.labels; - var isInside = labelsOptions.position === __WEBPACK_IMPORTED_MODULE_5__constants__["i" /* INSIDE */]; - var hasLabelElements = Object(__WEBPACK_IMPORTED_MODULE_1__common__["l" /* defined */])(this.labelElements); - - if (isInside) { - radius -= majorTickSize; - - if (this.hasRanges() && !hasLabelElements) { - radius -= rangeSize + rangeDistance; - } - arc.setRadiusX(radius).setRadiusY(radius); - } - - var labels = this.labels; - var count = labels.length; - var padding = labelsOptions.padding; - - for (var i = 0; i < count; i++) { - var label = labels[i]; - var halfWidth = label.box.width() / 2; - var halfHeight = label.box.height() / 2; - var angle = tickAngles[i]; - var labelAngle = (angle - GEO_ARC_ADJUST_ANGLE) * __WEBPACK_IMPORTED_MODULE_5__constants__["h" /* DEGREE */]; - - var lp = arc.pointAt(angle); - var cx = lp.x + (Math.cos(labelAngle) * (halfWidth + padding) * (isInside ? 1 : -1)); - var cy = lp.y + (Math.sin(labelAngle) * (halfHeight + padding) * (isInside ? 1 : -1)); - - label.reflow(new __WEBPACK_IMPORTED_MODULE_3__core__["a" /* Box */](cx - halfWidth, cy - halfHeight, cx + halfWidth, cy + halfHeight)); - var labelPos = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(label.box.x1, label.box.y1); - - var labelElement = (void 0); - if (!hasLabelElements) { - labelElement = Object(__WEBPACK_IMPORTED_MODULE_4__utils__["a" /* buildLabelElement */])(label, options.labels); - labelsGroup.append(labelElement); - } else { - labelElement = this$1.labelElements.children[i]; - var prevLabelPos = labelElement.bbox().origin; - - var labelTransform = labelElement.transform() || __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform(); - labelTransform.translate(labelPos.x - prevLabelPos.x, labelPos.y - prevLabelPos.y); - labelElement.transform(labelTransform); - } - - this$1.bbox = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect.union(this$1.bbox, labelElement.bbox()); - } - - return labelsGroup; - }; - - RadialScale.prototype.repositionRanges = function repositionRanges () { - var ranges = this.ranges.children; - - if (ranges.length > 0) { - var ref = this.options; - var rangeDistance = ref.rangeDistance; - var rangeSize = ref.rangeSize; - var rangeRadius = this.getRangeRadius(); - - if (this.options.labels.position === __WEBPACK_IMPORTED_MODULE_5__constants__["i" /* INSIDE */]) { - rangeRadius += rangeSize + rangeDistance; - } - - var newRadius = rangeRadius + (rangeSize / 2); - - for (var i = 0; i < ranges.length; i++) { - ranges[i]._geometry.setRadiusX(newRadius).setRadiusY(newRadius); - } - - this.bbox = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect.union(this.bbox, this.ranges.bbox()); - } - }; - - RadialScale.prototype.renderRanges = function renderRanges () { - var this$1 = this; - - var segments = this.rangeSegments(); - var segmentsCount = segments.length; - var result = new Group(); - - if (segmentsCount) { - var ref = this.options; - var rangeSize = ref.rangeSize; - var reverse = ref.reverse; - var rangeDistance = ref.rangeDistance; - var rangeRadius = this.getRangeRadius(); - - // move the ticks with a range distance and a range size - this.radius(this.radius() - rangeSize - rangeDistance); - - for (var i = 0; i < segmentsCount; i++) { - var segment = segments[i]; - var from = this$1.slotAngle(segment[reverse ? "to" : "from"]); - var to = this$1.slotAngle(segment[!reverse ? "to" : "from"]); - - if (to - from !== 0) { - result.append(this$1.createRange(from, to, rangeRadius, segment)); - } - } - } - - return result; - }; - - RadialScale.prototype.createRange = function createRange (startAngle, endAngle, rangeRadius, options) { - var rangeSize = this.options.rangeSize; - var rangeGeom = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Arc(this.arc.center, { - radiusX: rangeRadius + (rangeSize / 2), - radiusY: rangeRadius + (rangeSize / 2), - startAngle: startAngle, - endAngle: endAngle - }); - - return new Arc(rangeGeom, { - stroke: { - width: rangeSize, - color: options.color, - opacity: options.opacity, - lineCap: options.lineCap - } - }); - }; - - RadialScale.prototype.rangeSegments = function rangeSegments () { - var options = this.options; - var ranges = options.ranges || []; - var count = ranges.length; - var segments = []; - - if (count) { - var min = options.min; - var max = options.max; - var defaultColor = options.rangePlaceholderColor; - segments.push(rangeSegment(min, max, defaultColor)); - - for (var i = 0; i < count; i++) { - var range = Object(__WEBPACK_IMPORTED_MODULE_4__utils__["b" /* getRange */])(ranges[i], min, max); - var segmentsCount = segments.length; - - for (var j = 0; j < segmentsCount; j++) { - var segment = segments[j]; - - if (segment.from <= range.from && range.from <= segment.to) { - segments.push(rangeSegment(range.from, range.to, range.color, range.opacity)); - - if (segment.from <= range.to && range.to <= segment.to) { - segments.push(rangeSegment(range.to, segment.to, defaultColor, range.opacity)); - } - - segment.to = range.from; - - break; - } - } - } - } - - return segments; - }; - - RadialScale.prototype.getRangeRadius = function getRangeRadius () { - var ref = this; - var arc = ref.arc; - var options = ref.options; - var rangeSize = options.rangeSize; - var rangeDistance = options.rangeDistance; - var majorTickSize = options.majorTicks.size; - var radius; - - if (options.labels.position === __WEBPACK_IMPORTED_MODULE_5__constants__["l" /* OUTSIDE */]) { - radius = arc.getRadiusX() - majorTickSize - rangeDistance - rangeSize; - } else { - radius = arc.getRadiusX() - rangeSize; - } - - return radius; - }; - - RadialScale.prototype.renderArc = function renderArc (center, radius) { - var options = this.options; - - var arc = this.arc = new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Arc(center, { - radiusX: radius, - radiusY: radius, - startAngle: options.startAngle + GEO_ARC_ADJUST_ANGLE, - endAngle: options.endAngle + GEO_ARC_ADJUST_ANGLE - }); - - return arc; - }; - - RadialScale.prototype.renderTicks = function renderTicks () { - var ref = this; - var arc = ref.arc; - var options = ref.options; - var tickArc = arc.clone(); - - this.majorTickAngles = this.tickAngles(arc, options.majorUnit); - this.majorTicks = drawTicks(tickArc, this.majorTickAngles, options.majorUnit, options.majorTicks); - - var allTicks = new Group(); - allTicks.append(this.majorTicks); - - var majorTickSize = options.majorTicks.size; - var minorTickSize = options.minorTicks.size; - - this._tickDifference = majorTickSize - minorTickSize; - - if (options.labels.position === __WEBPACK_IMPORTED_MODULE_5__constants__["l" /* OUTSIDE */]) { - var radius = tickArc.getRadiusX(); - tickArc.setRadiusX(radius - majorTickSize + minorTickSize) - .setRadiusY(radius - majorTickSize + minorTickSize); - } - - this.minorTickAngles = this.normalizeTickAngles(this.tickAngles(arc, options.minorUnit)); - this.minorTicks = drawTicks(tickArc, this.minorTickAngles, options.minorUnit, options.minorTicks); - allTicks.append(this.minorTicks); - - return allTicks; - }; - - RadialScale.prototype.normalizeTickAngles = function normalizeTickAngles (angles) { - var options = this.options; - var skip = options.majorUnit / options.minorUnit; - - for (var i = angles.length - 1; i >= 0; i--) { - if (i % skip === 0) { - angles.splice(i, 1); - } - } - - return angles; - }; - - RadialScale.prototype.tickAngles = function tickAngles (ring, stepValue) { - var options = this.options; - var reverse = options.reverse; - var range = options.max - options.min; - var angle = ring.endAngle - ring.startAngle; - var tickCount = range / stepValue; - var pos = ring.startAngle; - var step = angle / tickCount; - - if (reverse) { - pos += angle; - step = -step; - } - - var positions = []; - for (var i = 0; i < tickCount; i++) { - positions.push(Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])(pos, __WEBPACK_IMPORTED_MODULE_2__common_constants__["g" /* COORD_PRECISION */])); - pos += step; - } - - if (Object(__WEBPACK_IMPORTED_MODULE_1__common__["L" /* round */])(pos) <= ring.endAngle) { - positions.push(pos); - } - - return positions; - }; - - RadialScale.prototype.radius = function radius (value) { - if (value) { - this.arc.setRadiusX(value).setRadiusY(value); - this.repositionTicks(this.majorTicks.children, this.majorTickAngles); - this.repositionTicks(this.minorTicks.children, this.minorTickAngles, true); - } else { - return this.arc.getRadiusX(); - } - }; - - RadialScale.prototype.repositionTicks = function repositionTicks (ticks, tickAngles, minor) { - var diff = minor ? (this._tickDifference || 0) : 0; - var tickArc = this.arc; - var radius = tickArc.getRadiusX(); - - if (minor && this.options.labels.position === __WEBPACK_IMPORTED_MODULE_5__constants__["l" /* OUTSIDE */] && diff !== 0) { - tickArc = this.arc.clone(); - tickArc.setRadiusX(radius - diff).setRadiusY(radius - diff); - } - - for (var i = 0; i < ticks.length; i++) { - var newPoint = tickArc.pointAt(tickAngles[i]); - var segments = ticks[i].segments; - var xDiff = newPoint.x - segments[0].anchor().x; - var yDiff = newPoint.y - segments[0].anchor().y; - - ticks[i].transform(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].transform().translate(xDiff, yDiff)); - } - }; - - return RadialScale; -}(__WEBPACK_IMPORTED_MODULE_3__core__["k" /* NumericAxis */])); - -Object(__WEBPACK_IMPORTED_MODULE_1__common__["M" /* setDefaultOptions */])(RadialScale, { - min: 0, - max: 100, - - majorTicks: { - size: 15, - align: __WEBPACK_IMPORTED_MODULE_5__constants__["i" /* INSIDE */], - color: __WEBPACK_IMPORTED_MODULE_2__common_constants__["c" /* BLACK */], - width: __WEBPACK_IMPORTED_MODULE_5__constants__["f" /* DEFAULT_LINE_WIDTH */], - visible: true - }, - - minorTicks: { - size: 10, - align: __WEBPACK_IMPORTED_MODULE_5__constants__["i" /* INSIDE */], - color: __WEBPACK_IMPORTED_MODULE_2__common_constants__["c" /* BLACK */], - width: __WEBPACK_IMPORTED_MODULE_5__constants__["f" /* DEFAULT_LINE_WIDTH */], - visible: true - }, - - startAngle: -30, - endAngle: 210, - - labels: { - position: __WEBPACK_IMPORTED_MODULE_5__constants__["i" /* INSIDE */], - padding: 2 - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (RadialScale); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/utils.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_build_label_element__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/utils/build-label-element.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__utils_build_label_element__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_get_range__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/utils/get-range.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__utils_get_range__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_pad__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/utils/pad.js"); -/* unused harmony reexport pad */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_unpad__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/utils/unpad.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_3__utils_unpad__["a"]; }); - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/utils/build-label-element.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = buildLabelElement; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__pad__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/utils/pad.js"); - - - -var Group = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Group; -var Path = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Path; -var Text = __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Text; - -function buildLabelElement(label, options) { - var labelBox = label.box; - var textBox = label.children[0].box; - var border = options.border || {}; - var background = options.background || ""; - - var wrapper = Path.fromRect(new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Rect([ labelBox.x1, labelBox.y1 ], [ labelBox.width(), labelBox.height() ]), { - stroke: {} - }); - - var text = new Text(label.text, new __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["h" /* geometry */].Point(textBox.x1, textBox.y1), { - font: options.font, - fill: { color: options.color } - }); - - var styleGeometry = Object(__WEBPACK_IMPORTED_MODULE_1__pad__["a" /* default */])(text.bbox().clone(), options.padding); - - var styleBox = Path.fromRect(styleGeometry, { - stroke: { - color: border.width ? border.color : "", - width: border.width, - dashType: border.dashType, - lineJoin: "round", - lineCap: "round" - }, - fill: { - color: background - } - }); - - var elements = new Group(); - elements.append(wrapper); - elements.append(styleBox); - elements.append(text); - - return elements; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/utils/get-range.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = getRange; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); - - - -function getRange(range, min, max) { - var from = Object(__WEBPACK_IMPORTED_MODULE_0__common__["l" /* defined */])(range.from) ? range.from : __WEBPACK_IMPORTED_MODULE_1__common_constants__["t" /* MIN_VALUE */]; - var to = Object(__WEBPACK_IMPORTED_MODULE_0__common__["l" /* defined */])(range.to) ? range.to : __WEBPACK_IMPORTED_MODULE_1__common_constants__["s" /* MAX_VALUE */]; - - range.from = Math.max(Math.min(to, from), min); - range.to = Math.min(Math.max(to, from), max); - - return range; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/utils/pad.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = pad; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - -function pad(bbox, value) { - var origin = bbox.getOrigin(); - var size = bbox.getSize(); - var spacing = Object(__WEBPACK_IMPORTED_MODULE_0__common__["s" /* getSpacing */])(value); - - bbox.setOrigin([ origin.x - spacing.left, origin.y - spacing.top ]); - bbox.setSize([ size.width + (spacing.left + spacing.right), size.height + (spacing.top + spacing.bottom) ]); - - return bbox; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/gauges/utils/unpad.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = unpad; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__pad__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges/utils/pad.js"); - - - -function unpad(bbox, value) { - var spacing = Object(__WEBPACK_IMPORTED_MODULE_0__common__["s" /* getSpacing */])(value); - - spacing.left = -spacing.left; spacing.top = -spacing.top; - spacing.right = -spacing.right; spacing.bottom = -spacing.bottom; - - return Object(__WEBPACK_IMPORTED_MODULE_1__pad__["a" /* default */])(bbox, spacing); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/main.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__core__["f"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__core__["g"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__chart__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_2__services__["b"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__sparkline__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/sparkline.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_3__sparkline__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stock__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/stock.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_4__stock__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__gauges__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/gauges.js"); -/* unused harmony namespace reexport */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_6__common__["d"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__chart_base_theme__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/base-theme.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_7__chart_base_theme__["a"]; }); - - - - - - - - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/services.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__services_chart_service__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services/chart-service.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__services_chart_service__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__services_dom_events_builder__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services/dom-events-builder.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__services_dom_events_builder__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_format_service__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services/format-service.js"); -/* unused harmony reexport FormatService */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_intl_service__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services/intl-service.js"); -/* unused harmony reexport IntlService */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__services_template_service__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services/template-service.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__services_template_service__["a"]; }); - - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/services/chart-service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__intl_service__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services/intl-service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__format_service__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services/format-service.js"); - - - -var ChartService = function ChartService(chart, context) { - if ( context === void 0 ) context = {}; - - this._intlService = context.intlService; - this.sender = context.sender || chart; - this.format = new __WEBPACK_IMPORTED_MODULE_1__format_service__["a" /* default */](context.intlService); - this.chart = chart; - this.rtl = context.rtl; -}; - -var prototypeAccessors = { intl: { configurable: true } }; - -prototypeAccessors.intl.get = function () { - return this._intlService || __WEBPACK_IMPORTED_MODULE_0__intl_service__["a" /* default */].implementation; -}; - -ChartService.prototype.notify = function notify (name, args) { - this.chart.trigger(name, args); -}; - -ChartService.prototype.isPannable = function isPannable (axis) { - var pannable = ((this.chart || {}).options || {}).pannable; - return pannable && pannable.lock !== axis; -}; - -Object.defineProperties( ChartService.prototype, prototypeAccessors ); - -/* harmony default export */ __webpack_exports__["a"] = (ChartService); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/services/dom-events-builder.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var current; - -var DomEventsBuilder = function DomEventsBuilder () {}; - -DomEventsBuilder.register = function register (userImplementation) { - current = userImplementation; -}; - -DomEventsBuilder.create = function create (element, events) { - if (current) { - return current.create(element, events); - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (DomEventsBuilder); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/services/format-service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__intl_service__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/services/intl-service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - -var FORMAT_REPLACE_REGEX = /\{(\d+)(:[^\}]+)?\}/g; - -var FormatService = function FormatService(intlService) { - this._intlService = intlService; -}; - -var prototypeAccessors = { intlService: { configurable: true } }; - -prototypeAccessors.intlService.get = function () { - return this._intlService || __WEBPACK_IMPORTED_MODULE_0__intl_service__["a" /* default */].implementation; -}; - -FormatService.prototype.auto = function auto (formatString) { - var values = [], len = arguments.length - 1; - while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ]; - - var intl = this.intlService; - - if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["D" /* isString */])(formatString) && formatString.match(__WEBPACK_IMPORTED_MODULE_1__common_constants__["n" /* FORMAT_REGEX */])) { - return intl.format.apply(intl, [ formatString ].concat( values )); - } - - return intl.toString(values[0], formatString); -}; - -FormatService.prototype.localeAuto = function localeAuto (formatString, values, locale) { - var intl = this.intlService; - var result; - - if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["D" /* isString */])(formatString) && formatString.match(__WEBPACK_IMPORTED_MODULE_1__common_constants__["n" /* FORMAT_REGEX */])) { - result = formatString.replace(FORMAT_REPLACE_REGEX, function(match, index, placeholderFormat) { - var value = values[parseInt(index, 10)]; - - return intl.toString(value, placeholderFormat ? placeholderFormat.substring(1) : "", locale); - }); - } else { - result = intl.toString(values[0], formatString, locale); - } - - return result; -}; - -Object.defineProperties( FormatService.prototype, prototypeAccessors ); - -/* harmony default export */ __webpack_exports__["a"] = (FormatService); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/services/intl-service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var defaultImplementation = { - format: function (format, value) { return value; }, - - toString: function (value) { return value; }, - - parseDate: function (value) { return new Date(value); } -}; - -var current = defaultImplementation; - -var IntlService = function IntlService () {}; - -var staticAccessors = { implementation: { configurable: true } }; - -IntlService.register = function register (userImplementation) { - current = userImplementation; -}; - -staticAccessors.implementation.get = function () { - return current; -}; - -Object.defineProperties( IntlService, staticAccessors ); - -/* harmony default export */ __webpack_exports__["a"] = (IntlService); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/services/template-service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var current = { - compile: function(template) { - return template; - } -}; - -var TemplateService = function TemplateService () {}; - -TemplateService.register = function register (userImplementation) { - current = userImplementation; -}; - -TemplateService.compile = function compile (template) { - return current.compile(template); -}; - -/* harmony default export */ __webpack_exports__["a"] = (TemplateService); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/sparkline.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sparkline_sparkline__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/sparkline/sparkline.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__sparkline_sparkline__["a"]; }); - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/sparkline/shared-tooltip.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); - - -var TOP_OFFSET = -2; - -var SharedTooltip = (function (ChartSharedTooltip) { - function SharedTooltip () { - ChartSharedTooltip.apply(this, arguments); - } - - if ( ChartSharedTooltip ) SharedTooltip.__proto__ = ChartSharedTooltip; - SharedTooltip.prototype = Object.create( ChartSharedTooltip && ChartSharedTooltip.prototype ); - SharedTooltip.prototype.constructor = SharedTooltip; - - SharedTooltip.prototype._slotAnchor = function _slotAnchor (coords, slot) { - var axis = this.plotArea.categoryAxis; - var vertical = axis.options.vertical; - var align = vertical ? { - horizontal: "left", - vertical: "center" - } : { - horizontal: "center", - vertical: "bottom" - }; - - var point; - - if (vertical) { - point = new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](this.plotArea.box.x2, slot.center().y); - } else { - point = new __WEBPACK_IMPORTED_MODULE_1__core__["l" /* Point */](slot.center().x, TOP_OFFSET); - } - - return { - point: point, - align: align - }; - }; - - SharedTooltip.prototype._defaultAnchor = function _defaultAnchor (point, slot) { - return this._slotAnchor({}, slot); - }; - - return SharedTooltip; -}(__WEBPACK_IMPORTED_MODULE_0__chart__["c" /* SharedTooltip */])); - -/* harmony default export */ __webpack_exports__["a"] = (SharedTooltip); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/sparkline/sparkline.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__chart_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__shared_tooltip__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/sparkline/shared-tooltip.js"); - - - - - -var DEAULT_BAR_WIDTH = 150; -var DEAULT_BULLET_WIDTH = 150; -var NO_CROSSHAIR = [ __WEBPACK_IMPORTED_MODULE_1__chart_constants__["c" /* BAR */], __WEBPACK_IMPORTED_MODULE_1__chart_constants__["h" /* BULLET */] ]; - -function hide(children) { - var state = []; - for (var idx = 0; idx < children.length; idx++) { - var child = children[idx]; - state[idx] = child.style.display; - child.style.display = "none"; - } - - return state; -} - -function show(children, state) { - for (var idx = 0; idx < children.length; idx++) { - children[idx].style.display = state[idx]; - } -} - -function wrapNumber(value) { - return Object(__WEBPACK_IMPORTED_MODULE_2__common__["B" /* isNumber */])(value) ? [ value ] : value; -} - -var Sparkline = (function (Chart) { - function Sparkline () { - Chart.apply(this, arguments); - } - - if ( Chart ) Sparkline.__proto__ = Chart; - Sparkline.prototype = Object.create( Chart && Chart.prototype ); - Sparkline.prototype.constructor = Sparkline; - - Sparkline.prototype._setElementClass = function _setElementClass (element) { - Object(__WEBPACK_IMPORTED_MODULE_2__common__["e" /* addClass */])(element, 'k-sparkline'); - }; - - Sparkline.prototype._initElement = function _initElement (element) { - Chart.prototype._initElement.call(this, element); - - this._initialWidth = Math.floor(Object(__WEBPACK_IMPORTED_MODULE_2__common__["o" /* elementSize */])(element).width); - }; - - Sparkline.prototype._resize = function _resize () { - var element = this.element; - var state = hide(element.childNodes); - - this._initialWidth = Math.floor(Object(__WEBPACK_IMPORTED_MODULE_2__common__["o" /* elementSize */])(element).width); - - show(element.childNodes, state); - - Chart.prototype._resize.call(this); - }; - - Sparkline.prototype._modelOptions = function _modelOptions () { - var chartOptions = this.options; - var stage = this._surfaceWrap(); - var displayState = hide(stage.childNodes); - - var space = document.createElement('span'); - space.innerHTML = ' '; - - stage.appendChild(space); - - var options = Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])({ - width: this._autoWidth, - height: Object(__WEBPACK_IMPORTED_MODULE_2__common__["o" /* elementSize */])(stage).height, - transitions: chartOptions.transitions - }, chartOptions.chartArea, { - inline: true, - align: false - }); - - Object(__WEBPACK_IMPORTED_MODULE_2__common__["o" /* elementSize */])(stage, { - width: options.width, - height: options.height - }); - - stage.removeChild(space); - - show(stage.childNodes, displayState); - this.surface.resize(); - - return options; - }; - - Sparkline.prototype._surfaceWrap = function _surfaceWrap () { - if (!this.stage) { - var stage = this.stage = document.createElement('span'); - this.element.appendChild(stage); - } - return this.stage; - }; - - Sparkline.prototype._createPlotArea = function _createPlotArea (skipSeries) { - var plotArea = Chart.prototype._createPlotArea.call(this, skipSeries); - this._autoWidth = this._initialWidth || this._calculateWidth(plotArea); - - return plotArea; - }; - - Sparkline.prototype._calculateWidth = function _calculateWidth (plotArea) { - var options = this.options; - var margin = Object(__WEBPACK_IMPORTED_MODULE_2__common__["s" /* getSpacing */])(options.chartArea.margin); - var charts = plotArea.charts; - var stage = this._surfaceWrap(); - var total = 0; - - - for (var i = 0; i < charts.length; i++) { - var currentChart = charts[i]; - var firstSeries = (currentChart.options.series || [])[0]; - if (!firstSeries) { - continue; - } - - if (firstSeries.type === __WEBPACK_IMPORTED_MODULE_1__chart_constants__["c" /* BAR */]) { - return DEAULT_BAR_WIDTH; - } - - if (firstSeries.type === __WEBPACK_IMPORTED_MODULE_1__chart_constants__["h" /* BULLET */]) { - return DEAULT_BULLET_WIDTH; - } - - if (firstSeries.type === __WEBPACK_IMPORTED_MODULE_1__chart_constants__["K" /* PIE */]) { - return Object(__WEBPACK_IMPORTED_MODULE_2__common__["o" /* elementSize */])(stage).height; - } - - var categoryAxis = currentChart.categoryAxis; - if (categoryAxis) { - var pointsCount = categoryAxis.categoriesCount() * - (!currentChart.options.isStacked && Object(__WEBPACK_IMPORTED_MODULE_2__common__["x" /* inArray */])(firstSeries.type, [ __WEBPACK_IMPORTED_MODULE_1__chart_constants__["k" /* COLUMN */], __WEBPACK_IMPORTED_MODULE_1__chart_constants__["_11" /* VERTICAL_BULLET */] ]) ? currentChart.seriesOptions.length : 1); - - total = Math.max(total, pointsCount); - } - } - - var size = total * options.pointWidth; - if (size > 0) { - size += margin.left + margin.right; - } - - return size; - }; - - Sparkline.prototype._createSharedTooltip = function _createSharedTooltip (options) { - return new __WEBPACK_IMPORTED_MODULE_3__shared_tooltip__["a" /* default */](this._plotArea, options); - }; - - Sparkline.normalizeOptions = function normalizeOptions (userOptions) { - var options = wrapNumber(userOptions); - - if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["z" /* isArray */])(options)) { - options = { seriesDefaults: { data: options } }; - } else { - options = Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])({}, options); - } - - if (!options.series) { - options.series = [ { data: wrapNumber(options.data) } ]; - } - - Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])(options, { - seriesDefaults: { - type: options.type - } - }); - - if (Object(__WEBPACK_IMPORTED_MODULE_2__common__["x" /* inArray */])(options.series[0].type, NO_CROSSHAIR) || - Object(__WEBPACK_IMPORTED_MODULE_2__common__["x" /* inArray */])(options.seriesDefaults.type, NO_CROSSHAIR)) { - options = Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* deepExtend */])({}, { - categoryAxis: { - crosshair: { - visible: false - } - } - }, options); - } - - return options; - }; - - return Sparkline; -}(__WEBPACK_IMPORTED_MODULE_0__chart__["a" /* Chart */])); - -Object(__WEBPACK_IMPORTED_MODULE_2__common__["M" /* setDefaultOptions */])(Sparkline, { - chartArea: { - margin: 2 - }, - axisDefaults: { - visible: false, - majorGridLines: { - visible: false - }, - valueAxis: { - narrowRange: true - } - }, - seriesDefaults: { - type: "line", - area: { - line: { - width: 0.5 - } - }, - bar: { - stack: true - }, - padding: 2, - width: 0.5, - overlay: { - gradient: null - }, - highlight: { - visible: false - }, - border: { - width: 0 - }, - markers: { - size: 2, - visible: false - } - }, - tooltip: { - visible: true, - shared: true - }, - categoryAxis: { - crosshair: { - visible: true, - tooltip: { - visible: false - } - } - }, - legend: { - visible: false - }, - transitions: false, - - pointWidth: 5, - - panes: [ { clip: false } ] -}); - -/* harmony default export */ __webpack_exports__["a"] = (Sparkline); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/stock.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__stock_navigator__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/stock/navigator.js"); -/* unused harmony reexport Navigator */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stock_navigator_hint__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/stock/navigator-hint.js"); -/* unused harmony reexport NavigatorHint */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stock_stock_chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/stock/stock-chart.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__stock_stock_chart__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stock_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/stock/constants.js"); -/* unused harmony reexport constants */ - - - - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/stock/constants.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NAVIGATOR_AXIS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NAVIGATOR_PANE; }); -var NAVIGATOR_PANE = "_navigator"; -var NAVIGATOR_AXIS = NAVIGATOR_PANE; - - - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/stock/fade-out-animation.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); - - - - -var FadeOutAnimation = (function (superclass) { - function FadeOutAnimation () { - superclass.apply(this, arguments); - } - - if ( superclass ) FadeOutAnimation.__proto__ = superclass; - FadeOutAnimation.prototype = Object.create( superclass && superclass.prototype ); - FadeOutAnimation.prototype.constructor = FadeOutAnimation; - - FadeOutAnimation.prototype.setup = function setup () { - this._initialOpacity = parseFloat(Object(__WEBPACK_IMPORTED_MODULE_1__common__["p" /* elementStyles */])(this.element, 'opacity').opacity); - }; - - FadeOutAnimation.prototype.step = function step (pos) { - Object(__WEBPACK_IMPORTED_MODULE_1__common__["p" /* elementStyles */])(this.element, { - opacity: String(Object(__WEBPACK_IMPORTED_MODULE_1__common__["y" /* interpolateValue */])(this._initialOpacity, 0, pos)) - }); - }; - - FadeOutAnimation.prototype.abort = function abort () { - superclass.prototype.abort.call(this); - Object(__WEBPACK_IMPORTED_MODULE_1__common__["p" /* elementStyles */])(this.element, { - display: 'none', - opacity: String(this._initialOpacity) - }); - }; - - FadeOutAnimation.prototype.cancel = function cancel () { - superclass.prototype.abort.call(this); - Object(__WEBPACK_IMPORTED_MODULE_1__common__["p" /* elementStyles */])(this.element, { - opacity: String(this._initialOpacity) - }); - }; - - return FadeOutAnimation; -}(__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__["d" /* drawing */].Animation)); - -/* harmony default export */ __webpack_exports__["a"] = (FadeOutAnimation); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/stock/navigator-hint.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__date_utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__fade_out_animation__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/stock/fade-out-animation.js"); - - - - -function createDiv(className, style) { - var div = document.createElement("div"); - div.className = className; - if (style) { - div.style.cssText = style; - } - - return div; -} - -var NavigatorHint = (function (Class) { - function NavigatorHint(container, chartService, options) { - Class.call(this); - - this.options = Object(__WEBPACK_IMPORTED_MODULE_0__common__["k" /* deepExtend */])({}, this.options, options); - this.container = container; - this.chartService = chartService; - - var padding = Object(__WEBPACK_IMPORTED_MODULE_0__common__["p" /* elementStyles */])(container, [ "paddingLeft", "paddingTop" ]); - this.chartPadding = { - top: padding.paddingTop, - left: padding.paddingLeft - }; - - this.createElements(); - container.appendChild(this.element); - } - - if ( Class ) NavigatorHint.__proto__ = Class; - NavigatorHint.prototype = Object.create( Class && Class.prototype ); - NavigatorHint.prototype.constructor = NavigatorHint; - - NavigatorHint.prototype.createElements = function createElements () { - var element = this.element = createDiv('k-navigator-hint', 'display: none; position: absolute; top: 1px; left: 1px;'); - var tooltip = this.tooltip = createDiv('k-tooltip k-chart-tooltip'); - var scroll = this.scroll = createDiv('k-scroll'); - - tooltip.innerHTML = ' '; - - element.appendChild(tooltip); - element.appendChild(scroll); - }; - - NavigatorHint.prototype.show = function show (from, to, bbox) { - var ref = this; - var element = ref.element; - var options = ref.options; - var scroll = ref.scroll; - var tooltip = ref.tooltip; - var middle = Object(__WEBPACK_IMPORTED_MODULE_1__date_utils__["n" /* toDate */])(Object(__WEBPACK_IMPORTED_MODULE_1__date_utils__["o" /* toTime */])(from) + Object(__WEBPACK_IMPORTED_MODULE_1__date_utils__["o" /* toTime */])(to - from) / 2); - var scrollWidth = bbox.width() * 0.4; - var minPos = bbox.center().x - scrollWidth; - var maxPos = bbox.center().x; - var posRange = maxPos - minPos; - var range = options.max - options.min; - var scale = posRange / range; - var offset = middle - options.min; - var text = this.chartService.intl.format(options.format, from, to); - var template = Object(__WEBPACK_IMPORTED_MODULE_0__common__["t" /* getTemplate */])(options); - - this.clearHideTimeout(); - - if (!this._visible) { - Object(__WEBPACK_IMPORTED_MODULE_0__common__["p" /* elementStyles */])(element, { - visibility: 'hidden', - display: 'block' - }); - this._visible = true; - } - - if (template) { - text = template({ - from: from, - to: to - }); - } - - tooltip.innerHTML = text; - Object(__WEBPACK_IMPORTED_MODULE_0__common__["p" /* elementStyles */])(tooltip, { - left: bbox.center().x - tooltip.offsetWidth / 2, - top: bbox.y1 - }); - - var tooltipStyle = Object(__WEBPACK_IMPORTED_MODULE_0__common__["p" /* elementStyles */])(tooltip, [ 'marginTop', 'borderTopWidth', 'height' ]); - - Object(__WEBPACK_IMPORTED_MODULE_0__common__["p" /* elementStyles */])(scroll, { - width: scrollWidth, - left: minPos + offset * scale, - top: bbox.y1 + tooltipStyle.marginTop + tooltipStyle.borderTopWidth + tooltipStyle.height / 2 - }); - - Object(__WEBPACK_IMPORTED_MODULE_0__common__["p" /* elementStyles */])(element, { - visibility: 'visible' - }); - }; - - NavigatorHint.prototype.clearHideTimeout = function clearHideTimeout () { - if (this._hideTimeout) { - clearTimeout(this._hideTimeout); - } - - if (this._hideAnimation) { - this._hideAnimation.cancel(); - } - }; - - NavigatorHint.prototype.hide = function hide () { - var this$1 = this; - - this.clearHideTimeout(); - - this._hideTimeout = setTimeout(function () { - this$1._visible = false; - this$1._hideAnimation = new __WEBPACK_IMPORTED_MODULE_2__fade_out_animation__["a" /* default */](this$1.element); - this$1._hideAnimation.setup(); - this$1._hideAnimation.play(); - }, this.options.hideDelay); - }; - - NavigatorHint.prototype.destroy = function destroy () { - this.clearHideTimeout(); - if (this.container) { - this.container.removeChild(this.element); - } - delete this.container; - delete this.chartService; - delete this.element; - delete this.tooltip; - delete this.scroll; - }; - - return NavigatorHint; -}(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* Class */])); - -Object(__WEBPACK_IMPORTED_MODULE_0__common__["M" /* setDefaultOptions */])(NavigatorHint, { - format: "{0:d} - {1:d}", - hideDelay: 500 -}); - -/* harmony default export */ __webpack_exports__["a"] = (NavigatorHint); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/stock/navigator.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__navigator_hint__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/stock/navigator-hint.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__chart_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__date_utils__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/date-utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/stock/constants.js"); - - - - - - - - -var ZOOM_ACCELERATION = 3; - -var Navigator = (function (Class) { - function Navigator(chart) { - var obj; - - Class.call(this); - - this.chart = chart; - var options = this.options = Object(__WEBPACK_IMPORTED_MODULE_5__common__["k" /* deepExtend */])({}, this.options, chart.options.navigator); - var select = options.select; - if (select) { - select.from = this.parseDate(select.from); - select.to = this.parseDate(select.to); - } - - if (!Object(__WEBPACK_IMPORTED_MODULE_5__common__["l" /* defined */])(options.hint.visible)) { - options.hint.visible = options.visible; - } - - this.chartObserver = new __WEBPACK_IMPORTED_MODULE_5__common__["d" /* InstanceObserver */](this, ( obj = {}, obj[__WEBPACK_IMPORTED_MODULE_2__chart_constants__["m" /* DRAG */]] = '_drag', obj[__WEBPACK_IMPORTED_MODULE_2__chart_constants__["n" /* DRAG_END */]] = '_dragEnd', obj[__WEBPACK_IMPORTED_MODULE_2__chart_constants__["_20" /* ZOOM */]] = '_zoom', obj[__WEBPACK_IMPORTED_MODULE_2__chart_constants__["_21" /* ZOOM_END */]] = '_zoomEnd', obj )); - chart.addObserver(this.chartObserver); - } - - if ( Class ) Navigator.__proto__ = Class; - Navigator.prototype = Object.create( Class && Class.prototype ); - Navigator.prototype.constructor = Navigator; - - Navigator.prototype.parseDate = function parseDate$1 (value) { - return Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["l" /* parseDate */])(this.chart.chartService.intl, value); - }; - - Navigator.prototype.destroy = function destroy () { - if (this.chart) { - this.chart.removeObserver(this.chartObserver); - delete this.chart; - } - - if (this.selection) { - this.selection.destroy(); - delete this.selection; - } - - if (this.hint) { - this.hint.destroy(); - delete this.hint; - } - }; - - Navigator.prototype.redraw = function redraw () { - this._redrawSelf(); - this.initSelection(); - }; - - Navigator.prototype.initSelection = function initSelection () { - var ref = this; - var chart = ref.chart; - var options = ref.options; - var axis = this.mainAxis(); - var ref$1 = axis.roundedRange(); - var min = ref$1.min; - var max = ref$1.max; - var ref$2 = options.select; - var from = ref$2.from; - var to = ref$2.to; - var mousewheel = ref$2.mousewheel; - var axisClone = clone(axis); - var groups = axis.options.categories; - var selection = this.selection; - - if (groups.length === 0) { - return; - } - - if (selection) { - selection.destroy(); - } - - // "Freeze" the selection axis position until the next redraw - axisClone.box = axis.box; - - selection = this.selection = new __WEBPACK_IMPORTED_MODULE_1__chart__["b" /* Selection */](chart, axisClone, { - min: min, - max: max, - from: from || min, - to: to || max, - mousewheel: Object(__WEBPACK_IMPORTED_MODULE_5__common__["Q" /* valueOrDefault */])(mousewheel, { zoom: "left" }), - visible: options.visible - }, new __WEBPACK_IMPORTED_MODULE_5__common__["d" /* InstanceObserver */](this, { - selectStart: '_selectStart', - select: '_select', - selectEnd: '_selectEnd' - })); - - if (this.hint) { - this.hint.destroy(); - } - - if (options.hint.visible) { - this.hint = new __WEBPACK_IMPORTED_MODULE_0__navigator_hint__["a" /* default */](chart.element, chart.chartService, { - min: min, - max: max, - template: Object(__WEBPACK_IMPORTED_MODULE_5__common__["t" /* getTemplate */])(options.hint), - format: options.hint.format - }); - } - }; - - Navigator.prototype.setRange = function setRange () { - var plotArea = this.chart._createPlotArea(true); - var axis = plotArea.namedCategoryAxes[__WEBPACK_IMPORTED_MODULE_6__constants__["a" /* NAVIGATOR_AXIS */]]; - - var ref = axis.roundedRange(); - var min = ref.min; - var max = ref.max; - - var select = this.options.select || {}; - var from = select.from || min; - if (from < min) { - from = min; - } - - var to = select.to || max; - if (to > max) { - to = max; - } - - this.options.select = Object(__WEBPACK_IMPORTED_MODULE_5__common__["k" /* deepExtend */])({}, select, { - from: from, - to: to - }); - - this.filterAxes(); - }; - - Navigator.prototype._redrawSelf = function _redrawSelf (silent) { - var plotArea = this.chart._plotArea; - - if (plotArea) { - plotArea.redraw(Object(__WEBPACK_IMPORTED_MODULE_5__common__["E" /* last */])(plotArea.panes), silent); - } - }; - - Navigator.prototype.redrawSlaves = function redrawSlaves () { - var chart = this.chart; - var plotArea = chart._plotArea; - var slavePanes = plotArea.panes.slice(0, -1); - - // Update the original series and categoryAxis before partial refresh. - plotArea.srcSeries = chart.options.series; - plotArea.options.categoryAxis = chart.options.categoryAxis; - - plotArea.redraw(slavePanes); - }; - - Navigator.prototype._drag = function _drag (e) { - var ref = this; - var chart = ref.chart; - var selection = ref.selection; - var coords = chart._eventCoordinates(e.originalEvent); - var navigatorAxis = this.mainAxis(); - var naviRange = navigatorAxis.range(); - var inNavigator = navigatorAxis.pane.box.containsPoint(coords); - var axis = chart._plotArea.categoryAxis; - var range = e.axisRanges[axis.options.name]; - var select = this.options.select; - var duration; - - if (!range || inNavigator || !selection) { - return; - } - - if (select.from && select.to) { - duration = Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["o" /* toTime */])(select.to) - Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["o" /* toTime */])(select.from); - } else { - duration = Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["o" /* toTime */])(selection.options.to) - Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["o" /* toTime */])(selection.options.from); - } - - var from = Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["n" /* toDate */])(Object(__WEBPACK_IMPORTED_MODULE_5__common__["F" /* limitValue */])( - Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["o" /* toTime */])(range.min), - naviRange.min, Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["o" /* toTime */])(naviRange.max) - duration - )); - - var to = Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["n" /* toDate */])(Object(__WEBPACK_IMPORTED_MODULE_5__common__["F" /* limitValue */])( - Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["o" /* toTime */])(from) + duration, - Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["o" /* toTime */])(naviRange.min) + duration, naviRange.max - )); - - this.options.select = { from: from, to: to }; - - if (this.options.liveDrag) { - this.filterAxes(); - this.redrawSlaves(); - } - - selection.set(from, to); - - this.showHint(from, to); - }; - - Navigator.prototype._dragEnd = function _dragEnd () { - this.filterAxes(); - this.filter(); - this.redrawSlaves(); - - if (this.hint) { - this.hint.hide(); - } - }; - - Navigator.prototype.readSelection = function readSelection () { - var ref = this; - var ref_selection_options = ref.selection.options; - var from = ref_selection_options.from; - var to = ref_selection_options.to; - var select = ref.options.select; - - select.from = from; - select.to = to; - }; - - Navigator.prototype.filterAxes = function filterAxes () { - var ref = this; - var select = ref.options.select; if ( select === void 0 ) select = { }; - var chart = ref.chart; - var allAxes = chart.options.categoryAxis; - var from = select.from; - var to = select.to; - - for (var idx = 0; idx < allAxes.length; idx++) { - var axis = allAxes[idx]; - if (axis.pane !== __WEBPACK_IMPORTED_MODULE_6__constants__["b" /* NAVIGATOR_PANE */]) { - axis.min = from; - axis.max = to; - } - } - }; - - Navigator.prototype.filter = function filter () { - var ref = this; - var chart = ref.chart; - var select = ref.options.select; - if (chart.requiresHandlers([ "navigatorFilter" ])) { - var axisOptions = new __WEBPACK_IMPORTED_MODULE_3__core__["f" /* DateCategoryAxis */](Object(__WEBPACK_IMPORTED_MODULE_5__common__["k" /* deepExtend */])({ - baseUnit: "fit" - }, chart.options.categoryAxis[0], { - categories: [ select.from, select.to ] - }), chart.chartService).options; - - this.chart.trigger("navigatorFilter", { - from: Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["b" /* addDuration */])(axisOptions.min, -axisOptions.baseUnitStep, axisOptions.baseUnit), - to: Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["b" /* addDuration */])(axisOptions.max, axisOptions.baseUnitStep, axisOptions.baseUnit) - }); - } - }; - - Navigator.prototype._zoom = function _zoom (e) { - var ref = this; - var axis = ref.chart._plotArea.categoryAxis; - var selection = ref.selection; - var ref_options = ref.options; - var select = ref_options.select; - var liveDrag = ref_options.liveDrag; - var categories = this.mainAxis().options.categories; - var delta = e.delta; - - if (!selection) { - return; - } - - var fromIx = Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["k" /* lteDateIndex */])(selection.options.from, categories); - var toIx = Object(__WEBPACK_IMPORTED_MODULE_4__date_utils__["k" /* lteDateIndex */])(selection.options.to, categories); - - e.originalEvent.preventDefault(); - - if (Math.abs(delta) > 1) { - delta *= ZOOM_ACCELERATION; - } - - if (toIx - fromIx > 1) { - selection.expand(delta); - this.readSelection(); - } else { - axis.options.min = select.from; - select.from = axis.scaleRange(-e.delta).min; - } - - if (liveDrag) { - this.filterAxes(); - this.redrawSlaves(); - } - - selection.set(select.from, select.to); - - this.showHint(this.options.select.from, this.options.select.to); - }; - - Navigator.prototype._zoomEnd = function _zoomEnd (e) { - this._dragEnd(e); - }; - - Navigator.prototype.showHint = function showHint (from, to) { - var plotArea = this.chart._plotArea; - - if (this.hint) { - this.hint.show(from, to, plotArea.backgroundBox()); - } - }; - - Navigator.prototype._selectStart = function _selectStart (e) { - return this.chart._selectStart(e); - }; - - Navigator.prototype._select = function _select (e) { - this.showHint(e.from, e.to); - - return this.chart._select(e); - }; - - Navigator.prototype._selectEnd = function _selectEnd (e) { - if (this.hint) { - this.hint.hide(); - } - - this.readSelection(); - this.filterAxes(); - this.filter(); - this.redrawSlaves(); - - return this.chart._selectEnd(e); - }; - - Navigator.prototype.mainAxis = function mainAxis () { - var plotArea = this.chart._plotArea; - - if (plotArea) { - return plotArea.namedCategoryAxes[__WEBPACK_IMPORTED_MODULE_6__constants__["a" /* NAVIGATOR_AXIS */]]; - } - }; - - Navigator.prototype.select = function select (from, to) { - var select = this.options.select; - - if (from && to) { - select.from = this.parseDate(from); - select.to = this.parseDate(to); - - this.filterAxes(); - this.filter(); - this.redrawSlaves(); - - this.selection.set(from, to); - } - - return { - from: select.from, - to: select.to - }; - }; - - Navigator.setup = function setup (options, themeOptions) { - if ( options === void 0 ) options = {}; - if ( themeOptions === void 0 ) themeOptions = {}; - - if (options.__navi) { - return; - } - options.__navi = true; - - var naviOptions = Object(__WEBPACK_IMPORTED_MODULE_5__common__["k" /* deepExtend */])({}, themeOptions.navigator, options.navigator); - var panes = options.panes = [].concat(options.panes); - var paneOptions = Object(__WEBPACK_IMPORTED_MODULE_5__common__["k" /* deepExtend */])({}, naviOptions.pane, { name: __WEBPACK_IMPORTED_MODULE_6__constants__["b" /* NAVIGATOR_PANE */] }); - - if (!naviOptions.visible) { - paneOptions.visible = false; - paneOptions.height = 0.1; - } - - panes.push(paneOptions); - - Navigator.attachAxes(options, naviOptions); - Navigator.attachSeries(options, naviOptions, themeOptions); - }; - - Navigator.attachAxes = function attachAxes (options, naviOptions) { - var series = naviOptions.series || []; - var categoryAxes = options.categoryAxis = [].concat(options.categoryAxis); - var valueAxes = options.valueAxis = [].concat(options.valueAxis); - - var equallySpacedSeries = Object(__WEBPACK_IMPORTED_MODULE_1__chart__["d" /* filterSeriesByType */])(series, __WEBPACK_IMPORTED_MODULE_2__chart_constants__["p" /* EQUALLY_SPACED_SERIES */]); - var justifyAxis = equallySpacedSeries.length === 0; - - var base = Object(__WEBPACK_IMPORTED_MODULE_5__common__["k" /* deepExtend */])({ - type: "date", - pane: __WEBPACK_IMPORTED_MODULE_6__constants__["b" /* NAVIGATOR_PANE */], - roundToBaseUnit: !justifyAxis, - justified: justifyAxis, - _collapse: false, - majorTicks: { visible: true }, - tooltip: { visible: false }, - labels: { step: 1 }, - autoBind: naviOptions.autoBindElements, - autoBaseUnitSteps: { - minutes: [ 1 ], - hours: [ 1, 2 ], - days: [ 1, 2 ], - weeks: [], - months: [ 1 ], - years: [ 1 ] - } - }); - var user = naviOptions.categoryAxis; - - categoryAxes.push( - Object(__WEBPACK_IMPORTED_MODULE_5__common__["k" /* deepExtend */])({}, base, { - maxDateGroups: 200 - }, user, { - name: __WEBPACK_IMPORTED_MODULE_6__constants__["a" /* NAVIGATOR_AXIS */], - title: null, - baseUnit: "fit", - baseUnitStep: "auto", - labels: { visible: false }, - majorTicks: { visible: false } - }), Object(__WEBPACK_IMPORTED_MODULE_5__common__["k" /* deepExtend */])({}, base, user, { - name: __WEBPACK_IMPORTED_MODULE_6__constants__["a" /* NAVIGATOR_AXIS */] + "_labels", - maxDateGroups: 20, - baseUnitStep: "auto", - plotBands: [], - autoBaseUnitSteps: { - minutes: [] - }, - _overlap: true - }), Object(__WEBPACK_IMPORTED_MODULE_5__common__["k" /* deepExtend */])({}, base, user, { - name: __WEBPACK_IMPORTED_MODULE_6__constants__["a" /* NAVIGATOR_AXIS */] + "_ticks", - maxDateGroups: 200, - majorTicks: { - width: 0.5 - }, - plotBands: [], - title: null, - labels: { visible: false, mirror: true }, - _overlap: true - }) - ); - - valueAxes.push(Object(__WEBPACK_IMPORTED_MODULE_5__common__["k" /* deepExtend */])({ - name: __WEBPACK_IMPORTED_MODULE_6__constants__["a" /* NAVIGATOR_AXIS */], - pane: __WEBPACK_IMPORTED_MODULE_6__constants__["b" /* NAVIGATOR_PANE */], - majorGridLines: { - visible: false - }, - visible: false - }, naviOptions.valueAxis)); - }; - - Navigator.attachSeries = function attachSeries (options, naviOptions, themeOptions) { - var series = options.series = options.series || []; - var navigatorSeries = [].concat(naviOptions.series || []); - var seriesColors = themeOptions.seriesColors; - var defaults = naviOptions.seriesDefaults; - - for (var idx = 0; idx < navigatorSeries.length; idx++) { - series.push( - Object(__WEBPACK_IMPORTED_MODULE_5__common__["k" /* deepExtend */])({ - color: seriesColors[idx % seriesColors.length], - categoryField: naviOptions.dateField, - visibleInLegend: false, - tooltip: { - visible: false - } - }, defaults, navigatorSeries[idx], { - axis: __WEBPACK_IMPORTED_MODULE_6__constants__["a" /* NAVIGATOR_AXIS */], - categoryAxis: __WEBPACK_IMPORTED_MODULE_6__constants__["a" /* NAVIGATOR_AXIS */], - autoBind: naviOptions.autoBindElements - }) - ); - } - }; - - return Navigator; -}(__WEBPACK_IMPORTED_MODULE_5__common__["a" /* Class */])); - -function ClonedObject() { } -function clone(obj) { - ClonedObject.prototype = obj; - return new ClonedObject(); -} - -/* harmony default export */ __webpack_exports__["a"] = (Navigator); - -/***/ }), - -/***/ "../../../../@progress/kendo-charts/dist/es/stock/stock-chart.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__chart__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/chart.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__navigator__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/stock/navigator.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants__ = __webpack_require__("../../../../@progress/kendo-charts/dist/es/stock/constants.js"); - - - - - - - -var AUTO_CATEGORY_WIDTH = 28; - -var StockChart = (function (Chart) { - function StockChart () { - Chart.apply(this, arguments); - } - - if ( Chart ) StockChart.__proto__ = Chart; - StockChart.prototype = Object.create( Chart && Chart.prototype ); - StockChart.prototype.constructor = StockChart; - - StockChart.prototype.applyDefaults = function applyDefaults (options, themeOptions) { - var width = Object(__WEBPACK_IMPORTED_MODULE_3__common__["o" /* elementSize */])(this.element).width || __WEBPACK_IMPORTED_MODULE_2__common_constants__["m" /* DEFAULT_WIDTH */]; - var theme = themeOptions; - - var stockDefaults = { - seriesDefaults: { - categoryField: options.dateField - }, - axisDefaults: { - categoryAxis: { - name: "default", - majorGridLines: { - visible: false - }, - labels: { - step: 2 - }, - majorTicks: { - visible: false - }, - maxDateGroups: Math.floor(width / AUTO_CATEGORY_WIDTH) - } - } - }; - - if (theme) { - theme = Object(__WEBPACK_IMPORTED_MODULE_3__common__["k" /* deepExtend */])({}, theme, stockDefaults); - } - - __WEBPACK_IMPORTED_MODULE_1__navigator__["a" /* default */].setup(options, theme); - - Chart.prototype.applyDefaults.call(this, options, theme); - }; - - StockChart.prototype._setElementClass = function _setElementClass (element) { - Object(__WEBPACK_IMPORTED_MODULE_3__common__["e" /* addClass */])(element, 'k-chart k-stockchart'); - }; - - StockChart.prototype.setOptions = function setOptions (options) { - this.destroyNavigator(); - Chart.prototype.setOptions.call(this, options); - }; - - StockChart.prototype._resize = function _resize () { - var transitions = this.options.transitions; - - this.options.transitions = false; - this._fullRedraw(); - this.options.transitions = transitions; - }; - - StockChart.prototype._redraw = function _redraw () { - var navigator = this.navigator; - - if (!this._dirty() && navigator && navigator.options.partialRedraw) { - navigator.redrawSlaves(); - } else { - this._fullRedraw(); - } - }; - - StockChart.prototype._dirty = function _dirty () { - var options = this.options; - var series = [].concat(options.series, options.navigator.series); - var seriesCount = Object(__WEBPACK_IMPORTED_MODULE_3__common__["v" /* grep */])(series, function(s) { return s && s.visible; }).length; - var dirty = this._seriesCount !== seriesCount; - this._seriesCount = seriesCount; - - return dirty; - }; - - StockChart.prototype._fullRedraw = function _fullRedraw () { - var navigator = this.navigator; - - if (!navigator) { - navigator = this.navigator = new __WEBPACK_IMPORTED_MODULE_1__navigator__["a" /* default */](this); - this.trigger("navigatorCreated", { navigator: navigator }); - } - - navigator.setRange(); - Chart.prototype._redraw.call(this); - navigator.initSelection(); - }; - - StockChart.prototype._trackSharedTooltip = function _trackSharedTooltip (coords) { - var plotArea = this._plotArea; - var pane = plotArea.paneByPoint(coords); - - if (pane && pane.options.name === __WEBPACK_IMPORTED_MODULE_4__constants__["b" /* NAVIGATOR_PANE */]) { - this._unsetActivePoint(); - } else { - Chart.prototype._trackSharedTooltip.call(this, coords); - } - }; - - StockChart.prototype.bindCategories = function bindCategories () { - Chart.prototype.bindCategories.call(this); - this.copyNavigatorCategories(); - }; - - StockChart.prototype.copyNavigatorCategories = function copyNavigatorCategories () { - var definitions = [].concat(this.options.categoryAxis); - var categories; - - for (var axisIx = 0; axisIx < definitions.length; axisIx++) { - var axis = definitions[axisIx]; - if (axis.name === __WEBPACK_IMPORTED_MODULE_4__constants__["a" /* NAVIGATOR_AXIS */]) { - categories = axis.categories; - } else if (categories && axis.pane === __WEBPACK_IMPORTED_MODULE_4__constants__["b" /* NAVIGATOR_PANE */]) { - axis.categories = categories; - } - } - }; - - StockChart.prototype.destroyNavigator = function destroyNavigator () { - if (this.navigator) { - this.navigator.destroy(); - this.navigator = null; - } - }; - - StockChart.prototype.destroy = function destroy () { - this.destroyNavigator(); - Chart.prototype.destroy.call(this); - }; - - StockChart.prototype._stopChartHandlers = function _stopChartHandlers (e) { - var coords = this._eventCoordinates(e); - var pane = this._plotArea.paneByPoint(coords); - - return Chart.prototype._stopChartHandlers.call(this, e) || (pane && pane.options.name === __WEBPACK_IMPORTED_MODULE_4__constants__["b" /* NAVIGATOR_PANE */]); - }; - - return StockChart; -}(__WEBPACK_IMPORTED_MODULE_0__chart__["a" /* Chart */])); - -Object(__WEBPACK_IMPORTED_MODULE_3__common__["M" /* setDefaultOptions */])(StockChart, { - dateField: "date", - axisDefaults: { - categoryAxis: { - type: "date", - baseUnit: "fit", - justified: true - }, - valueAxis: { - narrowRange: true, - labels: { - format: "C" - } - } - }, - navigator: { - select: {}, - seriesDefaults: { - markers: { - visible: false - }, - tooltip: { - visible: true - }, - line: { - width: 2 - } - }, - hint: {}, - visible: true - }, - tooltip: { - visible: true - }, - legend: { - visible: false - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (StockChart); - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/accessor.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getter; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/utils.js"); - -var getterCache = {}; -var FIELD_REGEX = /\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g; -// tslint:disable-next-line:no-string-literal -getterCache['undefined'] = function (obj) { return obj; }; -/** - * @hidden - */ -var getter = function (field, safe) { - var key = field + safe; - if (getterCache[key]) { - return getterCache[key]; - } - var fields = []; - field.replace(FIELD_REGEX, function (_, index, indexAccessor, field) { - fields.push(Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(index) ? index : (indexAccessor || field)); - return undefined; - }); - getterCache[key] = function (obj) { - var result = obj; - for (var idx = 0; idx < fields.length; idx++) { - result = result[fields[idx]]; - if (!Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(result) && safe) { - return result; - } - } - return result; - }; - return getterCache[key]; -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/array.operators.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return orderBy; }); -/* unused harmony export distinct */ -/* unused harmony export count */ -/* unused harmony export limit */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return process; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sorting_sort_array_operator__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/sorting/sort-array.operator.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__grouping_group_operators__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/grouping/group.operators.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__filtering_filter_operators__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filtering/filter.operators.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__filtering_filter_expression_factory__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filtering/filter-expression.factory.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__transducers__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/transducers.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__accessor__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/accessor.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__funcs__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/funcs.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__sorting_sort__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/sorting/sort.js"); - - - - - - - - - -/** - * Orders the specified array according to the provided sort descriptors. - * - * @param {T[]} data - The data to be sorted. - * @param {SortDescriptor[]} descriptors - The descriptors by which the data will be sorted. - * @returns {T[]} - The sorted data. - * - * @example - * ```ts-no-run - * import { orderBy } from '@progress/kendo-data-query'; - * - * const data = [ - * { name: "Pork", category: "Food", subcategory: "Meat" }, - * { name: "Pepper", category: "Food", subcategory: "Vegetables" }, - * { name: "Beef", category: "Food", subcategory: "Meat" } - * ]; - * - * const result = orderBy(data, [{ field: "name", dir: "asc" }]); - * ``` - */ -var orderBy = function (data, descriptors) { - if (descriptors.some(function (x) { return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(x.dir); })) { - data = data.slice(0); - var comparer = Object(__WEBPACK_IMPORTED_MODULE_1__sorting_sort_array_operator__["a" /* composeSortDescriptors */])(descriptors); - Object(__WEBPACK_IMPORTED_MODULE_8__sorting_sort__["a" /* sort */])(data, 0, data.length, comparer); - } - return data; -}; -var defaultComparer = function (a, b) { return a === b; }; -var normalizeComparer = function (comparer) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* isString */])(comparer)) { - var accessor_1 = Object(__WEBPACK_IMPORTED_MODULE_6__accessor__["a" /* getter */])(comparer); - comparer = function (a, b) { return accessor_1(a) === accessor_1(b); }; - } - return comparer; -}; -var _distinct = function (data, comparer) { - return data.filter(function (x, idx, xs) { return xs.findIndex(comparer.bind(null, x)) === idx; }); -}; -/** - * Reduces the provided array so it contains only unique values. - * - * @param {T[]} data - The array that will be reduced. - * @param {(Comparer | string)} comparer - An optional custom comparer function or the field name that will be used for comparison. - * @returns {T[]} - The reduced data. - * - * @example - * ```ts-no-run - * import { distinct } from '@progress/kendo-data-query'; - * - * const data = [ - * { name: "Pork", category: "Food", subcategory: "Meat" }, - * { name: "Pepper", category: "Food", subcategory: "Vegetables" }, - * { name: "Beef", category: "Food", subcategory: "Meat" } - * ]; - * - * const result = distinct(data, "subcategory"); - * - * // output: - * // result => [ - * // { name: "Pork", category: "Food", subcategory: "Meat" }, - * // { name: "Pepper", category: "Food", subcategory: "Vegetables" } - * // ]; - * ``` - */ -var distinct = function (data, comparer) { - if (comparer === void 0) { comparer = defaultComparer; } - return _distinct(data, normalizeComparer(comparer)); -}; -/** - * @hidden - */ -var count = function (data, predicate) { - var counter = 0; - for (var idx = 0, length_1 = data.length; idx < length_1; idx++) { - if (predicate(data[idx])) { - counter++; - } - } - return counter; -}; -/** - * @hidden - */ -var limit = function (data, predicate) { - if (predicate) { - return data.filter(predicate); - } - return data; -}; -/** - * Applies the specified operation descriptors to the data. - * - * @param {T[]} data - The data to be processed. - * @param {State} state - The operation descriptors that will be applied to the data. - * @returns {DataResult} - The processed data. - * - * @example - * ``` ts-no-run - * - * const result = process(data, { - * skip: 10, - * take: 20, - * group: [{ - * field: 'category.categoryName', - * aggregates: [ - * { aggregate: "sum", field: "unitPrice" }, - * { aggregate: "sum", field: "unitsInStock" } - * ] - * }], - * sort: [{ field: 'productName', dir: 'desc' }], - * filter: { - * logic: "or", - * filters: [ - * { field: "discontinued", operator: "eq", value: true }, - * { field: "unitPrice", operator: "lt", value: 22 } - * ] - * } - * }); - * - * ``` - */ -var process = function (data, state) { - var skipCount = state.skip, takeCount = state.take, filterDescriptor = state.filter, sort = state.sort, group = state.group; - var sortDescriptors = Object(__WEBPACK_IMPORTED_MODULE_2__grouping_group_operators__["b" /* normalizeGroups */])(group || []).concat(sort || []); - if (sortDescriptors.length) { - data = orderBy(data, sortDescriptors); - } - var hasFilters = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(filterDescriptor) && __WEBPACK_IMPORTED_MODULE_5__transducers__["e" /* filter */].length; - var hasGroups = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(group) && group.length; - if (!hasFilters && !hasGroups) { - return { - data: takeCount ? data.slice(skipCount, skipCount + takeCount) : data, - total: data.length - }; - } - var total; - var transformers = []; - var predicate; - if (hasFilters) { - predicate = Object(__WEBPACK_IMPORTED_MODULE_4__filtering_filter_expression_factory__["a" /* compileFilter */])(Object(__WEBPACK_IMPORTED_MODULE_3__filtering_filter_operators__["a" /* normalizeFilters */])(filterDescriptor)); - total = count(data, predicate); - transformers.push(Object(__WEBPACK_IMPORTED_MODULE_5__transducers__["e" /* filter */])(predicate)); - } - else { - total = data.length; - } - if (Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(skipCount) && Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(takeCount)) { - transformers.push(Object(__WEBPACK_IMPORTED_MODULE_5__transducers__["h" /* skip */])(skipCount)); - transformers.push(Object(__WEBPACK_IMPORTED_MODULE_5__transducers__["i" /* take */])(takeCount)); - } - if (transformers.length) { - var transform = __WEBPACK_IMPORTED_MODULE_7__funcs__["a" /* compose */].apply(void 0, transformers); - var result = hasGroups ? - Object(__WEBPACK_IMPORTED_MODULE_2__grouping_group_operators__["a" /* groupBy */])(data, group, transform, limit(data, predicate)) : - Object(__WEBPACK_IMPORTED_MODULE_5__transducers__["c" /* exec */])(transform(__WEBPACK_IMPORTED_MODULE_5__transducers__["b" /* concat */]), [], data); - return { data: result, total: total }; - } - return { - data: hasGroups ? Object(__WEBPACK_IMPORTED_MODULE_2__grouping_group_operators__["a" /* groupBy */])(data, group) : data, - total: total - }; -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/filter-serialization.common.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export wrapIf */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return toUTC; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return quote; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return formatDate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return toLower; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return normalizeField; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isStringValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isDateValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return serializeFilters; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/utils.js"); - -/** - * @hidden - * Creates a single arity function which wraps the value based on the provided predicate. - * @example - * ``` - * wrapIf(() => ignoreCase) `tolower(${field})` - * //ignoreCase=true -> tolower(${field})` - * //ignoreCase=false -> ${field}` - * ``` - */ -var wrapIf = function (predicate) { return function (str) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - return predicate() ? "" + str[0] + args[0] + str[1] : args[0]; -}; }; -/** - * @hidden - */ -var toUTC = function (date) { - return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds())); -}; -/** - * @hidden - */ -var quote = function (_a) { - var field = _a.field, value = _a.value, ignoreCase = _a.ignoreCase, operator = _a.operator; - return ({ - value: "'" + value.replace(/'/g, "''") + "'", - field: field, - ignoreCase: ignoreCase, - operator: operator - }); -}; -/** - * @hidden - */ -var formatDate = function (_a) { - var field = _a.field, value = _a.value, ignoreCase = _a.ignoreCase, operator = _a.operator; - return ({ - value: JSON.stringify(toUTC(value)).replace(/"/g, ""), - field: field, - ignoreCase: ignoreCase, - operator: operator - }); -}; -/** - * @hidden - */ -var toLower = function (_a) { - var field = _a.field, value = _a.value, ignoreCase = _a.ignoreCase, operator = _a.operator; - return ({ - field: (_b = ["tolower(", ")"], _b.raw = ["tolower(", ")"], wrapIf(function () { return ignoreCase; })(_b, field)), - value: value, - ignoreCase: ignoreCase, - operator: operator - }); - var _b; -}; -/** - * @hidden - */ -var normalizeField = function (_a) { - var field = _a.field, value = _a.value, ignoreCase = _a.ignoreCase, operator = _a.operator; - return ({ - value: value, - field: field.replace(/\./g, "/"), - ignoreCase: ignoreCase, - operator: operator - }); -}; -/** - * @hidden - */ -var isStringValue = function (x) { return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* isString */])(x.value); }; -/** - * @hidden - */ -var isDateValue = function (x) { return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["c" /* isDate */])(x.value); }; -/** - * @hidden - */ -var serializeFilters = function (map, join) { return function (filter) { - var brackets = wrapIf(function () { return filter.filters.length > 1; }); - return (_a = ["(", ")"], _a.raw = ["(", - ")"], brackets(_a, filter.filters - .map(map) - .join(join(filter)))); - var _a; -}; }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/filtering/filter-descriptor.interface.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isCompositeFilterDescriptor; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/utils.js"); - -/** - * @hidden - * Type guard for `CompositeFilterDescriptor`. - */ -var isCompositeFilterDescriptor = function (source) { - return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(source.filters); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/filtering/filter-expression.factory.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return compileFilter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return filterBy; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter_descriptor_interface__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filtering/filter-descriptor.interface.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__filter_operators__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filtering/filter.operators.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__filter_no_eval__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filtering/filter-no-eval.js"); - - - - -/** - * Creates a [`Predicate`]({% slug api_kendo-data-query_predicate %}) function - * for the specified [`CompositeFilterDescriptor`]({% slug api_kendo-data-query_compositefilterdescriptor %}). - * - * @param {CompositeFilterDescriptor} descriptor - The descriptor for which the predicate is created. - * @returns {Predicate} - The created function instance. - * - * @example - * ```ts-no-run - * import { compileFilter } from '@progress/kendo-data-query'; - * - * const data = [{ name: "Pork" }, { name: "Pepper" }, { name: "Beef" } ]; - * const predicate = compileFilter({ logic: "and", filters: [{ field: "name", operator: "startswith", value: "P" }] }); - * const result = data.filter(predicate); - * - * ``` - */ -var compileFilter = function (descriptor) { - if (!descriptor || descriptor.filters.length === 0) { - return function () { return true; }; - } - return Object(__WEBPACK_IMPORTED_MODULE_3__filter_no_eval__["a" /* transformCompositeFilter */])(descriptor); -}; -/** - * Filters the provided array according to the specified - * [`CompositeFilterDescriptor`]({% slug api_kendo-data-query_compositefilterdescriptor %}). - * - * @param {T[]} data - The data that will be filtered. - * @param {(CompositeFilterDescriptor | FilterDescriptor)} descriptor - The filter criteria that will be applied. - * @returns {T[]} - The filtered data. - * - * @example - * ```ts-no-run - * import { filterBy } from '@progress/kendo-data-query'; - * - * const data = [ - * { name: "Pork", category: "Food", subcategory: "Meat" }, - * { name: "Pepper", category: "Food", subcategory: "Vegetables" }, - * { name: "Beef", category: "Food", subcategory: "Meat" } - * ]; - * - * const result = filterBy(data, { - * logic: 'and', - * filters: [ - * { field: "name", operator: "startswith", value: "p", ignoreCase: true }, - * { field: "subcategory", operator: "eq", value: "Meat" }, - * ] - * }); - * - * // output: - * // [{ "name": "Pork", "category": "Food", "subcategory": "Meat" }] - * ``` - */ -var filterBy = function (data, descriptor) { - if (!Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(descriptor) || (Object(__WEBPACK_IMPORTED_MODULE_1__filter_descriptor_interface__["a" /* isCompositeFilterDescriptor */])(descriptor) && descriptor.filters.length === 0)) { - return data; - } - return data.filter(compileFilter(Object(__WEBPACK_IMPORTED_MODULE_2__filter_operators__["a" /* normalizeFilters */])(descriptor))); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/filtering/filter-no-eval.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return transformCompositeFilter; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__filter_descriptor_interface__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filtering/filter-descriptor.interface.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__accessor__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/accessor.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/utils.js"); - - - -var logic = { - "or": { - concat: function (acc, fn) { return function (a) { return acc(a) || fn(a); }; }, - identity: function () { return false; } - }, - "and": { - concat: function (acc, fn) { return function (a) { return acc(a) && fn(a); }; }, - identity: function () { return true; } - } -}; -var operatorsMap = { - contains: function (a, b) { return (a || "").indexOf(b) >= 0; }, - doesnotcontain: function (a, b) { return (a || "").indexOf(b) === -1; }, - doesnotendwith: function (a, b) { return (a || "").indexOf(b, (a || "").length - (b || "").length) < 0; }, - doesnotstartwith: function (a, b) { return (a || "").lastIndexOf(b, 0) === -1; }, - endswith: function (a, b) { return (a || "").indexOf(b, (a || "").length - (b || "").length) >= 0; }, - eq: function (a, b) { return a === b; }, - gt: function (a, b) { return a > b; }, - gte: function (a, b) { return a >= b; }, - isempty: function (a) { return a === ''; }, - isnotempty: function (a) { return a !== ''; }, - isnotnull: function (a) { return Object(__WEBPACK_IMPORTED_MODULE_2__utils__["g" /* isPresent */])(a); }, - isnull: function (a) { return Object(__WEBPACK_IMPORTED_MODULE_2__utils__["b" /* isBlank */])(a); }, - lt: function (a, b) { return a < b; }, - lte: function (a, b) { return a <= b; }, - neq: function (a, b) { return a != b; }, - startswith: function (a, b) { return (a || "").lastIndexOf(b, 0) === 0; } -}; -var dateRegExp = /^\/Date\((.*?)\)\/$/; -var convertValue = function (value, ignoreCase) { - if (value != null && Object(__WEBPACK_IMPORTED_MODULE_2__utils__["h" /* isString */])(value)) { - var date = dateRegExp.exec(value); - if (date) { - return new Date(+date[1]).getTime(); - } - else if (ignoreCase) { - return value.toLowerCase(); - } - } - else if (value != null && Object(__WEBPACK_IMPORTED_MODULE_2__utils__["c" /* isDate */])(value)) { - return value.getTime(); - } - return value; -}; -var typedGetter = function (prop, value, ignoreCase) { - if (!Object(__WEBPACK_IMPORTED_MODULE_2__utils__["g" /* isPresent */])(value)) { - return prop; - } - var acc = prop; - if (Object(__WEBPACK_IMPORTED_MODULE_2__utils__["h" /* isString */])(value)) { - var date = dateRegExp.exec(value); - if (date) { - value = new Date(+date[1]); - } - else if (ignoreCase) { - acc = function (a) { - var x = prop(a); - return typeof x === 'string' ? x.toLowerCase() : x; - }; - } - } - if (Object(__WEBPACK_IMPORTED_MODULE_2__utils__["c" /* isDate */])(value)) { - return function (a) { - var x = acc(a); - return Object(__WEBPACK_IMPORTED_MODULE_2__utils__["c" /* isDate */])(x) ? x.getTime() : x; - }; - } - return acc; -}; -var transformFilter = function (_a) { - var field = _a.field, ignoreCase = _a.ignoreCase, value = _a.value, operator = _a.operator; - field = !Object(__WEBPACK_IMPORTED_MODULE_2__utils__["g" /* isPresent */])(field) ? function (a) { return a; } : field; - ignoreCase = Object(__WEBPACK_IMPORTED_MODULE_2__utils__["g" /* isPresent */])(ignoreCase) ? ignoreCase : true; - var itemProp = typedGetter(Object(__WEBPACK_IMPORTED_MODULE_2__utils__["d" /* isFunction */])(field) ? field : Object(__WEBPACK_IMPORTED_MODULE_1__accessor__["a" /* getter */])(field, true), value, ignoreCase); - value = convertValue(value, ignoreCase); - var op = Object(__WEBPACK_IMPORTED_MODULE_2__utils__["d" /* isFunction */])(operator) ? operator : operatorsMap[operator]; - return function (a) { return op(itemProp(a), value, ignoreCase); }; -}; -/** - * @hidden - */ -var transformCompositeFilter = function (filter) { - var combiner = logic[filter.logic]; - return filter.filters - .filter(__WEBPACK_IMPORTED_MODULE_2__utils__["g" /* isPresent */]) - .map(function (x) { return Object(__WEBPACK_IMPORTED_MODULE_0__filter_descriptor_interface__["a" /* isCompositeFilterDescriptor */])(x) ? transformCompositeFilter(x) : transformFilter(x); }) - .reduce(combiner.concat, combiner.identity); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/filtering/filter.operators.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeFilters; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter_descriptor_interface__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filtering/filter-descriptor.interface.js"); - - -var operatorMap = function (key) { return ({ - "!=": "neq", - "<": "lt", - "<=": "lte", - "==": "eq", - ">": "gt", - ">=": "gte", - equal: "eq", - equals: "eq", - equalto: "eq", - ge: "gte", - greater: "gt", - greaterthan: "gt", - greaterthanequal: "gte", - isempty: "isempty", - isequalto: "eq", - isgreaterthan: "gt", - isgreaterthanorequalto: "gte", - islessthan: "lt", - islessthanorequalto: "lte", - isnotempty: "isnotempty", - isnotequalto: "neq", - isnull: "isnull", - le: "lte", - less: "lt", - lessthan: "lt", - lessthanequal: "lte", - ne: "neq", - notequal: "neq", - notequals: "neq", - notequalto: "neq", - notsubstringof: "doesnotcontain" -}[key.toLowerCase()] || key); }; -var normalizeOperator = function (descriptor) { - var filters = descriptor.filters || []; - filters.forEach(function (filter) { - if (!Object(__WEBPACK_IMPORTED_MODULE_1__filter_descriptor_interface__["a" /* isCompositeFilterDescriptor */])(filter) && Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* isString */])(filter.operator)) { - filter.operator = operatorMap(filter.operator); - } - if (Object(__WEBPACK_IMPORTED_MODULE_1__filter_descriptor_interface__["a" /* isCompositeFilterDescriptor */])(filter)) { - normalizeOperator(filter); - } - }); -}; -var normalizeDescriptor = function (descriptor) { - if (!Object(__WEBPACK_IMPORTED_MODULE_1__filter_descriptor_interface__["a" /* isCompositeFilterDescriptor */])(descriptor)) { - return { - filters: Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* isArray */])(descriptor) ? descriptor : [descriptor], - logic: "and" - }; - } - return descriptor; -}; -/** - * Converts a [`FilterDescriptor`]({% slug api_kendo-data-query_filterdescriptor %}) into a - * [`CompositeFilterDescriptor`]({% slug api_kendo-data-query_compositefilterdescriptor %}). - * - * If a `CompositeFilterDescriptor` is passed, no modifications will be made. - * - * @param {CompositeFilterDescriptor | FilterDescriptor} descriptor - The descriptor that will be normalized. - * @returns {CompositeFilterDescriptor} - The normalized descriptor. - */ -var normalizeFilters = function (descriptor) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(descriptor)) { - descriptor = normalizeDescriptor(descriptor); - normalizeOperator(descriptor); - } - return descriptor; -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/funcs.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return either; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return compose; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return constant; }); -/** - * @hidden - */ -/** - * @hidden - */ var either = function (predicate, right, left) { return function (value) { return predicate(value) ? right(value) : left(value); }; }; -/** - * @hidden - * Performs the right-to-left function composition. Functions should have a unary. - */ -var compose = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return function (data) { return args.reduceRight(function (acc, curr) { return curr(acc); }, data); }; -}; -/** - * @hidden - */ -var constant = function (x) { return function () { return x; }; }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/grouping/aggregate.operators.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return aggregateBy; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__transducers__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/transducers.js"); - -var identity = Object(__WEBPACK_IMPORTED_MODULE_0__transducers__["g" /* map */])(function (x) { return x; }); -/** - * Applies the specified [`AggregateDescriptors`]({% slug api_kendo-data-query_aggregatedescriptor %}) to the data. - * Returns an [`AggregateResult`]({% slug api_kendo-data-query_aggregateresult %}) instance. - * - * @example - * ```ts-no-run - * const data = [ - * { unitPrice: 23, unitsInStock: 21 }, - * { unitPrice: 10, unitsInStock: 12 }, - * { unitPrice: 20, unitsInStock: 33 } - * ]; - * - * const result = aggregateBy(data, [ - * { aggregate: "sum", field: "unitPrice" }, - * { aggregate: "sum", field: "unitsInStock" } - * ]); - * - * //output: - * // { - * // "unitPrice": { "sum": 53 }, - * // "unitsInStock": { "sum": 66 } - * // } - * ``` - * @param {T[]} data - The data on which the calculation will be executed. - * @param {AggregateDescriptor[]} descriptors - The aggregate operations that will be executed. - * @param {any} transformers - For internal use. - * @returns {AggregateResult} - The aggregated result. - * For more information, refer to the [`aggregateresult`]({% slug api_kendo-data-query_aggregateresult %}) configuration. - */ -var aggregateBy = function (data, descriptors, transformers) { - if (descriptors === void 0) { descriptors = []; } - if (transformers === void 0) { transformers = identity; } - var initialValue = {}; - if (!descriptors.length) { - return initialValue; - } - var result = Object(__WEBPACK_IMPORTED_MODULE_0__transducers__["c" /* exec */])(transformers(Object(__WEBPACK_IMPORTED_MODULE_0__transducers__["a" /* aggregatesCombinator */])(descriptors)), initialValue, data); - return Object(__WEBPACK_IMPORTED_MODULE_0__transducers__["d" /* expandAggregates */])(result); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/grouping/group.operators.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return normalizeGroups; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return groupBy; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__transducers__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/transducers.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__aggregate_operators__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/grouping/aggregate.operators.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__filtering_filter_expression_factory__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filtering/filter-expression.factory.js"); - - - - -/** - * @hidden - */ -var normalizeGroups = function (descriptors) { - descriptors = Object(__WEBPACK_IMPORTED_MODULE_1__utils__["a" /* isArray */])(descriptors) ? descriptors : [descriptors]; - return descriptors.map(function (x) { return Object.assign({ dir: "asc" }, x); }); -}; -var identity = Object(__WEBPACK_IMPORTED_MODULE_0__transducers__["g" /* map */])(function (x) { return x; }); -/** - * Groups the provided data according to the specified descriptors. - * - * @param {Array} data - The data that will be grouped. - * @param {GroupDescriptor[]} descriptors - The descriptors. - * @param {any} transformers - For internal use. - * @param {Array} originalData - For internal use. - * @returns {(Array> | T[])} - The grouped data. - * - * @example - * ```ts-no-run - * - * import { groupBy } from '@progress/kendo-data-query'; - * - * const data = [ - * { name: "Pork", category: "Food", subcategory: "Meat" }, - * { name: "Pepper", category: "Food", subcategory: "Vegetables" }, - * { name: "Beef", category: "Food", subcategory: "Meat" } - * ]; - * - * const result = groupBy(data, [{ field: "subcategory" }]); - * ``` - */ -var groupBy = function (data, descriptors, transformers, originalData) { - if (descriptors === void 0) { descriptors = []; } - if (transformers === void 0) { transformers = identity; } - if (originalData === void 0) { originalData = data; } - descriptors = normalizeGroups(descriptors); - if (!descriptors.length) { - return data; - } - var descriptor = descriptors[0]; - var initialValue = {}; - var view = Object(__WEBPACK_IMPORTED_MODULE_0__transducers__["c" /* exec */])(transformers(Object(__WEBPACK_IMPORTED_MODULE_0__transducers__["f" /* groupCombinator */])(descriptor.field)), initialValue, data); - var result = []; - Object.keys(view).forEach(function (field) { - Object.keys(view[field]).forEach(function (value) { - var group = view[field][value]; - var aggregateResult = {}; - var filteredData = originalData; - if (Object(__WEBPACK_IMPORTED_MODULE_1__utils__["g" /* isPresent */])(descriptor.aggregates)) { - filteredData = Object(__WEBPACK_IMPORTED_MODULE_3__filtering_filter_expression_factory__["b" /* filterBy */])(originalData, { - field: descriptor.field, - ignoreCase: false, - operator: 'eq', - value: group.value - }); - aggregateResult = Object(__WEBPACK_IMPORTED_MODULE_2__aggregate_operators__["a" /* aggregateBy */])(filteredData, descriptor.aggregates); - } - result[group.__position] = { - aggregates: aggregateResult, - field: field, - items: descriptors.length > 1 ? - groupBy(group.items, descriptors.slice(1), identity, filteredData) - : group.items, - value: group.value - }; - }); - }); - return result; -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/main.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__filtering_filter_descriptor_interface__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filtering/filter-descriptor.interface.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__filtering_filter_descriptor_interface__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__odata_operators__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/odata.operators.js"); -/* unused harmony reexport toODataString */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mvc_operators__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/mvc/operators.js"); -/* unused harmony reexport toDataSourceRequestString */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mvc_deserialization__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/mvc/deserialization.js"); -/* unused harmony reexport translateDataSourceResultGroups */ -/* unused harmony reexport translateAggregateResults */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__array_operators__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/array.operators.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_4__array_operators__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_4__array_operators__["b"]; }); -/* unused harmony reexport distinct */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__accessor__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/accessor.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_5__accessor__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__filtering_filter_expression_factory__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filtering/filter-expression.factory.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_6__filtering_filter_expression_factory__["b"]; }); -/* unused harmony reexport compileFilter */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__grouping_group_operators__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/grouping/group.operators.js"); -/* unused harmony reexport groupBy */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__sorting_sort_array_operator__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/sorting/sort-array.operator.js"); -/* unused harmony reexport composeSortDescriptors */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__filtering_filter_operators__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filtering/filter.operators.js"); -/* unused harmony reexport normalizeFilters */ -/* unused harmony reexport normalizeGroups */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__grouping_aggregate_operators__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/grouping/aggregate.operators.js"); -/* unused harmony reexport aggregateBy */ - - - - - - - - - - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/mvc/deserialization.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export translateDataSourceResultGroups */ -/* unused harmony export translateAggregateResults */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__funcs__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/funcs.js"); - - -var set = function (field, target, value) { - target[field] = value; - return target; -}; -var convert = function (mapper) { return function (values) { return Object.keys(values).reduce(mapper.bind(null, values), {}); }; }; -var translateAggregate = convert(function (source, acc, field) { return set(field.toLowerCase(), acc, source[field]); }); -var translateAggregates = convert(function (source, acc, field) { return set(field, acc, translateAggregate(source[field])); }); -var valueOrDefault = function (value, defaultValue) { return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(value) ? value : defaultValue; }; -var normalizeGroup = function (group) { return ({ - aggregates: group.Aggregates || group.aggregates, - field: group.Member || group.member || group.field, - hasSubgroups: group.HasSubgroups || group.hasSubgroups || false, - items: group.Items || group.items, - value: valueOrDefault(group.Key, valueOrDefault(group.key, group.value)) -}); }; -var translateGroup = Object(__WEBPACK_IMPORTED_MODULE_1__funcs__["a" /* compose */])(function (_a) { - var field = _a.field, hasSubgroups = _a.hasSubgroups, value = _a.value, aggregates = _a.aggregates, items = _a.items; - return ({ - aggregates: translateAggregates(aggregates), - field: field, - items: hasSubgroups ? items.map(translateGroup) : items, - value: value - }); -}, normalizeGroup); -/** - * Converts the grouped result, which is returned into the `Data` field - * of the UI for ASP.NET MVC `ToDataSourceResult` method, to a comparable format. - * @param data - The value of the `Data` field of the response. - * @returns {GroupResult[]} - The converted result. - */ -var translateDataSourceResultGroups = function (data) { return data.map(translateGroup); }; -/** - * Converts the `AggregateResults` field content, which is returned by the - * UI for ASP.NET MVC `ToDataSourceResult` method, to a comparable format. - * @param data - The value of the `AggregateResults` field of the response. - * @returns {AggregateResult} - The converted result. - */ -var translateAggregateResults = function (data) { return ((data || []).reduce(function (acc, x) { return set(x.Member, acc, set(x.AggregateMethodName.toLowerCase(), acc[x.Member] || {}, x.Value)); }, {})); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/mvc/operators.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export toDataSourceRequestString */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__filtering_filter_descriptor_interface__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filtering/filter-descriptor.interface.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__accessor__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/accessor.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__funcs__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/funcs.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__filter_serialization_common__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filter-serialization.common.js"); - - - - - -var prefixWith = function (key) { return function (value) { return key + "=" + value; }; }; -var empty = function () { return ""; }; -var isNotEmptyArray = function (value) { return Object(__WEBPACK_IMPORTED_MODULE_1__utils__["g" /* isPresent */])(value) && Object(__WEBPACK_IMPORTED_MODULE_1__utils__["a" /* isArray */])(value) && value.length > 0; }; -var has = function (accessor) { return function (value) { return Object(__WEBPACK_IMPORTED_MODULE_1__utils__["g" /* isPresent */])(accessor(value)); }; }; -var isNotEmpty = function (accessor) { return function (value) { return isNotEmptyArray(accessor(value)); }; }; -var runOrEmpty = function (predicate, fn) { return Object(__WEBPACK_IMPORTED_MODULE_3__funcs__["c" /* either */])(predicate, fn, empty); }; -var calcPage = function (_a) { - var skip = _a.skip, take = _a.take; - return Math.floor((skip || 0) / take) + 1; -}; -var formatDescriptors = function (accessor, formatter) { return function (state) { return (accessor(state).map(formatter).join("~")); }; }; -var removeAfter = function (what) { return function (str) { return str.slice(0, str.indexOf(what)); }; }; -var replace = function (patterns) { - return __WEBPACK_IMPORTED_MODULE_3__funcs__["a" /* compose */].apply(void 0, patterns.map(function (_a) { - var left = _a[0], right = _a[1]; - return function (s) { return s.replace(new RegExp(left, "g"), right); }; - })); -}; -var sanitizeDateLiterals = replace([["\"", ""], [":", "-"]]); -var removeAfterDot = removeAfter("."); -var directionFormatter = function (_a) { - var field = _a.field, _b = _a.dir, dir = _b === void 0 ? "asc" : _b; - return field + "-" + dir; -}; -var aggregateFormatter = function (_a) { - var field = _a.field, aggregate = _a.aggregate; - return field + "-" + aggregate; -}; -var take = Object(__WEBPACK_IMPORTED_MODULE_2__accessor__["a" /* getter */])("take"); -var aggregates = Object(__WEBPACK_IMPORTED_MODULE_2__accessor__["a" /* getter */])("aggregates"); -var skip = Object(__WEBPACK_IMPORTED_MODULE_2__accessor__["a" /* getter */])("skip"); -var group = Object(__WEBPACK_IMPORTED_MODULE_2__accessor__["a" /* getter */])("group"); -var sort = Object(__WEBPACK_IMPORTED_MODULE_2__accessor__["a" /* getter */])("sort", true); -var formatSort = formatDescriptors(sort, directionFormatter); -var formatGroup = formatDescriptors(group, directionFormatter); -var formatAggregates = formatDescriptors(aggregates, aggregateFormatter); -var prefixDateValue = function (value) { return "datetime'" + value + "'"; }; -var formatDateValue = Object(__WEBPACK_IMPORTED_MODULE_3__funcs__["a" /* compose */])(prefixDateValue, removeAfterDot, sanitizeDateLiterals, JSON.stringify, __WEBPACK_IMPORTED_MODULE_4__filter_serialization_common__["h" /* toUTC */]); -var formatDate = function (_a) { - var field = _a.field, value = _a.value, ignoreCase = _a.ignoreCase, operator = _a.operator; - return ({ - value: formatDateValue(value), - field: field, - ignoreCase: ignoreCase, - operator: operator - }); -}; -var normalizeSort = function (state) { return Object.assign({}, state, { - sort: (sort(state) || []).filter(function (_a) { - var dir = _a.dir; - return Object(__WEBPACK_IMPORTED_MODULE_1__utils__["e" /* isNotNullOrEmptyString */])(dir); - }) -}); }; -var transformSkip = Object(__WEBPACK_IMPORTED_MODULE_3__funcs__["a" /* compose */])(prefixWith('page'), calcPage); -var transformTake = Object(__WEBPACK_IMPORTED_MODULE_3__funcs__["a" /* compose */])(prefixWith('pageSize'), take); -var transformGroup = Object(__WEBPACK_IMPORTED_MODULE_3__funcs__["a" /* compose */])(prefixWith('group'), formatGroup); -var transformSort = Object(__WEBPACK_IMPORTED_MODULE_3__funcs__["a" /* compose */])(prefixWith('sort'), formatSort); -var transformAggregates = Object(__WEBPACK_IMPORTED_MODULE_3__funcs__["a" /* compose */])(prefixWith('aggregate'), formatAggregates); -var serializePage = runOrEmpty(has(skip), transformSkip); -var serializePageSize = runOrEmpty(has(take), transformTake); -var serializeGroup = runOrEmpty(isNotEmpty(group), transformGroup); -var serializeAggregates = runOrEmpty(has(aggregates), transformAggregates); -var serializeSort = Object(__WEBPACK_IMPORTED_MODULE_3__funcs__["a" /* compose */])(runOrEmpty(isNotEmpty(sort), transformSort), normalizeSort); -var hasField = function (_a) { - var field = _a.field; - return Object(__WEBPACK_IMPORTED_MODULE_1__utils__["e" /* isNotNullOrEmptyString */])(field); -}; -var filterFormatter = function (_a) { - var field = _a.field, operator = _a.operator, value = _a.value; - return field + "~" + operator + "~" + value; -}; -var dateFormatter = Object(__WEBPACK_IMPORTED_MODULE_3__funcs__["c" /* either */])(__WEBPACK_IMPORTED_MODULE_4__filter_serialization_common__["b" /* isDateValue */], Object(__WEBPACK_IMPORTED_MODULE_3__funcs__["a" /* compose */])(filterFormatter, formatDate), filterFormatter); -var typedFormatter = runOrEmpty(hasField, Object(__WEBPACK_IMPORTED_MODULE_3__funcs__["c" /* either */])(__WEBPACK_IMPORTED_MODULE_4__filter_serialization_common__["c" /* isStringValue */], Object(__WEBPACK_IMPORTED_MODULE_3__funcs__["a" /* compose */])(filterFormatter, __WEBPACK_IMPORTED_MODULE_4__filter_serialization_common__["e" /* quote */]), dateFormatter)); -var join = function (_a) { - var logic = _a.logic; - return "~" + logic + "~"; -}; -var serialize = Object(__WEBPACK_IMPORTED_MODULE_4__filter_serialization_common__["f" /* serializeFilters */])(function (filter) { return Object(__WEBPACK_IMPORTED_MODULE_3__funcs__["c" /* either */])(__WEBPACK_IMPORTED_MODULE_0__filtering_filter_descriptor_interface__["a" /* isCompositeFilterDescriptor */], serialize, typedFormatter)(filter); }, join); -var serializeFilter = function (_a) { - var filter = _a.filter; - if (filter && filter.filters) { - var filters = serialize(filter); - if (filters.length) { - return "filter=" + filters; - } - } - return ""; -}; -var rules = function (state) { return function (key) { return ({ - "aggregates": serializeAggregates(state), - "filter": serializeFilter(state), - "group": serializeGroup(state), - "skip": serializePage(state), - "sort": serializeSort(state), - "take": serializePageSize(state) -}[key]); }; }; -/** - * Converts a [`DataSourceRequestState`]({% slug api_kendo-data-query_datasourcerequeststate %}) into a string - * that is comparable with the `DataSourceRequest` format in UI for ASP.NET MVC. - * - * @param {DataRequestState} state - The state that will be serialized. - * @returns {string} - The serialized state. - * @example - * ```ts-no-run - * import { - * toDataSourceRequestString, - * translateDataSourceResultGroups, - * translateAggregateResults - * } from '@progress/kendo-data-query'; - * - * export class Service { - * private BASE_URL: string = '...'; - * - * constructor(private http: Http) { } - * - * // Omitted for brevity... - * - * private fetch(state: DataSourceRequestState): Observable { - * const queryStr = `${toDataSourceRequestString(state)}`; //serialize the state - * const hasGroups = state.group && state.group.length; - * - * return this.http - * .get(`${this.BASE_URL}?${queryStr}`) //send the state to the server - * .map(response => response.json()) - * .map(({Data, Total, AggregateResults}) => // process the response - * ({ - * //if there are groups convert them to compatible format - * data: hasGroups ? translateDataSourceResultGroups(Data) : Data, - * total: Total, - * // convert the aggregates if such exists - * aggregateResult: translateAggregateResults(AggregateResults) - * }) - * ); - * } - * } - * ``` - */ -var toDataSourceRequestString = function (state) { return (Object.keys(state) - .map(rules(state)) - .filter(__WEBPACK_IMPORTED_MODULE_1__utils__["e" /* isNotNullOrEmptyString */]) - .join('&')); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/odata-filtering.operators.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return serializeFilter; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__filtering_filter_descriptor_interface__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filtering/filter-descriptor.interface.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__funcs__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/funcs.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__filter_serialization_common__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/filter-serialization.common.js"); - - - -var fnFormatter = function (operator) { return function (_a) { - var field = _a.field, value = _a.value; - return operator + "(" + field + "," + value + ")"; -}; }; -var singleOperatorFormatter = function (operator) { return function (_a) { - var field = _a.field, value = _a.value; - return field + " " + operator + " " + value; -}; }; -var stringFormat = function (formatter) { return Object(__WEBPACK_IMPORTED_MODULE_1__funcs__["a" /* compose */])(formatter, __WEBPACK_IMPORTED_MODULE_2__filter_serialization_common__["e" /* quote */], __WEBPACK_IMPORTED_MODULE_2__filter_serialization_common__["g" /* toLower */], __WEBPACK_IMPORTED_MODULE_2__filter_serialization_common__["d" /* normalizeField */]); }; -var stringFnOperator = function (operator) { return stringFormat(fnFormatter(operator)); }; -var stringOperator = function (operator) { return stringFormat(singleOperatorFormatter(operator)); }; -var numericOperator = function (operator) { return Object(__WEBPACK_IMPORTED_MODULE_1__funcs__["a" /* compose */])(singleOperatorFormatter(operator), __WEBPACK_IMPORTED_MODULE_2__filter_serialization_common__["d" /* normalizeField */]); }; -var dateOperator = function (operator) { return Object(__WEBPACK_IMPORTED_MODULE_1__funcs__["a" /* compose */])(singleOperatorFormatter(operator), __WEBPACK_IMPORTED_MODULE_2__filter_serialization_common__["d" /* normalizeField */], __WEBPACK_IMPORTED_MODULE_2__filter_serialization_common__["a" /* formatDate */]); }; -var ifDate = function (operator) { return Object(__WEBPACK_IMPORTED_MODULE_1__funcs__["c" /* either */])(__WEBPACK_IMPORTED_MODULE_2__filter_serialization_common__["b" /* isDateValue */], dateOperator(operator), numericOperator(operator)); }; -var typedOperator = function (operator) { return Object(__WEBPACK_IMPORTED_MODULE_1__funcs__["c" /* either */])(__WEBPACK_IMPORTED_MODULE_2__filter_serialization_common__["c" /* isStringValue */], stringOperator(operator), ifDate(operator)); }; -var appendEqual = function (str) { return str + " eq -1"; }; -var filterOperators = { - contains: stringFnOperator("contains"), - doesnotcontain: Object(__WEBPACK_IMPORTED_MODULE_1__funcs__["a" /* compose */])(appendEqual, stringFnOperator("indexof")), - endswith: stringFnOperator("endswith"), - eq: typedOperator("eq"), - gt: typedOperator("gt"), - gte: typedOperator("ge"), - isempty: function (_a) { - var field = _a.field; - return field + " eq ''"; - }, - isnotempty: function (_a) { - var field = _a.field; - return field + " ne ''"; - }, - isnotnull: function (_a) { - var field = _a.field; - return field + " ne null"; - }, - isnull: function (_a) { - var field = _a.field; - return field + " eq null"; - }, - lt: typedOperator("lt"), - lte: typedOperator("le"), - neq: typedOperator("ne"), - startswith: stringFnOperator("startswith") -}; -var join = function (x) { return " " + x.logic + " "; }; -var serialize = function (x) { return filterOperators[x.operator](x); }; -var serializeAll = Object(__WEBPACK_IMPORTED_MODULE_2__filter_serialization_common__["f" /* serializeFilters */])(function (filter) { return Object(__WEBPACK_IMPORTED_MODULE_1__funcs__["c" /* either */])(__WEBPACK_IMPORTED_MODULE_0__filtering_filter_descriptor_interface__["a" /* isCompositeFilterDescriptor */], serializeAll, serialize)(filter); }, join); -/** - * @hidden - */ -var serializeFilter = function (filter) { - if (filter.filters && filter.filters.length) { - return "$filter=" + serializeAll(filter); - } - return ""; -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/odata.operators.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export toODataString */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__odata_filtering_operators__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/odata-filtering.operators.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__funcs__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/funcs.js"); - - - -var serializeSort = function (orderby) { - var str = orderby - .filter(function (sort) { return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(sort.dir); }) - .map(function (sort) { - var order = sort.field.replace(/\./g, "/"); - return sort.dir === "desc" ? order + " desc" : order; - }).join(","); - return str ? "$orderby=" + str : str; -}; -var emptyString = Object(__WEBPACK_IMPORTED_MODULE_2__funcs__["b" /* constant */])(''); -var concat = function (a) { return function (b) { return a + b; }; }; -var serializeKey = function (strings, val) { return Object(__WEBPACK_IMPORTED_MODULE_2__funcs__["c" /* either */])(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */], concat(strings[0]), emptyString)(val); }; -var rules = function (key, state) { - return ({ - "filter": Object(__WEBPACK_IMPORTED_MODULE_1__odata_filtering_operators__["a" /* serializeFilter */])(state.filter || {}), - "skip": (_a = ["$skip=", ""], _a.raw = ["$skip=", ""], serializeKey(_a, state.skip)), - "sort": serializeSort(state.sort || []), - "take": (_b = ["$top=", ""], _b.raw = ["$top=", ""], serializeKey(_b, state.take)) - }[key]); - var _a, _b; -}; -/** - * Converts a [`State`]({% slug api_kendo-data-query_state %}) into an OData v4 compatible string. - * - * @param {State} state - The state that will be serialized. - * @returns {string} - The serialized state. - */ -var toODataString = function (state) { return (Object.keys(state) - .map(function (x) { return rules(x, state); }) - .filter(__WEBPACK_IMPORTED_MODULE_0__utils__["e" /* isNotNullOrEmptyString */]) - .join('&')); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/sorting/sort-array.operator.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return composeSortDescriptors; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__accessor__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/accessor.js"); - - -var compare = function (a, b) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__utils__["b" /* isBlank */])(a)) { - return a === b ? 0 : -1; - } - if (Object(__WEBPACK_IMPORTED_MODULE_0__utils__["b" /* isBlank */])(b)) { - return 1; - } - if (a.localeCompare) { - return a.localeCompare(b); - } - return a > b ? 1 : (a < b ? -1 : 0); -}; -var compareDesc = function (a, b) { return compare(b, a); }; -var descriptorAsFunc = function (descriptor) { - var prop = Object(__WEBPACK_IMPORTED_MODULE_1__accessor__["a" /* getter */])(descriptor.field, true); - return function (a, b) { return (descriptor.dir === 'asc' ? compare : compareDesc)(prop(a), prop(b)); }; -}; -var initial = function (_a, _b) { return 0; }; -/** - * Converts the `SortDescriptors` into a [`Comparer`]({% slug api_kendo-data-query_comparer %}) - * function that can be used through `Array.sort`. - * - * If multiple descriptors are provided, sorting is applied in a right-to-left order. - * @param {SortDescriptor[]} descriptors - The descriptors which will be converted. - * @returns {Comparer} - The produced function. - * - * @example - * ```ts-no-run - * import { composeSortDescriptors } from '@progress/kendo-data-query'; - * - * const data = [{ name: "Pork" }, { name: "Pepper" }, { name: "Beef" } ]; - * const comparer = composeSortDescriptors([{ field: "name", dir: "asc" }]); - * const result = data.sort(comparer); - * // output: [{ name: "Beef" }, { name: "Pepper" }, { name: "Pork" }]; - * ``` - */ -var composeSortDescriptors = function (descriptors) { return (descriptors - .filter(function (x) { return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(x.dir); }) - .map(function (descriptor) { return descriptorAsFunc(descriptor); }) - .reduce(function (acc, curr) { return function (a, b) { return acc(a, b) || curr(a, b); }; }, initial)); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/sorting/sort.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return sort; }); -var merge = function (data, left, middle, right, compare) { - var leftLength = middle - left; - var rightLength = right - middle; - var temp = []; - for (var idx = 0; idx < leftLength; idx++) { - temp.push(data[left + idx]); - } - var cursor1 = 0; - var cursor2 = middle; - var dest = left; - do { - if (compare(data[cursor2], temp[cursor1]) < 0) { - data[dest++] = data[cursor2++]; - rightLength--; - } - else { - data[dest++] = temp[cursor1++]; - leftLength--; - } - } while (rightLength > 0 && leftLength > 0); - while (leftLength) { - data[dest++] = temp[cursor1++]; - leftLength--; - } - while (rightLength) { - data[dest++] = data[cursor2++]; - rightLength--; - } -}; -/** - * @hidden - */ -var sort = function (data, start, end, compare) { - if (end - start < 2) { - return; - } - var mid = (start + end) >>> 1; // tslint:disable-line:no-bitwise - sort(data, start, mid, compare); - sort(data, mid, end, compare); - merge(data, start, mid, end, compare); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/transducers.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return groupCombinator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return expandAggregates; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return aggregatesCombinator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return concat; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return map; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return filter; }); -/* unused harmony export isTransformerResult */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return take; }); -/* unused harmony export takeWhile */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return skip; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return exec; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__accessor__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/accessor.js"); - - -var valueToString = function (value) { - value = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(value) && value.getTime ? value.getTime() : value; - return value + ""; -}; -/** - * @hidden - */ -var groupCombinator = function (field) { - var prop = Object(__WEBPACK_IMPORTED_MODULE_1__accessor__["a" /* getter */])(field, true); - var position = 0; - return function (agg, value) { - agg[field] = agg[field] || {}; - var groupValue = prop(value); - var key = valueToString(groupValue); - var values = agg[field][key] || { __position: position++, aggregates: {}, items: [], value: groupValue }; - values.items.push(value); - agg[field][key] = values; - return agg; - }; -}; -/** - * @hidden - */ -var expandAggregates = function (result) { - if (result === void 0) { result = {}; } - Object.keys(result).forEach(function (field) { - var aggregates = result[field]; - Object.keys(aggregates).forEach(function (aggregate) { - aggregates[aggregate] = aggregates[aggregate].result(); - }); - }); - return result; -}; -var aggregatesFuncs = function (name) { return ({ - average: function () { - var value = 0; - var count = 0; - return { - calc: function (curr) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__utils__["f" /* isNumeric */])(curr)) { - value += curr; - count++; - } - else { - value = curr; - } - }, - result: function () { return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["f" /* isNumeric */])(value) ? value / count : value; } - }; - }, - count: function () { - var state = 0; - return { - calc: function () { return state++; }, - result: function () { return state; } - }; - }, - max: function () { - var state = Number.NEGATIVE_INFINITY; - return { - calc: function (value) { - state = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["f" /* isNumeric */])(state) || Object(__WEBPACK_IMPORTED_MODULE_0__utils__["c" /* isDate */])(state) ? state : value; - if (state < value && (Object(__WEBPACK_IMPORTED_MODULE_0__utils__["f" /* isNumeric */])(value) || Object(__WEBPACK_IMPORTED_MODULE_0__utils__["c" /* isDate */])(value))) { - state = value; - } - }, - result: function () { return state; } - }; - }, - min: function () { - var state = Number.POSITIVE_INFINITY; - return { - calc: function (value) { - state = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["f" /* isNumeric */])(state) || Object(__WEBPACK_IMPORTED_MODULE_0__utils__["c" /* isDate */])(state) ? state : value; - if (state > value && (Object(__WEBPACK_IMPORTED_MODULE_0__utils__["f" /* isNumeric */])(value) || Object(__WEBPACK_IMPORTED_MODULE_0__utils__["c" /* isDate */])(value))) { - state = value; - } - }, - result: function () { return state; } - }; - }, - sum: function () { - var state = 0; - return { - calc: function (value) { return state += value; }, - result: function () { return state; } - }; - } -}[name]()); }; -/** - * @hidden - */ -var aggregatesCombinator = function (descriptors) { - var functions = descriptors.map(function (descriptor) { - var fieldAccessor = Object(__WEBPACK_IMPORTED_MODULE_1__accessor__["a" /* getter */])(descriptor.field, true); - var aggregateName = (descriptor.aggregate || "").toLowerCase(); - var aggregateAccessor = Object(__WEBPACK_IMPORTED_MODULE_1__accessor__["a" /* getter */])(aggregateName, true); - return function (state, value) { - var fieldAggregates = fieldAccessor(state) || {}; - var aggregateFunction = aggregateAccessor(fieldAggregates) - || aggregatesFuncs(aggregateName); - aggregateFunction.calc(fieldAccessor(value)); - fieldAggregates[descriptor.aggregate] = aggregateFunction; - state[descriptor.field] = fieldAggregates; - return state; - }; - }); - return function (state, value) { return functions.reduce(function (agg, calc) { return calc(agg, value); }, state); }; -}; -/** - * @hidden - * Adds the value to the `arr` and produces a new array. - * - * > The original array will be modified. - */ -var concat = function (arr, value) { - arr.push(value); - return arr; -}; -/** - * @hidden - * Returns a reducer that will apply the specified transformation to the value. - */ -var map = function (transform) { return (function (reduce) { return (function (acc, curr, index) { return reduce(acc, transform(curr, index)); }); }); }; -/** - * @hidden - * Returns a reducer that will filter out items which do not match the `Predicate`. - */ -var filter = function (predicate) { return (function (reduce) { return (function (acc, curr) { return predicate(curr) ? reduce(acc, curr) : acc; }); }); }; -/** - * @hidden - */ -var isTransformerResult = function (source) { - return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["g" /* isPresent */])(source.__value); -}; -var reduced = function (x) { - if (isTransformerResult(x)) { - return x; - } - return { - __value: x, - reduced: true - }; -}; -/** - * @hidden - * Returns a reducer that will take the specified number of items. - */ -var take = function (count) { return (function (reduce) { return (function (acc, curr) { return count-- > 0 ? reduce(acc, curr) : reduced(acc); }); }); }; -/** - * @hidden - * Returns a reducer that will take the specified number of items. - */ -var takeWhile = function (predicate) { return (function (reduce) { return (function (acc, curr) { return predicate(curr) ? reduce(acc, curr) : reduced(acc); }); }); }; -/** - * @hidden - * Returns a reducer that will skip the specified number of items. - */ -var skip = function (count) { return (function (reduce) { return (function (acc, curr) { return count-- <= 0 ? reduce(acc, curr) : acc; }); }); }; -/** - * @hidden - * Transforms the data by applying the supplied transformer. - */ -var exec = function (transform, initialValue, data) { - var result = initialValue; - for (var idx = 0, length_1 = data.length; idx < length_1; idx++) { - result = transform(result, data[idx], idx); - if (isTransformerResult(result)) { - result = result.__value; - break; - } - } - return result; -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-data-query/dist/es/utils.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return isPresent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isBlank; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isFunction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return isString; }); -/* unused harmony export isTruthy */ -/* unused harmony export isNullOrEmptyString */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isNotNullOrEmptyString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isNumeric; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isDate; }); -/** - * @hidden - */ -var isPresent = function (value) { return value !== null && value !== undefined; }; -/** - * @hidden - */ -var isBlank = function (value) { return value === null || value === undefined; }; -/** - * @hidden - */ -var isArray = function (value) { return Array.isArray(value); }; -/** - * @hidden - */ -var isFunction = function (value) { return typeof value === 'function'; }; -/** - * @hidden - */ -var isString = function (value) { return typeof value === 'string'; }; -/** - * @hidden - */ -var isTruthy = function (value) { return !!value; }; -/** - * @hidden - */ -var isNullOrEmptyString = function (value) { return isBlank(value) || value.trim().length === 0; }; -/** - * @hidden - */ -var isNotNullOrEmptyString = function (value) { return !isNullOrEmptyString(value); }; -/** - * @hidden - */ -var isNumeric = function (value) { return !isNaN(value - parseFloat(value)); }; -/** - * @hidden - */ -var isDate = function (value) { return value && value.getTime; }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/add-centuries.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addCenturies; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__add_years__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/add-years.js"); - -/** - * A function that adds and subtracts centuries from a `Date` object. - * - * @param date - The initial date value. - * @param offset - The number of centuries to add or subtract from the date. - * @returns - A new `Date` instance. - * - * @example - * ```ts-no-run - * addCenturies(new Date(2016, 5, 1), 5); // 2516-6-1 - * addCenturies(new Date(2016, 5, 1), -5); // 1516-6-1 - * ``` - */ -var addCenturies = function (value, offset) { - return Object(__WEBPACK_IMPORTED_MODULE_0__add_years__["a" /* addYears */])(value, 100 * offset); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/add-days.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addDays; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__adjust_dst__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/adjust-dst.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__clone_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/clone-date.js"); - - -/** - * A function that adds and subtracts days from a `Date` object. - * - * @param date - The initial date value. - * @param offset - The number of days to add and subtract from the date. - * @returns - A new `Date` instance. - * - * @example - * ```ts-no-run - * addDays(new Date(2016, 0, 1), 5); // 2016-1-6 - * addDays(new Date(2016, 0, 1), -5); // 2015-12-26 - * ``` - */ -var addDays = function (date, offset) { - var newDate = Object(__WEBPACK_IMPORTED_MODULE_1__clone_date__["a" /* cloneDate */])(date); - newDate.setDate(newDate.getDate() + offset); - return Object(__WEBPACK_IMPORTED_MODULE_0__adjust_dst__["a" /* adjustDST */])(newDate, date.getHours()); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/add-decades.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addDecades; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__add_years__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/add-years.js"); - -/** - * A function that adds and subtracts decades from a `Date` object. - * - * @param date - The initial date value. - * @param offset - The number of decades to add or subtract from the date. - * @returns - A new `Date` instance. - * - * @example - * ```ts-no-run - * addDecades(new Date(2016, 5, 1), 5); // 2066-6-1 - * addDecades(new Date(2016, 5, 1), -5); // 1966-6-1 - * ``` - */ -var addDecades = function (value, offset) { - return Object(__WEBPACK_IMPORTED_MODULE_0__add_years__["a" /* addYears */])(value, 10 * offset); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/add-months.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addMonths; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__adjust_dst__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/adjust-dst.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__clone_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/clone-date.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__last_day_of_month__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/last-day-of-month.js"); - - - -var MONTHS_LENGTH = 12; -var normalize = function (date, expectedMonth) { return (date.getMonth() !== expectedMonth ? Object(__WEBPACK_IMPORTED_MODULE_2__last_day_of_month__["a" /* lastDayOfMonth */])(addMonths(date, -1)) : date //tslint:disable-line:no-use-before-declare -); }; -/** - * A function that adds and subtracts months from a `Date` object. - * - * @param date - The initial date value. - * @param offset - The number of months to add or subtract from the date. - * @returns - A new `Date` instance. - * - * @example - * ```ts-no-run - * addMonths(new Date(2016, 5, 1), 5); // 2016-11-1 - * addMonths(new Date(2016, 5, 1), -5); // 2015-1-1 - * ``` - */ -var addMonths = function (date, offset) { - var newDate = Object(__WEBPACK_IMPORTED_MODULE_1__clone_date__["a" /* cloneDate */])(date); - var diff = (newDate.getMonth() + offset) % MONTHS_LENGTH; - var expectedMonth = (MONTHS_LENGTH + diff) % MONTHS_LENGTH; - newDate.setMonth(newDate.getMonth() + offset); - return normalize(Object(__WEBPACK_IMPORTED_MODULE_0__adjust_dst__["a" /* adjustDST */])(newDate, date.getHours()), expectedMonth); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/add-weeks.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addWeeks; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__add_days__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/add-days.js"); - -/** - * A function that adds and subtracts weeks from a Date object. - * - * @param date - The initial date value. - * @param offset - The number of weeks to add/subtract from the date. - * @returns - A new `Date` instance. - * - * @example - * ```ts-no-run - * addWeeks(new Date(2016, 5, 1), 3); // 2016-6-22 - * addWeeks(new Date(2016, 5, 1), -3); // 2015-5-11 - * ``` - */ -var addWeeks = function (date, offset) { - return Object(__WEBPACK_IMPORTED_MODULE_0__add_days__["a" /* addDays */])(date, offset * 7); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/add-years.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addYears; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__adjust_dst__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/adjust-dst.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__set_year__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/set-year.js"); - - -/** - * A function that adds and subtracts years from a `Date` object. - * - * @param date - The initial date value. - * @param offset - The number of years to add or subtract from the date. - * @returns - A new `Date` instance. - * - * @example - * ```ts-no-run - * addYears(new Date(2016, 5, 1), 5); // 2011-6-1 - * addYears(new Date(2016, 5, 1), -5); // 2021-6-1 - * ``` - */ -var addYears = function (value, offset) { - return Object(__WEBPACK_IMPORTED_MODULE_0__adjust_dst__["a" /* adjustDST */])(Object(__WEBPACK_IMPORTED_MODULE_1__set_year__["a" /* setYear */])(value, value.getFullYear() + offset), value.getHours()); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/adjust-dst.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return adjustDST; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__clone_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/clone-date.js"); - -/** - * @hidden - */ -var adjustDST = function (date, hour) { - var newDate = Object(__WEBPACK_IMPORTED_MODULE_0__clone_date__["a" /* cloneDate */])(date); - if (hour === 0 && newDate.getHours() === 23) { - newDate.setHours(newDate.getHours() + 2); - } - return newDate; -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/clone-date.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cloneDate; }); -/** - * A function that clones the passed date. The parameter could be `null`. - * - * @param date - The initial date value. - * @returns - A new `Date` instance. - * - * @example - * ```ts-no-run - * cloneDate(new Date(2016, 0, 1)); // returns new Date(2016, 0, 1); - * cloneDate(null); // returns null - * ``` - */ -var cloneDate = function (date) { return date ? new Date(date.getTime()) : null; }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/create-date.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createDate; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__adjust_dst__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/adjust-dst.js"); - -/** - * A function which returns a new `Date` instance. - * - * @param year - The year value. - * @param month - The month value. - * @param day - The day value. - * @param hours - The hours value. - * @param minutes - The minutes value. - * @param seconds - The seconds value. - * @param milliseconds - milliseconds value. - * @returns The date instance. - * - * @example - * ```ts-no-run - * createDate(2016, 0, 15); // 2016-01-15 00:00:00 - * createDate(2016, 0, 15, 22, 22, 20); // 2016-01-15 22:22:20 - * ``` - */ -var createDate = function (year, month, day, hours, minutes, seconds, milliseconds) { - if (hours === void 0) { hours = 0; } - if (minutes === void 0) { minutes = 0; } - if (seconds === void 0) { seconds = 0; } - if (milliseconds === void 0) { milliseconds = 0; } - var date = new Date(year, month, day, hours, minutes, seconds, milliseconds); - if (year > -1 && year < 100) { - date.setFullYear(date.getFullYear() - 1900); - } - return Object(__WEBPACK_IMPORTED_MODULE_0__adjust_dst__["a" /* adjustDST */])(date, hours); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/day-of-week.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dayOfWeek; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__direction_enum__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/direction.enum.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__adjust_dst__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/adjust-dst.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__clone_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/clone-date.js"); - - - -/** - * @hidden - * - * A function which returns the next or previous date for a specific week day. - * For example, `Day.Monday`. - * - * @param date - The date to calculate from. - * @param weekDay - The `Day` enum specifying the desired week day. - * @param direction - The `Direction` enum specifying the calculation direction. - * @returns - A `Date` instance. - * - * @example - * ```ts-no-run - * dayOfWeek(new Date(2016, 0, 1), Day.Wednesday, Direction.Forward); // 2016-01-06, Wednesday - * dayOfWeek(new Date(2016, 0, 1), Day.Wednesday, Direction.Backward); // 2015-12-30, Wednesday - * ``` - */ -var dayOfWeek = function (date, weekDay, direction) { - if (direction === void 0) { direction = __WEBPACK_IMPORTED_MODULE_0__direction_enum__["a" /* Direction */].Forward; } - var newDate = Object(__WEBPACK_IMPORTED_MODULE_2__clone_date__["a" /* cloneDate */])(date); - var newDay = ((weekDay - newDate.getDay()) + (7 * direction)) % 7; - newDate.setDate(newDate.getDate() + newDay); - return Object(__WEBPACK_IMPORTED_MODULE_1__adjust_dst__["a" /* adjustDST */])(newDate, date.getHours()); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/day.enum.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Day; }); -/** - * Enumeration which represents the week days. - */ -var Day; -(function (Day) { - /** - * The Sunday value with an underlying `0` number value. - */ - Day[Day["Sunday"] = 0] = "Sunday"; - /** - * The Monday value with an underlying `1` number value. - */ - Day[Day["Monday"] = 1] = "Monday"; - /** - * The Tuesday value with an underlying `2` number value. - */ - Day[Day["Tuesday"] = 2] = "Tuesday"; - /** - * The Wednesday value with an underlying `3` number value. - */ - Day[Day["Wednesday"] = 3] = "Wednesday"; - /** - * The Thursday value with an underlying `4` number value. - */ - Day[Day["Thursday"] = 4] = "Thursday"; - /** - * The Friday value with an underlying `5` number value. - */ - Day[Day["Friday"] = 5] = "Friday"; - /** - * The Saturday value with an underlying `6` number value. - */ - Day[Day["Saturday"] = 6] = "Saturday"; -})(Day || (Day = {})); - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/direction.enum.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Direction; }); -/** - * An enumeration which represents the horizontal direction. - * The `Forward` option moves forward. - * The `Backward` option moves backward. - */ -var Direction; -(function (Direction) { - /** - * The `Forward` value with an underlying `1` number value. - */ - Direction[Direction["Forward"] = 1] = "Forward"; - /** - * The `Backward` value with an underlying `-1` (minus one) number value. - */ - Direction[Direction["Backward"] = -1] = "Backward"; -})(Direction || (Direction = {})); - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/duration-in-centuries.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return durationInCenturies; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__first_decade_of_century__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/first-decade-of-century.js"); - -/** - * A function that calculates duration in centuries between two `Date` objects. - * - * @param start - The start date value. - * @param end - The end date value. - * @returns - The duration in months. - * - * @example - * ```ts-no-run - * durationInCenturies(new Date(2016, 0, 1), new Date(3216, 0, 1)); // 12 - * durationInCenturies(new Date(2016, 6, 1), new Date(2617, 0, 1)); // 6 - * durationInCenturies(new Date(2016, 0, 1), new Date(2016, 0, 1)); // 0 - * ``` - */ -var durationInCenturies = function (start, end) { return ((Object(__WEBPACK_IMPORTED_MODULE_0__first_decade_of_century__["a" /* firstDecadeOfCentury */])(end).getFullYear() - Object(__WEBPACK_IMPORTED_MODULE_0__first_decade_of_century__["a" /* firstDecadeOfCentury */])(start).getFullYear()) / 100); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/duration-in-decades.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return durationInDecades; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__first_year_of_decade__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/first-year-of-decade.js"); - -/** - * A function that calculates duration in decades between two `Date` objects. - * - * @param start - The start date value. - * @param end - The end date value. - * @returns - The duration in months. - * - * @example - * ```ts-no-run - * durationInDecades(new Date(2016, 0, 1), new Date(2136, 0, 1)); // 12 - * durationInDecades(new Date(2016, 0, 1), new Date(2016, 0, 1)); // 0 - * ``` - */ -var durationInDecades = function (start, end) { return ((Object(__WEBPACK_IMPORTED_MODULE_0__first_year_of_decade__["a" /* firstYearOfDecade */])(end).getFullYear() - Object(__WEBPACK_IMPORTED_MODULE_0__first_year_of_decade__["a" /* firstYearOfDecade */])(start).getFullYear()) / 10); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/duration-in-months.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return durationInMonths; }); -/** - * A function that calculates duration in months between two `Date` objects. - * - * @param start - The start date value. - * @param end - The end date value. - * @returns - The duration in months. - * - * @example - * ```ts-no-run - * durationInMonths(new Date(2016, 0, 1), new Date(2017, 0, 1)); // 12 - * durationInMonths(new Date(2016, 6, 1), new Date(2017, 0, 1)); // 6 - * durationInMonths(new Date(2016, 0, 1), new Date(2016, 0, 1)); // 0 - * ``` - */ -var durationInMonths = function (start, end) { return (((end.getFullYear() - start.getFullYear())) * 12 + (end.getMonth() - start.getMonth())); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/duration-in-years.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return durationInYears; }); -/** - * A function that calculates duration in years between two `Date` objects. - * - * @param start - The start date value. - * @param end - The end date value. - * @returns - The duration in years. - * - * @example - * ```ts-no-run - * durationInYears(new Date(2016, 0, 1), new Date(2028, 0, 1)); // 12 - * durationInYears(new Date(2016, 0, 1), new Date(2022, 0, 1)); // 6 - * durationInYears(new Date(2016, 0, 1), new Date(2016, 0, 1)); // 0 - * ``` - */ -var durationInYears = function (start, end) { return (end.getFullYear() - start.getFullYear()); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/first-day-in-week.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export firstDayInWeek */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__clone_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/clone-date.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__day_enum__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/day.enum.js"); - - -/** - * A function which returns the first date of the current week. - * - * @param date - The initial date. - * @param weekStartDay [default: Day.Sunday] - The first day of the week. - * @returns - The first date of the current week. - * - * @example - * ```ts-no-run - * firstDayInWeek(new Date(2016, 0, 15)); // 2016-01-10 - * firstDayInWeek(new Date(2016, 0, 15), Day.Monday); // 2016-01-11 - * ``` - */ -var firstDayInWeek = function (date, weekStartDay) { - if (weekStartDay === void 0) { weekStartDay = __WEBPACK_IMPORTED_MODULE_1__day_enum__["a" /* Day */].Sunday; } - var first = Object(__WEBPACK_IMPORTED_MODULE_0__clone_date__["a" /* cloneDate */])(date); - while (first.getDay() !== weekStartDay) { - first.setDate(first.getDate() - 1); - } - return first; -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/first-day-of-month.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return firstDayOfMonth; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__create_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/create-date.js"); - -/** - * A function which returns the first date of the month. - * - * @param date - The initial date. - * @returns - The first date of the initial date month. - * - * @example - * ```ts-no-run - * firstDayOfMonth(new Date(2016, 0, 15)); // 2016-01-01 - * ``` - */ -var firstDayOfMonth = function (date) { - return Object(__WEBPACK_IMPORTED_MODULE_0__create_date__["a" /* createDate */])(date.getFullYear(), date.getMonth(), 1, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/first-decade-of-century.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return firstDecadeOfCentury; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__normalize_year__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/normalize-year.js"); - -/** - * A function that returns a `Date` object of the first decade in a century. - * - * @param date - The start date value. - * @returns - The first year in a century. - * - * @example - * ```ts-no-run - * firstDecadeOfCentury(new Date(2017, 0, 1)); // 2000-1-1 - * firstDecadeOfCentury(new Date(2007, 10, 22)); // 2000-11-22 - * firstDecadeOfCentury(new Date(2126, 0, 1)); // 2100-1-1 - * ``` - */ -var firstDecadeOfCentury = function (value) { return (Object(__WEBPACK_IMPORTED_MODULE_0__normalize_year__["a" /* normalizeYear */])(value, function (y) { return y - (y % 100); })); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/first-month-of-year.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return firstMonthOfYear; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__set_month__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/set-month.js"); - -/** - * A function that returns a `Date` object of the first month in a year. - * - * @param date - The start date value. - * @returns - The first month in a year. - * - * @example - * ```ts-no-run - * firstMonthOfYear(new Date(2017, 11, 1)); // 2017-1-1 - * firstMonthOfYear(new Date(2017, 0, 1)); // 2017-1-1 - * ``` - */ -var firstMonthOfYear = function (value) { return Object(__WEBPACK_IMPORTED_MODULE_0__set_month__["a" /* setMonth */])(value, 0); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/first-year-of-decade.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return firstYearOfDecade; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__normalize_year__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/normalize-year.js"); - -/** - * A function that returns a `Date` object of the first year in a decade. - * - * @param date - The start date value. - * @returns - The first year in a decade. - * - * @example - * ```ts-no-run - * firstYearOfDecade(new Date(2017, 0, 1)); // 2010-1-1 - * firstYearOfDecade(new Date(2007, 10, 22)); // 2000-11-22 - * firstYearOfDecade(new Date(2026, 0, 1)); // 2020-1-1 - * ``` - */ -var firstYearOfDecade = function (value) { return (Object(__WEBPACK_IMPORTED_MODULE_0__normalize_year__["a" /* normalizeYear */])(value, function (y) { return y - (y % 10); })); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/get-date.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getDate; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__create_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/create-date.js"); - -/** - * A function which returns the passed date with a midnight time portion. - * - * @param date - The initial date. - * @returns - The date with a midnight time portion. - * - * @example - * ```ts-no-run - * getDate(new Date(2016, 0, 15, 14, 30, 30)); // 2016-01-15 00:00:00 - * ``` - */ -var getDate = function (date) { - return Object(__WEBPACK_IMPORTED_MODULE_0__create_date__["a" /* createDate */])(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/is-equal-date.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export isEqualDate */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__get_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/get-date.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_equal__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/is-equal.js"); - - -/** - * A function that compares the date portions of 2 dates. - * - * @param candidate - The candidate date. - * @param expected - The expected date. - * @returns - A Boolean value whether the values are equal. - * - * @example - * ```ts-no-run - * isEqualDate(new Date(2016, 0, 1, 10), new Date(2016, 0, 1, 20)); // true - * isEqualDate(new Date(2016, 0, 1, 10), new Date(2016, 0, 2, 10)); // false - * ``` - */ -var isEqualDate = function (candidate, expected) { - if (!candidate && !expected) { - return true; - } - return candidate && expected && Object(__WEBPACK_IMPORTED_MODULE_1__is_equal__["a" /* isEqual */])(Object(__WEBPACK_IMPORTED_MODULE_0__get_date__["a" /* getDate */])(candidate), Object(__WEBPACK_IMPORTED_MODULE_0__get_date__["a" /* getDate */])(expected)); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/is-equal.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isEqual; }); -/** - * A function that compares two dates. - * The comparison also includes the time portion. - * - * @param candidate - The candidate date. - * @param expected - The expected date. - * @returns - A Boolean value indicating whether the values are equal. - * - * @example - * ```ts-no-run - * isEqual(new Date(2016, 0, 1), new Date(2016, 0, 1)); // true - * isEqual(new Date(2016, 0, 1), new Date(2016, 0, 2)); // false - * isEqual(new Date(2016, 0, 1, 10), new Date(2016, 0, 1, 20)); // false - * ``` - */ -var isEqual = function (candidate, expected) { - if (!candidate && !expected) { - return true; - } - return candidate && expected && candidate.getTime() === expected.getTime(); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/last-day-of-month.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return lastDayOfMonth; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__add_days__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/add-days.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__create_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/create-date.js"); - - -/** - * A function which returns the last date of the month. - * - * @param date - The initial date. - * @returns - The last date of the initial date month. - * - * @example - * ```ts-no-run - * lastDayOfMonth(new Date(2016, 0, 15)); // 2016-01-31 - * ``` - */ -var lastDayOfMonth = function (date) { - var newDate = Object(__WEBPACK_IMPORTED_MODULE_1__create_date__["a" /* createDate */])(date.getFullYear(), date.getMonth() + 1, 1, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()); - return Object(__WEBPACK_IMPORTED_MODULE_0__add_days__["a" /* addDays */])(newDate, -1); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/last-decade-of-century.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return lastDecadeOfCentury; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__normalize_year__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/normalize-year.js"); - -/** - * A function that returns a `Date` object of the last decade in a century. - * - * @param date - The start date value. - * @returns - The last year in a decade. - * - * @example - * ```ts-no-run - * lastDecadeOfCentury(new Date(2017, 0, 1)); // 2090-1-1 - * lastDecadeOfCentury(new Date(2007, 10, 22)); // 2090-11-22 - * lastDecadeOfCentury(new Date(2126, 0, 1)); // 2190-1-1 - * ``` - */ -var lastDecadeOfCentury = function (value) { return (Object(__WEBPACK_IMPORTED_MODULE_0__normalize_year__["a" /* normalizeYear */])(value, function (y) { return y - (y % 100) + 90; })); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/last-month-of-year.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return lastMonthOfYear; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__set_month__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/set-month.js"); - -/** - * A function that returns a `Date` object of the last month in a year. - * - * @param date - The start date value. - * @returns - The last month in a year. - * - * @example - * ```ts-no-run - * lastMonthOfYear(new Date(2017, 5, 3)); // 2017-12-3 - * lastMonthOfYear(new Date(2017, 11, 3)); // 2017-12-3 - * ``` - */ -var lastMonthOfYear = function (value) { return Object(__WEBPACK_IMPORTED_MODULE_0__set_month__["a" /* setMonth */])(value, 11); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/last-year-of-decade.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return lastYearOfDecade; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__normalize_year__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/normalize-year.js"); - -/** - * A function that returns a `Date` object of the last year in a decade. - * - * @param date - The start date value. - * @returns - The last year in a decade. - * - * @example - * ```ts-no-run - * lastYearOfDecade(new Date(2017, 0, 1)); // 2019-1-1 - * lastYearOfDecade(new Date(2007, 10, 22)); // 2009-11-22 - * lastYearOfDecade(new Date(2026, 0, 1)); // 2029-1-1 - * ``` - */ -var lastYearOfDecade = function (value) { return (Object(__WEBPACK_IMPORTED_MODULE_0__normalize_year__["a" /* normalizeYear */])(value, function (y) { return y - (y % 10) + 9; })); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/main.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__add_days__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/add-days.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__add_days__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__add_months__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/add-months.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_1__add_months__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__add_weeks__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/add-weeks.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_2__add_weeks__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__add_years__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/add-years.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_3__add_years__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__add_decades__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/add-decades.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__add_decades__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__add_centuries__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/add-centuries.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_5__add_centuries__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__adjust_dst__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/adjust-dst.js"); -/* unused harmony namespace reexport */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__clone_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/clone-date.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_7__clone_date__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__create_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/create-date.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_8__create_date__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__day_of_week__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/day-of-week.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_9__day_of_week__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__day_enum__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/day.enum.js"); -/* unused harmony namespace reexport */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__direction_enum__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/direction.enum.js"); -/* unused harmony namespace reexport */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__duration_in_months__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/duration-in-months.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_12__duration_in_months__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__duration_in_years__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/duration-in-years.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_13__duration_in_years__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__duration_in_decades__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/duration-in-decades.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_14__duration_in_decades__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__duration_in_centuries__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/duration-in-centuries.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_15__duration_in_centuries__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__next_day_of_week__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/next-day-of-week.js"); -/* unused harmony namespace reexport */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__prev_day_of_week__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/prev-day-of-week.js"); -/* unused harmony namespace reexport */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__get_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/get-date.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_18__get_date__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__first_day_in_week__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/first-day-in-week.js"); -/* unused harmony namespace reexport */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__first_day_of_month__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/first-day-of-month.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_20__first_day_of_month__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__first_month_of_year__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/first-month-of-year.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_21__first_month_of_year__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__first_year_of_decade__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/first-year-of-decade.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_22__first_year_of_decade__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__first_decade_of_century__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/first-decade-of-century.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_23__first_decade_of_century__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__is_equal__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/is-equal.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_24__is_equal__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__is_equal_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/is-equal-date.js"); -/* unused harmony namespace reexport */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__last_day_of_month__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/last-day-of-month.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_26__last_day_of_month__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__last_month_of_year__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/last-month-of-year.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_27__last_month_of_year__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__last_year_of_decade__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/last-year-of-decade.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_28__last_year_of_decade__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__last_decade_of_century__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/last-decade-of-century.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_29__last_decade_of_century__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__ms_per_day__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/ms-per-day.js"); -/* unused harmony namespace reexport */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__week_in_year__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/week-in-year.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_31__week_in_year__["a"]; }); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/ms-per-day.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MS_PER_DAY; }); -/** - * The duration of the day in milliseconds. - */ -var MS_PER_DAY = 86400000; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/next-day-of-week.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export nextDayOfWeek */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__direction_enum__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/direction.enum.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__day_of_week__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/day-of-week.js"); - - -/** - * A function which returns a date by a specific week name. - * For example, `Day.Monday`. - * - * @param date - The date to calculate from. - * @param weekDay - The `Day` enum specifying the desired week day. - * @returns - A `Date` instance. - * - * @example - * ```ts-no-run - * nextDayOfWeek(new Date(2016, 0, 1), Day.Wednesday); // 2016-01-06, Wednesday - * ``` - */ -var nextDayOfWeek = function (date, weekDay) { - return Object(__WEBPACK_IMPORTED_MODULE_1__day_of_week__["a" /* dayOfWeek */])(date, weekDay, __WEBPACK_IMPORTED_MODULE_0__direction_enum__["a" /* Direction */].Forward); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/normalize-year.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeYear; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__set_year__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/set-year.js"); - -/** - * @hidden - */ -var normalizeYear = function (value, year) { return (Object(__WEBPACK_IMPORTED_MODULE_0__set_year__["a" /* setYear */])(value, year(value.getFullYear()))); }; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/prev-day-of-week.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return prevDayOfWeek; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__direction_enum__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/direction.enum.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__day_of_week__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/day-of-week.js"); - - -/** - * A function which returns a date by a specific week name. - * For example, `Day.Monday`. - * - * @param date - The date to calculate from. - * @param weekDay - The `Day` enum specifying the desired week day. - * @returns - A `Date` instance. - * - * @example - * ```ts-no-run - * prevDayOfWeek(new Date(2016, 0, 1), Day.Wednesday); // 2015-12-30, Wednesday - * ``` - */ -var prevDayOfWeek = function (date, weekDay) { - return Object(__WEBPACK_IMPORTED_MODULE_1__day_of_week__["a" /* dayOfWeek */])(date, weekDay, __WEBPACK_IMPORTED_MODULE_0__direction_enum__["a" /* Direction */].Backward); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/set-month.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return setMonth; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__add_months__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/add-months.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__create_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/create-date.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__last_day_of_month__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/last-day-of-month.js"); - - - -/** - * @hidden - */ -var setMonth = function (value, month) { - var day = value.getDate(); - var candidate = Object(__WEBPACK_IMPORTED_MODULE_1__create_date__["a" /* createDate */])(value.getFullYear(), month, day, value.getHours(), value.getMinutes(), value.getSeconds(), value.getMilliseconds()); - return candidate.getDate() === day ? candidate : Object(__WEBPACK_IMPORTED_MODULE_2__last_day_of_month__["a" /* lastDayOfMonth */])(Object(__WEBPACK_IMPORTED_MODULE_0__add_months__["a" /* addMonths */])(candidate, -1)); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/set-year.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return setYear; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__add_months__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/add-months.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__create_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/create-date.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__last_day_of_month__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/last-day-of-month.js"); - - - -/** - * @hidden - */ -var setYear = function (value, year) { - var month = value.getMonth(); - var candidate = Object(__WEBPACK_IMPORTED_MODULE_1__create_date__["a" /* createDate */])(year, month, value.getDate(), value.getHours(), value.getMinutes(), value.getSeconds(), value.getMilliseconds()); - return candidate.getMonth() === month ? candidate : Object(__WEBPACK_IMPORTED_MODULE_2__last_day_of_month__["a" /* lastDayOfMonth */])(Object(__WEBPACK_IMPORTED_MODULE_0__add_months__["a" /* addMonths */])(candidate, -1)); -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-date-math/dist/es/week-in-year.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return weekInYear; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__day_enum__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/day.enum.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__add_days__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/add-days.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__create_date__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/create-date.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__prev_day_of_week__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/prev-day-of-week.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ms_per_day__ = __webpack_require__("../../../../@progress/kendo-date-math/dist/es/ms-per-day.js"); - - - - - -var moveDateToWeekStart = function (date, weekStartDay) { - if (weekStartDay !== __WEBPACK_IMPORTED_MODULE_0__day_enum__["a" /* Day */].Monday) { - return Object(__WEBPACK_IMPORTED_MODULE_1__add_days__["a" /* addDays */])(Object(__WEBPACK_IMPORTED_MODULE_3__prev_day_of_week__["a" /* prevDayOfWeek */])(date, weekStartDay), 4); - } - return Object(__WEBPACK_IMPORTED_MODULE_1__add_days__["a" /* addDays */])(date, (4 - (date.getDay() || 7))); -}; -var calcWeekInYear = function (date, weekStartDay) { - var firstWeekInYear = Object(__WEBPACK_IMPORTED_MODULE_2__create_date__["a" /* createDate */])(date.getFullYear(), 0, 1, -6); - var newDate = moveDateToWeekStart(date, weekStartDay); - var diffInMS = newDate.getTime() - firstWeekInYear.getTime(); - var days = Math.floor(diffInMS / __WEBPACK_IMPORTED_MODULE_4__ms_per_day__["a" /* MS_PER_DAY */]); - return 1 + Math.floor(days / 7); -}; -/** - * A function that returns the number of the week within a year, which is calculated in relation to the date. - * - * For more information, refer to the [**ISO week date**](https://en.wikipedia.org/wiki/ISO_week_date) article. - * - * @param date - The date used for the week number calculation. - * @param weekStartDay - The first day of the week. By default, the first week day is Monday. - * @returns - The number of the week within the year. - * - * @example - * ```ts-no-run - * weekInYear(new Date(2016, 0, 1)); // Week 53, 2015 - * weekInYear(new Date(2016, 0, 5)); // Week 1, 2016 - * weekInYear(new Date(2017, 0, 1)); // Week 52, 2016 - * weekInYear(new Date(2017, 0, 2)); // Week 1, 2017 - * ``` - */ -var weekInYear = function (date, weekStartDay) { - if (weekStartDay === void 0) { weekStartDay = __WEBPACK_IMPORTED_MODULE_0__day_enum__["a" /* Day */].Monday; } - var prevWeekDate = Object(__WEBPACK_IMPORTED_MODULE_1__add_days__["a" /* addDays */])(date, -7); - var nextWeekDate = Object(__WEBPACK_IMPORTED_MODULE_1__add_days__["a" /* addDays */])(date, 7); - var weekNumber = calcWeekInYear(date, weekStartDay); - if (weekNumber === 0) { - return calcWeekInYear(prevWeekDate, weekStartDay) + 1; - } - if (weekNumber === 53 && calcWeekInYear(nextWeekDate, weekStartDay) > 1) { - return 1; - } - return weekNumber; -}; - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/accessors/define-accessors.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = defineAccessors; -function setAccessor(field) { - return function(value) { - if (this[field] !== value) { - this[field] = value; - this.geometryChange(); - } - - return this; - }; -} - -function getAccessor(field) { - return function() { - return this[field]; - }; -} - -function defineAccessors(fn, fields) { - for (var i = 0; i < fields.length; i++) { - var name = fields[i]; - var capitalized = name.charAt(0).toUpperCase() + - name.substring(1, name.length); - - fn["set" + capitalized] = setAccessor(name); - fn["get" + capitalized] = getAccessor(name); - } -} -//# sourceMappingURL=define-accessors.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/accessors/define-geometry-accessors.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = defineGeometryAccessors; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - -function geometryAccessor(name) { - var fieldName = "_" + name; - return function(value) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__util__["defined"])(value)) { - this._observerField(fieldName, value); - this.geometryChange(); - return this; - } - - return this[fieldName]; - }; -} - -function defineGeometryAccessors(fn, names) { - for (var i = 0; i < names.length; i++) { - fn[names[i]] = geometryAccessor(names[i]); - } -} -//# sourceMappingURL=define-geometry-accessors.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/accessors/define-options-accessors.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = defineOptionsAccessors; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - -function optionsAccessor(name) { - return function(value) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__util__["defined"])(value)) { - this.options.set(name, value); - return this; - } - - return this.options.get(name); - }; -} - -function defineOptionsAccessors(fn, names) { - for (var i = 0; i < names.length; i++) { - fn[names[i]] = optionsAccessor(names[i]); - } -} -//# sourceMappingURL=define-options-accessors.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/accessors/define-point-accessors.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = definePointAccessors; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); - - - -function pointAccessor(name) { - var fieldName = "_" + name; - return function(value) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__util__["defined"])(value)) { - this._observerField(fieldName, __WEBPACK_IMPORTED_MODULE_1__geometry_point__["a" /* default */].create(value)); - this.geometryChange(); - return this; - } - - return this[fieldName]; - }; -} - -function definePointAccessors(fn, names) { - for (var i = 0; i < names.length; i++) { - fn[names[i]] = pointAccessor(names[i]); - } -} -//# sourceMappingURL=define-point-accessors.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__alignment_align__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/align.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__alignment_align__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__alignment_v_align__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/v-align.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_1__alignment_v_align__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__alignment_stack__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/stack.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__alignment_stack__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__alignment_v_stack__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/v-stack.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_3__alignment_v_stack__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__alignment_wrap__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/wrap.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_4__alignment_wrap__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__alignment_v_wrap__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/v-wrap.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_5__alignment_v_wrap__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__alignment_fit__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/fit.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_6__alignment_fit__["a"]; }); - - - - - - - -//# sourceMappingURL=alignment.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/align-elements.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = alignElements; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__translate_to_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/translate-to-point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__align_start__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/align-start.js"); - - - -function alignElements(elements, rect, alignment, axis, sizeField) { - for (var idx = 0; idx < elements.length; idx++) { - var bbox = elements[idx].clippedBBox(); - if (bbox) { - var point = bbox.origin.clone(); - point[axis] = Object(__WEBPACK_IMPORTED_MODULE_1__align_start__["a" /* default */])(bbox.size[sizeField], rect, alignment || "start", axis, sizeField); - Object(__WEBPACK_IMPORTED_MODULE_0__translate_to_point__["a" /* default */])(point, bbox, elements[idx]); - } - } -} -//# sourceMappingURL=align-elements.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/align-start-reverse.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = alignStartReverse; - -function alignStartReverse(size, rect, align, axis, sizeField) { - var start; - if (align === "start") { - start = rect.origin[axis] + rect.size[sizeField] - size; - } else if (align === "end") { - start = rect.origin[axis]; - } else { - start = rect.origin[axis] + (rect.size[sizeField] - size) / 2; - } - - return start; -} -//# sourceMappingURL=align-start-reverse.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/align-start.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = alignStart; - -function alignStart(size, rect, align, axis, sizeField) { - var start; - if (align === "start") { - start = rect.origin[axis]; - } else if (align === "end") { - start = rect.origin[axis] + rect.size[sizeField] - size; - } else { - start = rect.origin[axis] + (rect.size[sizeField] - size) / 2; - } - - return start; -} -//# sourceMappingURL=align-start.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/align.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = align; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__align_elements__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/align-elements.js"); - - - -function align(elements, rect, alignment) { - Object(__WEBPACK_IMPORTED_MODULE_0__align_elements__["a" /* default */])(elements, rect, alignment, "x", "width"); -} -//# sourceMappingURL=align.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/create-stack-elements.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = createStackElements; -function createStackElements(elements) { - var stackElements = []; - - for (var idx = 0; idx < elements.length; idx++) { - var element = elements[idx]; - var bbox = element.clippedBBox(); - if (bbox) { - stackElements.push({ - element: element, - bbox: bbox - }); - } - } - - return stackElements; -} -//# sourceMappingURL=create-stack-elements.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/fit.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = fit; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry_transform__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/transform.js"); - - -function fit(element, rect) { - var bbox = element.clippedBBox(); - if (bbox) { - var elementSize = bbox.size; - var rectSize = rect.size; - if (rectSize.width < elementSize.width || rectSize.height < elementSize.height) { - var scale = Math.min(rectSize.width / elementSize.width, rectSize.height / elementSize.height); - var transform = element.transform() || Object(__WEBPACK_IMPORTED_MODULE_0__geometry_transform__["a" /* default */])(); - transform.scale(scale, scale); - element.transform(transform); - } - } -} -//# sourceMappingURL=fit.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/stack-elements.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = stackElements; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__translate_to_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/translate-to-point.js"); - - - -function stackElements(elements, stackAxis, otherAxis, sizeField) { - if (elements.length > 1) { - var origin = new __WEBPACK_IMPORTED_MODULE_0__geometry_point__["a" /* default */](); - var previousBBox = elements[0].bbox; - - for (var idx = 1; idx < elements.length; idx++) { - var element = elements[idx].element; - var bbox = elements[idx].bbox; - origin[stackAxis] = previousBBox.origin[stackAxis] + previousBBox.size[sizeField]; - origin[otherAxis] = bbox.origin[otherAxis]; - Object(__WEBPACK_IMPORTED_MODULE_1__translate_to_point__["a" /* default */])(origin, bbox, element); - bbox.origin[stackAxis] = origin[stackAxis]; - previousBBox = bbox; - } - } -} -//# sourceMappingURL=stack-elements.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/stack.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = stack; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__stack_elements__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/stack-elements.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__create_stack_elements__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/create-stack-elements.js"); - - - -function stack(elements) { - Object(__WEBPACK_IMPORTED_MODULE_0__stack_elements__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__create_stack_elements__["a" /* default */])(elements), "x", "y", "width"); -} -//# sourceMappingURL=stack.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/translate-to-point.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = translateToPoint; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry_transform__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/transform.js"); - - -function translateToPoint(point, bbox, element) { - var transofrm = element.transform() || Object(__WEBPACK_IMPORTED_MODULE_0__geometry_transform__["a" /* default */])(); - var matrix = transofrm.matrix(); - matrix.e += point.x - bbox.origin.x; - matrix.f += point.y - bbox.origin.y; - - transofrm.matrix(matrix); - element.transform(transofrm); -} -//# sourceMappingURL=translate-to-point.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/v-align.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = vAlign; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__align_elements__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/align-elements.js"); - - -function vAlign(elements, rect, alignment) { - Object(__WEBPACK_IMPORTED_MODULE_0__align_elements__["a" /* default */])(elements, rect, alignment, "y", "height"); -} -//# sourceMappingURL=v-align.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/v-stack.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = vStack; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__stack_elements__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/stack-elements.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__create_stack_elements__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/create-stack-elements.js"); - - - -function vStack(elements) { - Object(__WEBPACK_IMPORTED_MODULE_0__stack_elements__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__create_stack_elements__["a" /* default */])(elements), "y", "x", "height"); -} -//# sourceMappingURL=v-stack.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/v-wrap.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = vWrap; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wrap_elements__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/wrap-elements.js"); - - -function vWrap(elements, rect) { - return Object(__WEBPACK_IMPORTED_MODULE_0__wrap_elements__["a" /* default */])(elements, rect, "y", "x", "height"); -} -//# sourceMappingURL=v-wrap.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/wrap-elements.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = wrapElements; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__translate_to_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/translate-to-point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stack_elements__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/stack-elements.js"); - - - -function getStacks(elements, rect, sizeField) { - var maxSize = rect.size[sizeField]; - var stacks = []; - var stack = []; - var stackSize = 0; - var element, bbox; - - var addElementToStack = function() { - stack.push({ - element: element, - bbox: bbox - }); - }; - - for (var idx = 0; idx < elements.length; idx++) { - element = elements[idx]; - - bbox = element.clippedBBox(); - if (bbox) { - var size = bbox.size[sizeField]; - if (stackSize + size > maxSize) { - if (stack.length) { - stacks.push(stack); - stack = []; - addElementToStack(); - stackSize = size; - } else { - addElementToStack(); - stacks.push(stack); - stack = []; - stackSize = 0; - } - } else { - addElementToStack(); - stackSize += size; - } - } - } - - if (stack.length) { - stacks.push(stack); - } - - return stacks; -} - -function wrapElements(elements, rect, axis, otherAxis, sizeField) { - var stacks = getStacks(elements, rect, sizeField); - var origin = rect.origin.clone(); - var result = []; - - for (var idx = 0; idx < stacks.length; idx++) { - var stack = stacks[idx]; - var startElement = stack[0]; - origin[otherAxis] = startElement.bbox.origin[otherAxis]; - Object(__WEBPACK_IMPORTED_MODULE_0__translate_to_point__["a" /* default */])(origin, startElement.bbox, startElement.element); - startElement.bbox.origin[axis] = origin[axis]; - Object(__WEBPACK_IMPORTED_MODULE_1__stack_elements__["a" /* default */])(stack, axis, otherAxis, sizeField); - result.push([]); - for (var elementIdx = 0; elementIdx < stack.length; elementIdx++) { - result[idx].push(stack[elementIdx].element); - } - } - return result; -} -//# sourceMappingURL=wrap-elements.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/alignment/wrap.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = wrap; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wrap_elements__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/wrap-elements.js"); - - -function wrap(elements, rect) { - return Object(__WEBPACK_IMPORTED_MODULE_0__wrap_elements__["a" /* default */])(elements, rect, "x", "y", "width"); -} -//# sourceMappingURL=wrap.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/animations.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__animations_animation__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/animations/animation.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__animations_animation__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__animations_animation_factory__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/animations/animation-factory.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__animations_animation_factory__["a"]; }); - - -//# sourceMappingURL=animations.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/animations/animation-factory.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__animation__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/animations/animation.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); - - - -var AnimationFactory = (function (Class) { - function AnimationFactory() { - Class.call(this); - - this._items = []; - } - - if ( Class ) AnimationFactory.__proto__ = Class; - AnimationFactory.prototype = Object.create( Class && Class.prototype ); - AnimationFactory.prototype.constructor = AnimationFactory; - - AnimationFactory.prototype.register = function register (name, type) { - this._items.push({ - name: name, - type: type - }); - }; - - AnimationFactory.prototype.create = function create (element, options) { - var items = this._items; - var match; - - if (options && options.type) { - var type = options.type.toLowerCase(); - for (var i = 0; i < items.length; i++) { - if (items[i].name.toLowerCase() === type) { - match = items[i]; - break; - } - } - } - - if (match) { - return new match.type(element, options); - } - }; - - return AnimationFactory; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -AnimationFactory.current = new AnimationFactory(); - -__WEBPACK_IMPORTED_MODULE_0__animation__["a" /* default */].create = function(type, element, options) { - return AnimationFactory.current.create(type, element, options); -}; - -/* harmony default export */ __webpack_exports__["a"] = (AnimationFactory); -//# sourceMappingURL=animation-factory.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/animations/animation.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__easing_functions__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/animations/easing-functions.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); - - - - -var now = Date.now || function() { - return new Date().getTime(); -}; - -var Animation = (function (Class) { - function Animation(element, options) { - Class.call(this); - - this.options = Object.assign({}, this.options, options); - this.element = element; - } - - if ( Class ) Animation.__proto__ = Class; - Animation.prototype = Object.create( Class && Class.prototype ); - Animation.prototype.constructor = Animation; - - Animation.prototype.setup = function setup () {}; - Animation.prototype.step = function step () {}; - - Animation.prototype.play = function play () { - var this$1 = this; - - var options = this.options; - var duration = options.duration; - var delay = options.delay; if ( delay === void 0 ) delay = 0; - var easing = __WEBPACK_IMPORTED_MODULE_0__easing_functions__[options.easing]; - var start = now() + delay; - var finish = start + duration; - - if (duration === 0) { - this.step(1); - this.abort(); - } else { - setTimeout(function () { - var loop = function () { - if (this$1._stopped) { - return; - } - - var wallTime = now(); - - var time = Object(__WEBPACK_IMPORTED_MODULE_1__util__["limitValue"])(wallTime - start, 0, duration); - var position = time / duration; - var easingPosition = easing(position, time, 0, 1, duration); - - this$1.step(easingPosition); - - if (wallTime < finish) { - Object(__WEBPACK_IMPORTED_MODULE_2__common__["d" /* animationFrame */])(loop); - } else { - this$1.abort(); - } - }; - - loop(); - }, delay); - } - }; - - Animation.prototype.abort = function abort () { - this._stopped = true; - }; - - Animation.prototype.destroy = function destroy () { - this.abort(); - }; - - return Animation; -}(__WEBPACK_IMPORTED_MODULE_2__common__["a" /* Class */])); - -Animation.prototype.options = { - duration: 500, - easing: "swing" -}; - -/* harmony default export */ __webpack_exports__["a"] = (Animation); -//# sourceMappingURL=animation.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/animations/easing-functions.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony export (immutable) */ __webpack_exports__["swing"] = swing; -/* harmony export (immutable) */ __webpack_exports__["linear"] = linear; -/* harmony export (immutable) */ __webpack_exports__["easeOutElastic"] = easeOutElastic; -function swing(position) { - return 0.5 - Math.cos(position * Math.PI) / 2; -} - -function linear(position) { - return position; -} - -function easeOutElastic(position, time, start, diff) { - var s = 1.70158, - p = 0, - a = diff; - - if (position === 0) { - return start; - } - - if (position === 1) { - return start + diff; - } - - if (!p) { - p = 0.5; - } - - if (a < Math.abs(diff)) { - a = diff; - s = p / 4; - } else { - s = p / (2 * Math.PI) * Math.asin(diff / a); - } - - return a * Math.pow(2, -10 * position) * - Math.sin((Number(position) - s) * (1.1 * Math.PI) / p) + diff + start; -} - -//# sourceMappingURL=easing-functions.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__canvas_surface__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/surface.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Surface", function() { return __WEBPACK_IMPORTED_MODULE_0__canvas_surface__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__canvas_root_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/root-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "RootNode", function() { return __WEBPACK_IMPORTED_MODULE_1__canvas_root_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__canvas_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Node", function() { return __WEBPACK_IMPORTED_MODULE_2__canvas_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__canvas_group_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/group-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "GroupNode", function() { return __WEBPACK_IMPORTED_MODULE_3__canvas_group_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__canvas_arc_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/arc-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ArcNode", function() { return __WEBPACK_IMPORTED_MODULE_4__canvas_arc_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__canvas_circle_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/circle-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "CircleNode", function() { return __WEBPACK_IMPORTED_MODULE_5__canvas_circle_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__canvas_rect_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/rect-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "RectNode", function() { return __WEBPACK_IMPORTED_MODULE_6__canvas_rect_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__canvas_image_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/image-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ImageNode", function() { return __WEBPACK_IMPORTED_MODULE_7__canvas_image_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__canvas_text_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/text-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TextNode", function() { return __WEBPACK_IMPORTED_MODULE_8__canvas_text_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__canvas_path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/path-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "PathNode", function() { return __WEBPACK_IMPORTED_MODULE_9__canvas_path_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__canvas_multi_path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/multi-path-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MultiPathNode", function() { return __WEBPACK_IMPORTED_MODULE_10__canvas_multi_path_node__["a"]; }); - - - - - - - - - - - - -//# sourceMappingURL=canvas.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/arc-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/path-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/node-map.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_render_path__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/utils/render-path.js"); - - - - -var ArcNode = (function (PathNode) { - function ArcNode () { - PathNode.apply(this, arguments); - } - - if ( PathNode ) ArcNode.__proto__ = PathNode; - ArcNode.prototype = Object.create( PathNode && PathNode.prototype ); - ArcNode.prototype.constructor = ArcNode; - - ArcNode.prototype.renderPoints = function renderPoints (ctx) { - var path = this.srcElement.toPath(); - Object(__WEBPACK_IMPORTED_MODULE_2__utils_render_path__["a" /* default */])(ctx, path); - }; - - return ArcNode; -}(__WEBPACK_IMPORTED_MODULE_0__path_node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_1__node_map__["a" /* default */].Arc = ArcNode; - -/* harmony default export */ __webpack_exports__["a"] = (ArcNode); -//# sourceMappingURL=arc-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/circle-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/path-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/node-map.js"); - - - -var CircleNode = (function (PathNode) { - function CircleNode () { - PathNode.apply(this, arguments); - } - - if ( PathNode ) CircleNode.__proto__ = PathNode; - CircleNode.prototype = Object.create( PathNode && PathNode.prototype ); - CircleNode.prototype.constructor = CircleNode; - - CircleNode.prototype.renderPoints = function renderPoints (ctx) { - var ref = this.srcElement.geometry(); - var center = ref.center; - var radius = ref.radius; - - ctx.arc(center.x, center.y, radius, 0, Math.PI * 2); - }; - - return CircleNode; -}(__WEBPACK_IMPORTED_MODULE_0__path_node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_1__node_map__["a" /* default */].Circle = CircleNode; - -/* harmony default export */ __webpack_exports__["a"] = (CircleNode); -//# sourceMappingURL=circle-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/export-image.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = exportImage; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__surface__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/surface.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__shapes_group__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/group.js"); - - - - -function exportImage(group, options) { - var defaults = { - width: "800px", height: "600px", - cors: "Anonymous" - }; - - var exportRoot = group; - var bbox = group.clippedBBox(); - - - if (bbox) { - var origin = bbox.getOrigin(); - exportRoot = new __WEBPACK_IMPORTED_MODULE_2__shapes_group__["a" /* default */](); - exportRoot.transform(Object(__WEBPACK_IMPORTED_MODULE_1__geometry__["transform"])().translate(-origin.x, -origin.y)); - exportRoot.children.push(group); - - var size = bbox.getSize(); - defaults.width = size.width + "px"; - defaults.height = size.height + "px"; - } - - var surfaceOptions = Object.assign(defaults, options); - - var container = document.createElement("div"); - var style = container.style; - - style.display = "none"; - style.width = surfaceOptions.width; - style.height = surfaceOptions.height; - document.body.appendChild(container); - - var surface = new __WEBPACK_IMPORTED_MODULE_0__surface__["a" /* default */](container, surfaceOptions); - surface.suspendTracking(); - surface.draw(exportRoot); - - var promise = surface.image(); - var destroy = function () { - surface.destroy(); - document.body.removeChild(container); - }; - promise.then(destroy, destroy); - - return promise; -} -//# sourceMappingURL=export-image.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/group-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_traversable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/traversable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/node-map.js"); - - - - -var GroupNode = (function (Node) { - function GroupNode () { - Node.apply(this, arguments); - } - - if ( Node ) GroupNode.__proto__ = Node; - GroupNode.prototype = Object.create( Node && Node.prototype ); - GroupNode.prototype.constructor = GroupNode; - - GroupNode.prototype.renderTo = function renderTo (ctx) { - if (!this.visible()) { - return; - } - - ctx.save(); - - this.setTransform(ctx); - this.setClip(ctx); - this.setOpacity(ctx); - - var childNodes = this.childNodes; - for (var i = 0; i < childNodes.length; i++) { - var child = childNodes[i]; - if (child.visible()) { - child.renderTo(ctx); - } - } - - ctx.restore(); - }; - - return GroupNode; -}(__WEBPACK_IMPORTED_MODULE_0__node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_1__mixins_traversable__["a" /* default */].extend(GroupNode.prototype, "childNodes"); - -__WEBPACK_IMPORTED_MODULE_2__node_map__["a" /* default */].Group = GroupNode; - -/* harmony default export */ __webpack_exports__["a"] = (GroupNode); -//# sourceMappingURL=group-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/image-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/path-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/node-map.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - -var ImageNode = (function (PathNode) { - function ImageNode(srcElement, cors) { - PathNode.call(this, srcElement); - - this.onLoad = this.onLoad.bind(this); - this.onError = this.onError.bind(this); - - this.loading = Object(__WEBPACK_IMPORTED_MODULE_2__util__["createPromise"])(); - - var img = this.img = new Image(); - - if (cors && !(/^data:/i.test(srcElement.src()))) { - img.crossOrigin = cors; - } - - img.src = srcElement.src(); - - if (img.complete) { - this.onLoad(); - } else { - img.onload = this.onLoad; - img.onerror = this.onError; - } - } - - if ( PathNode ) ImageNode.__proto__ = PathNode; - ImageNode.prototype = Object.create( PathNode && PathNode.prototype ); - ImageNode.prototype.constructor = ImageNode; - - ImageNode.prototype.renderTo = function renderTo (ctx) { - if (this.loading.state() === "resolved") { - ctx.save(); - - this.setTransform(ctx); - this.setClip(ctx); - - this.drawImage(ctx); - - ctx.restore(); - } - }; - - ImageNode.prototype.optionsChange = function optionsChange (e) { - if (e.field === "src") { - this.loading = Object(__WEBPACK_IMPORTED_MODULE_2__util__["createPromise"])(); - this.img.src = this.srcElement.src(); - } else { - PathNode.prototype.optionsChange.call(this, e); - } - }; - - ImageNode.prototype.onLoad = function onLoad () { - this.loading.resolve(); - this.invalidate(); - }; - - ImageNode.prototype.onError = function onError () { - this.loading.reject(new Error( - "Unable to load image '" + this.img.src + - "'. Check for connectivity and verify CORS headers." - )); - }; - - ImageNode.prototype.drawImage = function drawImage (ctx) { - var rect = this.srcElement.rect(); - var topLeft = rect.topLeft(); - - ctx.drawImage( - this.img, topLeft.x, topLeft.y, rect.width(), rect.height() - ); - }; - - return ImageNode; -}(__WEBPACK_IMPORTED_MODULE_0__path_node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_1__node_map__["a" /* default */].Image = ImageNode; - -/* harmony default export */ __webpack_exports__["a"] = (ImageNode); -//# sourceMappingURL=image-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/multi-path-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/path-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/node-map.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_render_path__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/utils/render-path.js"); - - - - -var MultiPathNode = (function (PathNode) { - function MultiPathNode () { - PathNode.apply(this, arguments); - } - - if ( PathNode ) MultiPathNode.__proto__ = PathNode; - MultiPathNode.prototype = Object.create( PathNode && PathNode.prototype ); - MultiPathNode.prototype.constructor = MultiPathNode; - - MultiPathNode.prototype.renderPoints = function renderPoints (ctx) { - var paths = this.srcElement.paths; - for (var i = 0; i < paths.length; i++) { - Object(__WEBPACK_IMPORTED_MODULE_2__utils_render_path__["a" /* default */])(ctx, paths[i]); - } - }; - - return MultiPathNode; -}(__WEBPACK_IMPORTED_MODULE_0__path_node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_1__node_map__["a" /* default */].MultiPath = MultiPathNode; - -/* harmony default export */ __webpack_exports__["a"] = (MultiPathNode); -//# sourceMappingURL=multi-path-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/node-map.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var NODE_MAP = {}; - -/* harmony default export */ __webpack_exports__["a"] = (NODE_MAP); -//# sourceMappingURL=node-map.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_base_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/base-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/node-map.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_render_path__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/utils/render-path.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - -var Node = (function (BaseNode) { - function Node(srcElement) { - BaseNode.call(this, srcElement); - if (srcElement) { - this.initClip(); - } - } - - if ( BaseNode ) Node.__proto__ = BaseNode; - Node.prototype = Object.create( BaseNode && BaseNode.prototype ); - Node.prototype.constructor = Node; - - Node.prototype.initClip = function initClip () { - var clip = this.srcElement.clip(); - if (clip) { - this.clip = clip; - clip.addObserver(this); - } - }; - - Node.prototype.clear = function clear () { - if (this.srcElement) { - this.srcElement.removeObserver(this); - } - - this.clearClip(); - - BaseNode.prototype.clear.call(this); - }; - - Node.prototype.clearClip = function clearClip () { - if (this.clip) { - this.clip.removeObserver(this); - delete this.clip; - } - }; - - Node.prototype.setClip = function setClip (ctx) { - if (this.clip) { - ctx.beginPath(); - Object(__WEBPACK_IMPORTED_MODULE_2__utils_render_path__["a" /* default */])(ctx, this.clip); - ctx.clip(); - } - }; - - Node.prototype.optionsChange = function optionsChange (e) { - if (e.field === "clip") { - this.clearClip(); - this.initClip(); - } - - BaseNode.prototype.optionsChange.call(this, e); - }; - - Node.prototype.setTransform = function setTransform (ctx) { - if (this.srcElement) { - var transform = this.srcElement.transform(); - if (transform) { - ctx.transform.apply(ctx, transform.matrix().toArray(6)); - } - } - }; - - Node.prototype.loadElements = function loadElements (elements, pos, cors) { - var this$1 = this; - - for (var i = 0; i < elements.length; i++) { - var srcElement = elements[i]; - var children = srcElement.children; - - var childNode = new __WEBPACK_IMPORTED_MODULE_1__node_map__["a" /* default */][srcElement.nodeType](srcElement, cors); - - if (children && children.length > 0) { - childNode.load(children, pos, cors); - } - - if (Object(__WEBPACK_IMPORTED_MODULE_3__util__["defined"])(pos)) { - this$1.insertAt(childNode, pos); - } else { - this$1.append(childNode); - } - } - }; - - Node.prototype.load = function load (elements, pos, cors) { - this.loadElements(elements, pos, cors); - - this.invalidate(); - }; - - Node.prototype.setOpacity = function setOpacity (ctx) { - if (this.srcElement) { - var opacity = this.srcElement.opacity(); - if (Object(__WEBPACK_IMPORTED_MODULE_3__util__["defined"])(opacity)) { - this.globalAlpha(ctx, opacity); - } - } - }; - - Node.prototype.globalAlpha = function globalAlpha (ctx, value) { - var opactity = value; - if (opactity && ctx.globalAlpha) { - opactity *= ctx.globalAlpha; - } - ctx.globalAlpha = opactity; - }; - - Node.prototype.visible = function visible () { - var src = this.srcElement; - return !src || (src && src.options.visible !== false); - }; - - return Node; -}(__WEBPACK_IMPORTED_MODULE_0__core_base_node__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (Node); -//# sourceMappingURL=node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/path-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__gradients_linear_gradient__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/gradients/linear-gradient.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__gradients_radial_gradient__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/gradients/radial-gradient.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_render_path__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/utils/render-path.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/node-map.js"); - - - - - - - - - -function addGradientStops(gradient, stops) { - for (var idx = 0; idx < stops.length; idx++) { - var stop = stops[idx]; - var color = Object(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* parseColor */])(stop.color()); - - color.a *= stop.opacity(); - - gradient.addColorStop(stop.offset(), color.toCssRgba()); - } -} - -var PathNode = (function (Node) { - function PathNode () { - Node.apply(this, arguments); - } - - if ( Node ) PathNode.__proto__ = Node; - PathNode.prototype = Object.create( Node && Node.prototype ); - PathNode.prototype.constructor = PathNode; - - PathNode.prototype.renderTo = function renderTo (ctx) { - ctx.save(); - - this.setTransform(ctx); - this.setClip(ctx); - this.setOpacity(ctx); - - ctx.beginPath(); - - this.renderPoints(ctx, this.srcElement); - - this.setLineDash(ctx); - this.setLineCap(ctx); - this.setLineJoin(ctx); - - this.setFill(ctx); - this.setStroke(ctx); - - ctx.restore(); - }; - - PathNode.prototype.setFill = function setFill (ctx) { - var fill = this.srcElement.options.fill; - var hasFill = false; - - if (fill) { - if (fill.nodeType === "Gradient") { - this.setGradientFill(ctx, fill); - hasFill = true; - } else if (!Object(__WEBPACK_IMPORTED_MODULE_2__util__["isTransparent"])(fill.color)) { - ctx.fillStyle = fill.color; - - ctx.save(); - this.globalAlpha(ctx, fill.opacity); - ctx.fill(); - ctx.restore(); - - hasFill = true; - } - } - - return hasFill; - }; - - PathNode.prototype.setGradientFill = function setGradientFill (ctx, fill) { - var bbox = this.srcElement.rawBBox(); - var gradient; - - if (fill instanceof __WEBPACK_IMPORTED_MODULE_3__gradients_linear_gradient__["a" /* default */]) { - var start = fill.start(); - var end = fill.end(); - gradient = ctx.createLinearGradient(start.x, start.y, end.x, end.y); - } else if (fill instanceof __WEBPACK_IMPORTED_MODULE_4__gradients_radial_gradient__["a" /* default */]) { - var center = fill.center(); - gradient = ctx.createRadialGradient(center.x, center.y, 0, center.x, center.y, fill.radius()); - } - - addGradientStops(gradient, fill.stops); - - ctx.save(); - - if (!fill.userSpace()) { - ctx.transform(bbox.width(), 0, 0, bbox.height(), bbox.origin.x, bbox.origin.y); - } - ctx.fillStyle = gradient; - ctx.fill(); - - ctx.restore(); - }; - - PathNode.prototype.setStroke = function setStroke (ctx) { - var stroke = this.srcElement.options.stroke; - if (stroke && !Object(__WEBPACK_IMPORTED_MODULE_2__util__["isTransparent"])(stroke.color) && stroke.width > 0) { - ctx.strokeStyle = stroke.color; - ctx.lineWidth = Object(__WEBPACK_IMPORTED_MODULE_2__util__["valueOrDefault"])(stroke.width, 1); - - ctx.save(); - this.globalAlpha(ctx, stroke.opacity); - ctx.stroke(); - ctx.restore(); - - return true; - } - }; - - PathNode.prototype.dashType = function dashType () { - var stroke = this.srcElement.options.stroke; - if (stroke && stroke.dashType) { - return stroke.dashType.toLowerCase(); - } - }; - - PathNode.prototype.setLineDash = function setLineDash (ctx) { - var dashType = this.dashType(); - if (dashType && dashType !== __WEBPACK_IMPORTED_MODULE_5__core_constants__["c" /* SOLID */]) { - var dashArray = __WEBPACK_IMPORTED_MODULE_5__core_constants__["b" /* DASH_ARRAYS */][dashType]; - if (ctx.setLineDash) { - ctx.setLineDash(dashArray); - } else { - ctx.mozDash = dashArray; - ctx.webkitLineDash = dashArray; - } - } - }; - - PathNode.prototype.setLineCap = function setLineCap (ctx) { - var dashType = this.dashType(); - var stroke = this.srcElement.options.stroke; - if (dashType && dashType !== __WEBPACK_IMPORTED_MODULE_5__core_constants__["c" /* SOLID */]) { - ctx.lineCap = __WEBPACK_IMPORTED_MODULE_5__core_constants__["a" /* BUTT */]; - } else if (stroke && stroke.lineCap) { - ctx.lineCap = stroke.lineCap; - } - }; - - PathNode.prototype.setLineJoin = function setLineJoin (ctx) { - var stroke = this.srcElement.options.stroke; - if (stroke && stroke.lineJoin) { - ctx.lineJoin = stroke.lineJoin; - } - }; - - PathNode.prototype.renderPoints = function renderPoints (ctx, path) { - Object(__WEBPACK_IMPORTED_MODULE_6__utils_render_path__["a" /* default */])(ctx, path); - }; - - return PathNode; -}(__WEBPACK_IMPORTED_MODULE_0__node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_7__node_map__["a" /* default */].Path = PathNode; - -/* harmony default export */ __webpack_exports__["a"] = (PathNode); - -//# sourceMappingURL=path-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/rect-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/path-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/node-map.js"); - - - -var RectNode = (function (PathNode) { - function RectNode () { - PathNode.apply(this, arguments); - } - - if ( PathNode ) RectNode.__proto__ = PathNode; - RectNode.prototype = Object.create( PathNode && PathNode.prototype ); - RectNode.prototype.constructor = RectNode; - - RectNode.prototype.renderPoints = function renderPoints (ctx) { - var ref = this.srcElement.geometry(); - var origin = ref.origin; - var size = ref.size; - - ctx.rect(origin.x, origin.y, size.width, size.height); - }; - - return RectNode; -}(__WEBPACK_IMPORTED_MODULE_0__path_node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_1__node_map__["a" /* default */].Rect = RectNode; - -/* harmony default export */ __webpack_exports__["a"] = (RectNode); -//# sourceMappingURL=rect-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/root-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__group_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/group-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_traversable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/traversable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); - - - - -var FRAME_DELAY = 1000 / 60; - -var RootNode = (function (GroupNode) { - function RootNode(canvas) { - GroupNode.call(this); - - this.canvas = canvas; - this.ctx = canvas.getContext("2d"); - - var invalidateHandler = this._invalidate.bind(this); - this.invalidate = Object(__WEBPACK_IMPORTED_MODULE_2__common__["k" /* throttle */])(function () { - Object(__WEBPACK_IMPORTED_MODULE_2__common__["d" /* animationFrame */])(invalidateHandler); - }, FRAME_DELAY); - } - - if ( GroupNode ) RootNode.__proto__ = GroupNode; - RootNode.prototype = Object.create( GroupNode && GroupNode.prototype ); - RootNode.prototype.constructor = RootNode; - - RootNode.prototype.destroy = function destroy () { - GroupNode.prototype.destroy.call(this); - this.canvas = null; - this.ctx = null; - }; - - RootNode.prototype.load = function load (elements, pos, cors) { - this.loadElements(elements, pos, cors); - this._invalidate(); - }; - - RootNode.prototype._invalidate = function _invalidate () { - if (!this.ctx) { - return; - } - this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); - this.renderTo(this.ctx); - }; - - return RootNode; -}(__WEBPACK_IMPORTED_MODULE_0__group_node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_1__mixins_traversable__["a" /* default */].extend(RootNode.prototype, "childNodes"); - -/* harmony default export */ __webpack_exports__["a"] = (RootNode); -//# sourceMappingURL=root-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/surface-cursor.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - -var SurfaceCursor = function SurfaceCursor(surface) { - surface.bind("mouseenter", this._mouseenter.bind(this)); - surface.bind("mouseleave", this._mouseleave.bind(this)); - - this.element = surface.element; -}; - -SurfaceCursor.prototype.clear = function clear () { - this._resetCursor(); -}; - -SurfaceCursor.prototype.destroy = function destroy () { - this._resetCursor(); - delete this.element; -}; - -SurfaceCursor.prototype._mouseenter = function _mouseenter (e) { - var cursor = this._shapeCursor(e); - - if (!cursor) { - this._resetCursor(); - } else { - if (!this._current) { - this._defaultCursor = this._getCursor(); - } - - this._setCursor(cursor); - } -}; - -SurfaceCursor.prototype._mouseleave = function _mouseleave () { - this._resetCursor(); -}; - -SurfaceCursor.prototype._shapeCursor = function _shapeCursor (e) { - var shape = e.element; - - while (shape && !Object(__WEBPACK_IMPORTED_MODULE_0__util__["defined"])(shape.options.cursor)) { - shape = shape.parent; - } - - if (shape) { - return shape.options.cursor; - } -}; - -SurfaceCursor.prototype._getCursor = function _getCursor () { - if (this.element) { - return this.element.style.cursor; - } -}; - -SurfaceCursor.prototype._setCursor = function _setCursor (cursor) { - if (this.element) { - this.element.style.cursor = cursor; - this._current = cursor; - } -}; - -SurfaceCursor.prototype._resetCursor = function _resetCursor () { - if (this._current) { - this._setCursor(this._defaultCursor || ""); - delete this._current; - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (SurfaceCursor); - - -//# sourceMappingURL=surface-cursor.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/surface.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_surface__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/surface.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_surface_factory__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/surface-factory.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__root_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/root-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__search_shapes_quad_tree__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/search/shapes-quad-tree.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__surface_cursor__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/surface-cursor.js"); - - - - - - - -var Surface = (function (BaseSurface) { - function Surface(element, options) { - BaseSurface.call(this, element, options); - - this.element.innerHTML = this._template(this); - - var canvas = this.element.firstElementChild; - var size = Object(__WEBPACK_IMPORTED_MODULE_2__util__["elementSize"])(element); - - canvas.width = size.width; - canvas.height = size.height; - - this._rootElement = canvas; - - this._root = new __WEBPACK_IMPORTED_MODULE_3__root_node__["a" /* default */](canvas); - - this._mouseTrackHandler = this._trackMouse.bind(this); - - Object(__WEBPACK_IMPORTED_MODULE_2__util__["bindEvents"])(this.element, { - click: this._mouseTrackHandler, - mousemove: this._mouseTrackHandler - }); - } - - if ( BaseSurface ) Surface.__proto__ = BaseSurface; - Surface.prototype = Object.create( BaseSurface && BaseSurface.prototype ); - Surface.prototype.constructor = Surface; - - Surface.prototype.destroy = function destroy () { - BaseSurface.prototype.destroy.call(this); - - if (this._root) { - this._root.destroy(); - this._root = null; - } - - if (this._searchTree) { - this._searchTree.clear(); - delete this._searchTree; - } - - if (this._cursor) { - this._cursor.destroy(); - delete this._cursor; - } - - Object(__WEBPACK_IMPORTED_MODULE_2__util__["unbindEvents"])(this.element, { - click: this._mouseTrackHandler, - mousemove: this._mouseTrackHandler - }); - }; - - Surface.prototype.draw = function draw (element) { - BaseSurface.prototype.draw.call(this, element); - this._root.load([ element ], undefined, this.options.cors); - - if (this._searchTree) { - this._searchTree.add([ element ]); - } - }; - - Surface.prototype.clear = function clear () { - BaseSurface.prototype.clear.call(this); - this._root.clear(); - - if (this._searchTree) { - this._searchTree.clear(); - } - - if (this._cursor) { - this._cursor.clear(); - } - }; - - Surface.prototype.eventTarget = function eventTarget (e) { - if (this._searchTree) { - var point = this._surfacePoint(e); - var shape = this._searchTree.pointShape(point); - return shape; - } - }; - - Surface.prototype.image = function image () { - var ref = this; - var root = ref._root; - var rootElement = ref._rootElement; - var loadingStates = []; - - root.traverse(function (childNode) { - if (childNode.loading) { - loadingStates.push(childNode.loading); - } - }); - - var promise = Object(__WEBPACK_IMPORTED_MODULE_2__util__["createPromise"])(); - var resolveDataURL = function () { - root._invalidate(); - - try { - var data = rootElement.toDataURL(); - promise.resolve(data); - } catch (e) { - promise.reject(e); - } - }; - - Object(__WEBPACK_IMPORTED_MODULE_2__util__["promiseAll"])(loadingStates).then(resolveDataURL, resolveDataURL); - - return promise; - }; - - Surface.prototype.suspendTracking = function suspendTracking () { - BaseSurface.prototype.suspendTracking.call(this); - if (this._searchTree) { - this._searchTree.clear(); - delete this._searchTree; - } - }; - - Surface.prototype.resumeTracking = function resumeTracking () { - BaseSurface.prototype.resumeTracking.call(this); - if (!this._searchTree) { - this._searchTree = new __WEBPACK_IMPORTED_MODULE_4__search_shapes_quad_tree__["a" /* default */](); - - var childNodes = this._root.childNodes; - var rootElements = []; - for (var idx = 0; idx < childNodes.length; idx++) { - rootElements.push(childNodes[idx].srcElement); - } - this._searchTree.add(rootElements); - } - }; - - Surface.prototype._resize = function _resize () { - this._rootElement.width = this._size.width; - this._rootElement.height = this._size.height; - - this._root.invalidate(); - }; - - Surface.prototype._template = function _template () { - return ""; - }; - - Surface.prototype._enableTracking = function _enableTracking () { - this._searchTree = new __WEBPACK_IMPORTED_MODULE_4__search_shapes_quad_tree__["a" /* default */](); - this._cursor = new __WEBPACK_IMPORTED_MODULE_5__surface_cursor__["a" /* default */](this); - - BaseSurface.prototype._enableTracking.call(this); - }; - - Surface.prototype._trackMouse = function _trackMouse (e) { - if (this._suspendedTracking) { - return; - } - - var shape = this.eventTarget(e); - - if (e.type !== "click") { - var currentShape = this._currentShape; - if (currentShape && currentShape !== shape) { - this.trigger("mouseleave", { - element: currentShape, - originalEvent: e, - type: "mouseleave" - }); - } - - if (shape && currentShape !== shape) { - this.trigger("mouseenter", { - element: shape, - originalEvent: e, - type: "mouseenter" - }); - } - - this.trigger("mousemove", { - element: shape, - originalEvent: e, - type: "mousemove" - }); - - this._currentShape = shape; - } else if (shape) { - this.trigger("click", { - element: shape, - originalEvent: e, - type: "click" - }); - } - }; - - return Surface; -}(__WEBPACK_IMPORTED_MODULE_0__core_surface__["a" /* default */])); - -Surface.prototype.type = "canvas"; - -if (typeof document !== "undefined" && document.createElement("canvas").getContext) { - __WEBPACK_IMPORTED_MODULE_0__core_surface__["a" /* default */].support.canvas = true; - __WEBPACK_IMPORTED_MODULE_1__core_surface_factory__["a" /* default */].current.register("canvas", Surface, 20); -} - -/* harmony default export */ __webpack_exports__["a"] = (Surface); - -//# sourceMappingURL=surface.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/text-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/path-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/node-map.js"); - - - -var TextNode = (function (PathNode) { - function TextNode () { - PathNode.apply(this, arguments); - } - - if ( PathNode ) TextNode.__proto__ = PathNode; - TextNode.prototype = Object.create( PathNode && PathNode.prototype ); - TextNode.prototype.constructor = TextNode; - - TextNode.prototype.renderTo = function renderTo (ctx) { - var text = this.srcElement; - var pos = text.position(); - var size = text.measure(); - - ctx.save(); - - this.setTransform(ctx); - this.setClip(ctx); - this.setOpacity(ctx); - - ctx.beginPath(); - - ctx.font = text.options.font; - ctx.textAlign = 'left'; - - if (this.setFill(ctx)) { - ctx.fillText(text.content(), pos.x, pos.y + size.baseline); - } - - if (this.setStroke(ctx)) { - this.setLineDash(ctx); - ctx.strokeText(text.content(), pos.x, pos.y + size.baseline); - } - - ctx.restore(); - }; - - return TextNode; -}(__WEBPACK_IMPORTED_MODULE_0__path_node__["a" /* default */])); - - -__WEBPACK_IMPORTED_MODULE_1__node_map__["a" /* default */].Text = TextNode; - -/* harmony default export */ __webpack_exports__["a"] = (TextNode); -//# sourceMappingURL=text-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/canvas/utils/render-path.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = renderPath; - -function renderPath(ctx, path) { - var segments = path.segments; - - if (segments.length === 0) { - return; - } - - var segment = segments[0]; - var anchor = segment.anchor(); - ctx.moveTo(anchor.x, anchor.y); - - for (var i = 1; i < segments.length; i++) { - segment = segments[i]; - anchor = segment.anchor(); - - var prevSeg = segments[i - 1]; - var prevOut = prevSeg.controlOut(); - var controlIn = segment.controlIn(); - - if (prevOut && controlIn) { - ctx.bezierCurveTo(prevOut.x, prevOut.y, - controlIn.x, controlIn.y, - anchor.x, anchor.y); - } else { - ctx.lineTo(anchor.x, anchor.y); - } - } - - if (path.options.closed) { - ctx.closePath(); - } -} -//# sourceMappingURL=render-path.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_animation_frame__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/animation-frame.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__common_animation_frame__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_class__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/class.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__common_class__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_html_encode__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/html-encode.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_2__common_html_encode__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_log_to_console__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/log-to-console.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_3__common_log_to_console__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_observable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/observable.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__common_observable__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_save_as__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/save-as.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_5__common_save_as__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_support__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/support.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_6__common_support__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common_template__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/template.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_7__common_template__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__common_throttle__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/throttle.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_8__common_throttle__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__common_color__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/color.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_9__common_color__["a"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_9__common_color__["b"]; }); - - - - - - - - - - - - - -//# sourceMappingURL=common.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common/animation-frame.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = animationFrameProxy; -var wnd = typeof window !== "undefined" ? window : {}; - -var animationFrame = wnd.requestAnimationFrame || - wnd.webkitRequestAnimationFrame || - wnd.mozRequestAnimationFrame || - wnd.oRequestAnimationFrame || - wnd.msRequestAnimationFrame || - function(callback) { setTimeout(callback, 1000 / 60); }; - -function animationFrameProxy(callback) { - animationFrame.call(wnd, callback); -} - -//# sourceMappingURL=animation-frame.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common/class.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var Class = function Class () {}; - -/* harmony default export */ __webpack_exports__["a"] = (Class); -//# sourceMappingURL=class.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common/color.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__color_parse_color__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/color/parse-color.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__color_parse_color__["e"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__color_color__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/color/color.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__color_color__["a"]; }); - - -//# sourceMappingURL=color.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common/color/color.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__class__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/class.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__named_colors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/color/named-colors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__parse_color__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/color/parse-color.js"); - - - - -var Color = (function (Class) { - function Color(value) { - var this$1 = this; - - Class.call(this); - - if (arguments.length === 1) { - var formats = Color.formats; - var resolvedColor = this.resolveColor(value); - - for (var idx = 0; idx < formats.length; idx++) { - var formatRegex = formats[idx].re; - var processor = formats[idx].process; - var parts = formatRegex.exec(resolvedColor); - - if (parts) { - var channels = processor(parts); - this$1.r = channels[0]; - this$1.g = channels[1]; - this$1.b = channels[2]; - } - } - } else { - this.r = arguments[0]; - this.g = arguments[1]; - this.b = arguments[2]; - } - - this.r = this.normalizeByte(this.r); - this.g = this.normalizeByte(this.g); - this.b = this.normalizeByte(this.b); - } - - if ( Class ) Color.__proto__ = Class; - Color.prototype = Object.create( Class && Class.prototype ); - Color.prototype.constructor = Color; - - Color.prototype.toHex = function toHex () { - var pad = this.padDigit; - var r = this.r.toString(16); - var g = this.g.toString(16); - var b = this.b.toString(16); - - return "#" + pad(r) + pad(g) + pad(b); - }; - - Color.prototype.resolveColor = function resolveColor (value) { - var color = value || "black"; - - if (color.charAt(0) === "#") { - color = color.substr(1, 6); - } - - color = color.replace(/ /g, ""); - color = color.toLowerCase(); - color = Color.namedColors[color] || color; - - return color; - }; - - Color.prototype.normalizeByte = function normalizeByte (value) { - if (value < 0 || isNaN(value)) { - return 0; - } - - return value > 255 ? 255 : value; - }; - - Color.prototype.padDigit = function padDigit (value) { - return (value.length === 1) ? "0" + value : value; - }; - - Color.prototype.brightness = function brightness (value) { - var round = Math.round; - - this.r = round(this.normalizeByte(this.r * value)); - this.g = round(this.normalizeByte(this.g * value)); - this.b = round(this.normalizeByte(this.b * value)); - - return this; - }; - - Color.prototype.percBrightness = function percBrightness () { - return Math.sqrt(0.241 * this.r * this.r + 0.691 * this.g * this.g + 0.068 * this.b * this.b); - }; - - Color.fromBytes = function fromBytes (r, g, b, a) { - return new __WEBPACK_IMPORTED_MODULE_2__parse_color__["a" /* Bytes */](r, g, b, a != null ? a : 1); - }; - - Color.fromRGB = function fromRGB (r, g, b, a) { - return new __WEBPACK_IMPORTED_MODULE_2__parse_color__["d" /* RGB */](r, g, b, a != null ? a : 1); - }; - - Color.fromHSV = function fromHSV (h, s, v, a) { - return new __WEBPACK_IMPORTED_MODULE_2__parse_color__["c" /* HSV */](h, s, v, a != null ? a : 1); - }; - - Color.fromHSL = function fromHSL (h, s, l, a) { - return new __WEBPACK_IMPORTED_MODULE_2__parse_color__["b" /* HSL */](h, s, l, a != null ? a : 1); - }; - - return Color; -}(__WEBPACK_IMPORTED_MODULE_0__class__["a" /* default */])); - -Color.formats = [ { - re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/, - process: function(parts) { - return [ - parseInt(parts[1], 10), parseInt(parts[2], 10), parseInt(parts[3], 10) - ]; - } -}, { - re: /^(\w{2})(\w{2})(\w{2})$/, - process: function(parts) { - return [ - parseInt(parts[1], 16), parseInt(parts[2], 16), parseInt(parts[3], 16) - ]; - } -}, { - re: /^(\w{1})(\w{1})(\w{1})$/, - process: function(parts) { - return [ - parseInt(parts[1] + parts[1], 16), - parseInt(parts[2] + parts[2], 16), - parseInt(parts[3] + parts[3], 16) - ]; - } -} ]; - -Color.namedColors = __WEBPACK_IMPORTED_MODULE_1__named_colors__["a" /* default */]; - -/* harmony default export */ __webpack_exports__["a"] = (Color); -//# sourceMappingURL=color.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common/color/named-colors.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var namedColors = { - aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "00ffff", - aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", - bisque: "ffe4c4", black: "000000", blanchedalmond: "ffebcd", - blue: "0000ff", blueviolet: "8a2be2", brown: "a52a2a", - burlywood: "deb887", cadetblue: "5f9ea0", chartreuse: "7fff00", - chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", - cornsilk: "fff8dc", crimson: "dc143c", cyan: "00ffff", - darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", - darkgray: "a9a9a9", darkgrey: "a9a9a9", darkgreen: "006400", - 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: "ff00ff", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", - gold: "ffd700", goldenrod: "daa520", gray: "808080", - grey: "808080", green: "008000", greenyellow: "adff2f", - 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", - lightgrey: "d3d3d3", lightgreen: "90ee90", lightpink: "ffb6c1", - lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", - lightslategray: "778899", lightslategrey: "778899", lightsteelblue: "b0c4de", - lightyellow: "ffffe0", lime: "00ff00", limegreen: "32cd32", - linen: "faf0e6", magenta: "ff00ff", maroon: "800000", - mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", - mediumpurple: "9370d8", 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: "d87093", papayawhip: "ffefd5", peachpuff: "ffdab9", - peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", - powderblue: "b0e0e6", purple: "800080", red: "ff0000", - 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: "ffffff", - whitesmoke: "f5f5f5", yellow: "ffff00", yellowgreen: "9acd32" -}; - -/* harmony default export */ __webpack_exports__["a"] = (namedColors); -//# sourceMappingURL=named-colors.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common/color/parse-color.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return RGB; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Bytes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return HSV; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return HSL; }); -/* harmony export (immutable) */ __webpack_exports__["e"] = parseColor; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__class__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/class.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__support__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/support.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__named_colors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/color/named-colors.js"); - - - - -var browser = __WEBPACK_IMPORTED_MODULE_1__support__["a" /* default */].browser; - -var matchNamedColor = function (color) { - var colorNames = Object.keys(__WEBPACK_IMPORTED_MODULE_2__named_colors__["a" /* default */]); - colorNames.push("transparent"); - - var regexp = new RegExp("^(" + colorNames.join("|") + ")(\\W|$)", "i"); - matchNamedColor = function (color) { return regexp.exec(color); }; - - return regexp.exec(color); -}; - -var BaseColor = (function (Class) { - function BaseColor() { Class.call(this); } - - if ( Class ) BaseColor.__proto__ = Class; - BaseColor.prototype = Object.create( Class && Class.prototype ); - BaseColor.prototype.constructor = BaseColor; - BaseColor.prototype.toHSV = function toHSV () { return this; }; - - BaseColor.prototype.toRGB = function toRGB () { return this; }; - - BaseColor.prototype.toHex = function toHex () { return this.toBytes().toHex(); }; - - BaseColor.prototype.toBytes = function toBytes () { return this; }; - - BaseColor.prototype.toCss = function toCss () { return "#" + this.toHex(); }; - - BaseColor.prototype.toCssRgba = function toCssRgba () { - var rgb = this.toBytes(); - return ("rgba(" + (rgb.r) + ", " + (rgb.g) + ", " + (rgb.b) + ", " + (parseFloat((Number(this.a)).toFixed(3))) + ")"); - }; - - BaseColor.prototype.toDisplay = function toDisplay () { - if (browser.msie && browser.version < 9) { - return this.toCss(); // no RGBA support; does it support any opacity in colors? - } - return this.toCssRgba(); - }; - - BaseColor.prototype.equals = function equals (c) { - return c === this || c !== null && this.toCssRgba() === parseColor(c).toCssRgba(); - }; - - BaseColor.prototype.diff = function diff (other) { - if (other === null) { - return NaN; - } - - var c1 = this.toBytes(); - var c2 = other.toBytes(); - - return Math.sqrt(Math.pow((c1.r - c2.r) * 0.30, 2) + - Math.pow((c1.g - c2.g) * 0.59, 2) + - Math.pow((c1.b - c2.b) * 0.11, 2)); - }; - - BaseColor.prototype.clone = function clone () { - var c = this.toBytes(); - if (c === this) { - c = new Bytes(c.r, c.g, c.b, c.a); - } - - return c; - }; - - return BaseColor; -}(__WEBPACK_IMPORTED_MODULE_0__class__["a" /* default */])); - -var RGB = (function (BaseColor) { - function RGB(r, g, b, a) { - BaseColor.call(this); - - this.r = r; - this.g = g; - this.b = b; - this.a = a; - } - - if ( BaseColor ) RGB.__proto__ = BaseColor; - RGB.prototype = Object.create( BaseColor && BaseColor.prototype ); - RGB.prototype.constructor = RGB; - - RGB.prototype.toHSV = function toHSV () { - var ref = this; - var r = ref.r; - var g = ref.g; - var b = ref.b; - var min = Math.min(r, g, b); - var max = Math.max(r, g, b); - var delta = max - min; - var v = max; - var h, s; - - if (delta === 0) { - return new HSV(0, 0, v, this.a); - } - - if (max !== 0) { - s = delta / max; - if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else { - h = 4 + (r - g) / delta; - } - - h *= 60; - if (h < 0) { - h += 360; - } - } else { - s = 0; - h = -1; - } - - return new HSV(h, s, v, this.a); - }; - - RGB.prototype.toHSL = function toHSL () { - var ref = this; - var r = ref.r; - var g = ref.g; - var b = ref.b; - var max = Math.max(r, g, b); - var min = Math.min(r, g, b); - var h, s, l = (max + min) / 2; - - if (max === min) { - h = s = 0; - } else { - var d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch (max) { - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - default: break; - } - - h *= 60; - s *= 100; - l *= 100; - } - - return new HSL(h, s, l, this.a); - }; - - RGB.prototype.toBytes = function toBytes () { - return new Bytes(this.r * 255, this.g * 255, this.b * 255, this.a); - }; - - return RGB; -}(BaseColor)); - -var Bytes = (function (RGB) { - function Bytes(r, g, b, a) { - RGB.call(this, Math.round(r), Math.round(g), Math.round(b), a); - } - - if ( RGB ) Bytes.__proto__ = RGB; - Bytes.prototype = Object.create( RGB && RGB.prototype ); - Bytes.prototype.constructor = Bytes; - - Bytes.prototype.toRGB = function toRGB () { - return new RGB(this.r / 255, this.g / 255, this.b / 255, this.a); - }; - - Bytes.prototype.toHSV = function toHSV () { - return this.toRGB().toHSV(); - }; - - Bytes.prototype.toHSL = function toHSL () { - return this.toRGB().toHSL(); - }; - - Bytes.prototype.toHex = function toHex () { - return hex(this.r, 2) + hex(this.g, 2) + hex(this.b, 2); - }; - - Bytes.prototype.toBytes = function toBytes () { - return this; - }; - - return Bytes; -}(RGB)); - -function hex(n, width, pad) { - if ( pad === void 0 ) pad = "0"; - - var result = n.toString(16); - while (width > result.length) { - result = pad + result; - } - - return result; -} - -var HSV = (function (BaseColor) { - function HSV(h, s, v, a) { - BaseColor.call(this); - - this.h = h; - this.s = s; - this.v = v; - this.a = a; - } - - if ( BaseColor ) HSV.__proto__ = BaseColor; - HSV.prototype = Object.create( BaseColor && BaseColor.prototype ); - HSV.prototype.constructor = HSV; - - HSV.prototype.toRGB = function toRGB () { - var ref = this; - var h = ref.h; - var s = ref.s; - var v = ref.v; - var r, g, b; - - if (s === 0) { - r = g = b = v; - } else { - h /= 60; - - var i = Math.floor(h); - var f = h - i; - var p = v * (1 - s); - var q = v * (1 - s * f); - var t = v * (1 - s * (1 - f)); - - switch (i) { - case 0: r = v; g = t; b = p; break; - case 1: r = q; g = v; b = p; break; - case 2: r = p; g = v; b = t; break; - case 3: r = p; g = q; b = v; break; - case 4: r = t; g = p; b = v; break; - default: r = v; g = p; b = q; break; - } - } - - return new RGB(r, g, b, this.a); - }; - - HSV.prototype.toHSL = function toHSL () { - return this.toRGB().toHSL(); - }; - - HSV.prototype.toBytes = function toBytes () { - return this.toRGB().toBytes(); - }; - - return HSV; -}(BaseColor)); - -var HSL = (function (BaseColor) { - function HSL(h, s, l, a) { - BaseColor.call(this); - - this.h = h; - this.s = s; - this.l = l; - this.a = a; - } - - if ( BaseColor ) HSL.__proto__ = BaseColor; - HSL.prototype = Object.create( BaseColor && BaseColor.prototype ); - HSL.prototype.constructor = HSL; - - HSL.prototype.toRGB = function toRGB () { - var ref = this; - var h = ref.h; - var s = ref.s; - var l = ref.l; - var r, g, b; - - if (s === 0) { - r = g = b = l; // achromatic - } else { - h /= 360; - s /= 100; - l /= 100; - - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = hue2rgb(p, q, h + 1 / 3); - g = hue2rgb(p, q, h); - b = hue2rgb(p, q, h - 1 / 3); - } - - return new RGB(r, g, b, this.a); - }; - - HSL.prototype.toHSV = function toHSV () { - return this.toRGB().toHSV(); - }; - - HSL.prototype.toBytes = function toBytes () { - return this.toRGB().toBytes(); - }; - - return HSL; -}(BaseColor)); - -function hue2rgb(p, q, s) { - var t = s; - - if (t < 0) { - t += 1; - } - - if (t > 1) { - t -= 1; - } - - if (t < 1 / 6) { - return p + (q - p) * 6 * t; - } - - if (t < 1 / 2) { - return q; - } - - if (t < 2 / 3) { - return p + (q - p) * (2 / 3 - t) * 6; - } - - return p; -} - - - -function parseColor(value, safe) { - var m, ret; - - if (value == null || value === "none") { - return null; - } - - if (value instanceof BaseColor) { - return value; - } - - var color = value.toLowerCase(); - if ((m = matchNamedColor(color))) { - if (m[1] === "transparent") { - color = new RGB(1, 1, 1, 0); - } else { - color = parseColor(__WEBPACK_IMPORTED_MODULE_2__named_colors__["a" /* default */][m[1]], safe); - } - color.match = [ m[1] ]; - return color; - } - if ((m = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(color))) { - ret = new Bytes(parseInt(m[1], 16), - parseInt(m[2], 16), - parseInt(m[3], 16), 1); - } else if ((m = /^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(color))) { - ret = new Bytes(parseInt(m[1] + m[1], 16), - parseInt(m[2] + m[2], 16), - parseInt(m[3] + m[3], 16), 1); - } else if ((m = /^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(color))) { - ret = new Bytes(parseInt(m[1], 10), - parseInt(m[2], 10), - parseInt(m[3], 10), 1); - } else if ((m = /^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(color))) { - ret = new Bytes(parseInt(m[1], 10), - parseInt(m[2], 10), - parseInt(m[3], 10), parseFloat(m[4])); - } else if ((m = /^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(color))) { - ret = new RGB(parseFloat(m[1]) / 100, - parseFloat(m[2]) / 100, - parseFloat(m[3]) / 100, 1); - } else if ((m = /^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(color))) { - ret = new RGB(parseFloat(m[1]) / 100, - parseFloat(m[2]) / 100, - parseFloat(m[3]) / 100, parseFloat(m[4])); - } - - if (ret) { - ret.match = m; - } else if (!safe) { - throw new Error("Cannot parse color: " + color); - } - - return ret; -} - -//# sourceMappingURL=parse-color.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common/html-encode.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = htmlEncode; -var ampRegExp = /&/g; -var ltRegExp = //g; - -function htmlEncode(value) { - return String(value).replace(ampRegExp, "&").replace(ltRegExp, "<").replace(gtRegExp, ">").replace(quoteRegExp, """).replace(aposRegExp, "'"); -} -//# sourceMappingURL=html-encode.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common/log-to-console.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = logToConsole; -/* eslint-disable no-console */ - -function logToConsole(message) { - var console = window.console; - - if (typeof(console) != "undefined" && console.log) { - console.log(message); - } -} -//# sourceMappingURL=log-to-console.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common/observable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__class__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common/class.js"); - - -var Observable = (function (Class) { - function Observable() { - Class.call(this); - - this._events = {}; - } - - if ( Class ) Observable.__proto__ = Class; - Observable.prototype = Object.create( Class && Class.prototype ); - Observable.prototype.constructor = Observable; - - Observable.prototype.bind = function bind (eventName, handlers, one) { - var arguments$1 = arguments; - var this$1 = this; - - var eventNames = getArray(eventName); - var handlersIsFunction = isFunction(handlers); - var length = eventNames.length; - - if (handlers === undefined) { - for (var field in eventName) { - this$1.bind(field, eventName[field]); - } - return this; - } - - var loop = function ( idx ) { - var eventName$1 = eventNames[idx]; - - var handler = handlersIsFunction ? handlers : handlers[eventName$1]; - - if (handler) { - if (one) { - var original = handler; - handler = function () { // eslint-disable-line no-loop-func - this$1.unbind(eventName$1, handler); - original.apply(this$1, arguments$1); - }; - handler.original = original; - } - var events = this$1._events[eventName$1] = this$1._events[eventName$1] || []; - events.push(handler); - } - }; - - for (var idx = 0; idx < length; idx++) loop( idx ); - - return this; - }; - - Observable.prototype.one = function one (eventNames, handlers) { - return this.bind(eventNames, handlers, true); - }; - - Observable.prototype.first = function first (eventName, handlers) { - var this$1 = this; - - var eventNames = getArray(eventName); - var handlersIsFunction = isFunction(handlers); - - for (var idx = 0, length = eventNames.length; idx < length; idx++) { - var eventName$1 = eventNames[idx]; - - var handler = handlersIsFunction ? handlers : handlers[eventName$1]; - - if (handler) { - var events = this$1._events[eventName$1] = this$1._events[eventName$1] || []; - events.unshift(handler); - } - } - - return this; - }; - - Observable.prototype.trigger = function trigger (eventName, e) { - var this$1 = this; - if ( e === void 0 ) e = {}; - - var events = this._events[eventName]; - - if (events) { - var length = events.length; - - e.sender = this; - e._defaultPrevented = false; - e.preventDefault = preventDefault; - e.isDefaultPrevented = isDefaultPrevented; - - events = events.slice(); - - for (var idx = 0; idx < length; idx++) { - events[idx].call(this$1, e); - } - - return e._defaultPrevented === true; - } - - return false; - }; - - Observable.prototype.unbind = function unbind (eventName, handler) { - var events = this._events[eventName]; - - if (eventName === undefined) { - this._events = {}; - } else if (events) { - if (handler) { - for (var idx = events.length - 1; idx >= 0; idx--) { - if (events[idx] === handler || events[idx].original === handler) { - events.splice(idx, 1); - } - } - } else { - this._events[eventName] = []; - } - } - - return this; - }; - - return Observable; -}(__WEBPACK_IMPORTED_MODULE_0__class__["a" /* default */])); - -function isFunction(value) { - return typeof value === "function"; -} - -function getArray(value) { - return typeof value === "string" ? [ value ] : value; -} - -function preventDefault() { - this._defaultPrevented = true; -} - -function isDefaultPrevented() { - return this._defaultPrevented === true; -} - -/* harmony default export */ __webpack_exports__["a"] = (Observable); -//# sourceMappingURL=observable.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common/save-as.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = saveAs; -// XXX: the following will not work with IE9 (requires server proxy). -function saveAs(options) { - var dataURI = options.dataURI; - var fileName = options.fileName; - var data = dataURI; - - if (typeof data == "string" && window.Blob) { - var parts = data.split(";base64,"); - var contentType = parts[0]; - var base64 = atob(parts[1]); - var array = new Uint8Array(base64.length); - for (var idx = 0; idx < base64.length; idx++) { - array[idx] = base64.charCodeAt(idx); - } - data = new Blob([ array.buffer ], { type: contentType }); - } - if (navigator.msSaveBlob) { - navigator.msSaveBlob(data, fileName); - } else { - var link = document.createElement("a"); - link.download = fileName; - data = link.href = URL.createObjectURL(data); - var e = document.createEvent("MouseEvents"); - e.initMouseEvent("click", true, false, window, - 0, 0, 0, 0, 0, false, false, false, false, 0, null); - link.dispatchEvent(e); - setTimeout(function() { - URL.revokeObjectURL(data); - }); - } -} -//# sourceMappingURL=save-as.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common/support.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var support = {}; - -if (typeof window !== 'undefined') { - support.browser = (function(userAgent) { - var browserRxs = { - edge: /(edge)[ \/]([\w.]+)/i, - webkit: /(chrome)[ \/]([\w.]+)/i, - safari: /(webkit)[ \/]([\w.]+)/i, - opera: /(opera)(?:.*version|)[ \/]([\w.]+)/i, - msie: /(msie\s|trident.*? rv:)([\w.]+)/i, - mozilla: /(mozilla)(?:.*? rv:([\w.]+)|)/i - }; - - var browser; - - for (var agent in browserRxs) { - if (browserRxs.hasOwnProperty(agent)) { - var match = userAgent.match(browserRxs[agent]); - if (match) { - browser = {}; - browser[agent] = true; - browser[match[1].toLowerCase().split(" ")[0].split("/")[0]] = true; - browser.version = parseInt(document.documentMode || match[2], 10); - - break; - } - } - } - - return browser; - - })(window.navigator.userAgent); -} - -/* harmony default export */ __webpack_exports__["a"] = (support); - - -//# sourceMappingURL=support.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common/template.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = template; -function template() { - // XXX: no template engine for now - throw new Error("String template not yet supported. Pass a function and use your preferred template engine."); -} -//# sourceMappingURL=template.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/common/throttle.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = throttle; -function now() { - return new Date().getTime(); -} - -function throttle(fn, delay) { - var lastExecTime = 0; - var timeout; - - if (!delay || delay <= 0) { - return fn; - } - - var throttled = function() { - var elapsed = now() - lastExecTime; - var args = arguments; - - var exec = function() { - fn.apply(null, args); - lastExecTime = now(); - }; - - // first execution - if (!lastExecTime) { - return exec(); - } - - if (timeout) { - clearTimeout(timeout); - } - - if (elapsed > delay) { - exec(); - } else { - timeout = setTimeout(exec, delay - elapsed); - } - }; - - throttled.cancel = function() { - clearTimeout(timeout); - }; - - return throttled; -} -//# sourceMappingURL=throttle.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/core/base-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); - - -var BaseNode = (function (Class) { - function BaseNode(srcElement) { - Class.call(this); - - this.childNodes = []; - this.parent = null; - - if (srcElement) { - this.srcElement = srcElement; - this.observe(); - } - } - - if ( Class ) BaseNode.__proto__ = Class; - BaseNode.prototype = Object.create( Class && Class.prototype ); - BaseNode.prototype.constructor = BaseNode; - - BaseNode.prototype.destroy = function destroy () { - var this$1 = this; - - if (this.srcElement) { - this.srcElement.removeObserver(this); - } - - var children = this.childNodes; - for (var i = 0; i < children.length; i++) { - this$1.childNodes[i].destroy(); - } - - this.parent = null; - }; - - BaseNode.prototype.load = function load () {}; - - BaseNode.prototype.observe = function observe () { - if (this.srcElement) { - this.srcElement.addObserver(this); - } - }; - - BaseNode.prototype.append = function append (node) { - this.childNodes.push(node); - node.parent = this; - }; - - BaseNode.prototype.insertAt = function insertAt (node, pos) { - this.childNodes.splice(pos, 0, node); - node.parent = this; - }; - - BaseNode.prototype.remove = function remove (index, count) { - var this$1 = this; - - var end = index + count; - for (var i = index; i < end; i++) { - this$1.childNodes[i].removeSelf(); - } - this.childNodes.splice(index, count); - }; - - BaseNode.prototype.removeSelf = function removeSelf () { - this.clear(); - this.destroy(); - }; - - BaseNode.prototype.clear = function clear () { - this.remove(0, this.childNodes.length); - }; - - BaseNode.prototype.invalidate = function invalidate () { - if (this.parent) { - this.parent.invalidate(); - } - }; - - BaseNode.prototype.geometryChange = function geometryChange () { - this.invalidate(); - }; - - BaseNode.prototype.optionsChange = function optionsChange () { - this.invalidate(); - }; - - BaseNode.prototype.childrenChange = function childrenChange (e) { - if (e.action === "add") { - this.load(e.items, e.index); - } else if (e.action === "remove") { - this.remove(e.index, e.items.length); - } - - this.invalidate(); - }; - - return BaseNode; -}(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* Class */])); - -/* harmony default export */ __webpack_exports__["a"] = (BaseNode); -//# sourceMappingURL=base-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/core/constants.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return DASH_ARRAYS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SOLID; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BUTT; }); -var DASH_ARRAYS = { - dot: [ 1.5, 3.5 ], - dash: [ 4, 3.5 ], - longdash: [ 8, 3.5 ], - dashdot: [ 3.5, 3.5, 1.5, 3.5 ], - longdashdot: [ 8, 3.5, 1.5, 3.5 ], - longdashdotdot: [ 8, 3.5, 1.5, 3.5, 1.5, 3.5 ] -}; - -var SOLID = "solid"; -var BUTT = "butt"; - - -//# sourceMappingURL=constants.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/core/options-store.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mixins_observers_mixin__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - -var toString = {}.toString; - -var OptionsStore = (function (Class) { - function OptionsStore(options, prefix) { - var this$1 = this; - if ( prefix === void 0 ) prefix = ""; - - Class.call(this); - - this.prefix = prefix; - - for (var field in options) { - var member = options[field]; - member = this$1._wrap(member, field); - this$1[field] = member; - } - } - - if ( Class ) OptionsStore.__proto__ = Class; - OptionsStore.prototype = Object.create( Class && Class.prototype ); - OptionsStore.prototype.constructor = OptionsStore; - - OptionsStore.prototype.get = function get (field) { - var parts = field.split("."); - var result = this; - - while (parts.length && result) { - var part = parts.shift(); - result = result[part]; - } - - return result; - }; - - OptionsStore.prototype.set = function set (field, value) { - var current = this.get(field); - - if (current !== value) { - this._set(field, this._wrap(value, field)); - this.optionsChange({ - field: this.prefix + field, - value: value - }); - } - }; - - OptionsStore.prototype._set = function _set (field, value) { - var this$1 = this; - - var composite = field.indexOf(".") >= 0; - var parentObj = this; - var fieldName = field; - - if (composite) { - var parts = fieldName.split("."); - var prefix = this.prefix; - - while (parts.length > 1) { - fieldName = parts.shift(); - prefix += fieldName + "."; - - var obj = parentObj[fieldName]; - - if (!obj) { - obj = new OptionsStore({}, prefix); - obj.addObserver(this$1); - parentObj[fieldName] = obj; - } - parentObj = obj; - } - fieldName = parts[0]; - } - - parentObj._clear(fieldName); - parentObj[fieldName] = value; - }; - - OptionsStore.prototype._clear = function _clear (field) { - var current = this[field]; - if (current && current.removeObserver) { - current.removeObserver(this); - } - }; - - OptionsStore.prototype._wrap = function _wrap (object, field) { - var type = toString.call(object); - var wrapped = object; - - if (wrapped !== null && Object(__WEBPACK_IMPORTED_MODULE_2__util__["defined"])(wrapped) && type === "[object Object]") { - if (!(object instanceof OptionsStore) && !(object instanceof Class)) { - wrapped = new OptionsStore(wrapped, this.prefix + field + "."); - } - - wrapped.addObserver(this); - } - - return wrapped; - }; - - return OptionsStore; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -__WEBPACK_IMPORTED_MODULE_0__mixins_observers_mixin__["a" /* default */].extend(OptionsStore.prototype); - -/* harmony default export */ __webpack_exports__["a"] = (OptionsStore); -//# sourceMappingURL=options-store.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/core/surface-factory.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); - - -var SurfaceFactory = (function (Class) { - function SurfaceFactory() { - Class.call(this); - - this._items = []; - } - - if ( Class ) SurfaceFactory.__proto__ = Class; - SurfaceFactory.prototype = Object.create( Class && Class.prototype ); - SurfaceFactory.prototype.constructor = SurfaceFactory; - - SurfaceFactory.prototype.register = function register (name, type, order) { - var items = this._items; - var first = items[0]; - var entry = { - name: name, - type: type, - order: order - }; - - if (!first || order < first.order) { - items.unshift(entry); - } else { - items.push(entry); - } - }; - - SurfaceFactory.prototype.create = function create (element, options) { - var items = this._items; - var match = items[0]; - - if (options && options.type) { - var preferred = options.type.toLowerCase(); - for (var i = 0; i < items.length; i++) { - if (items[i].name === preferred) { - match = items[i]; - break; - } - } - } - - if (match) { - return new match.type(element, options); - } - - Object(__WEBPACK_IMPORTED_MODULE_0__common__["f" /* logToConsole */])( - "Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\n" + - "- The browser does not support SVG and Canvas. User agent: " + (navigator.userAgent)); - }; - - return SurfaceFactory; -}(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* Class */])); - -SurfaceFactory.current = new SurfaceFactory(); - -/* harmony default export */ __webpack_exports__["a"] = (SurfaceFactory); -//# sourceMappingURL=surface-factory.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/core/surface.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shapes_group__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/group.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__surface_factory__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/surface-factory.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - -var events = [ - "click", - "mouseenter", - "mouseleave", - "mousemove", - "resize" -]; - -var Surface = (function (Observable) { - function Surface(element, options) { - Observable.call(this); - - this.options = Object.assign({}, options); - this.element = element; - this.element._kendoExportVisual = this.exportVisual.bind(this); - - this._click = this._handler("click"); - this._mouseenter = this._handler("mouseenter"); - this._mouseleave = this._handler("mouseleave"); - this._mousemove = this._handler("mousemove"); - - this._visual = new __WEBPACK_IMPORTED_MODULE_0__shapes_group__["a" /* default */](); - - Object(__WEBPACK_IMPORTED_MODULE_4__util__["elementSize"])(element, this.options); - - this.bind(events, this.options); - - this._enableTracking(); - } - - if ( Observable ) Surface.__proto__ = Observable; - Surface.prototype = Object.create( Observable && Observable.prototype ); - Surface.prototype.constructor = Surface; - - Surface.prototype.draw = function draw (element) { - this._visual.children.push(element); - }; - - Surface.prototype.clear = function clear () { - this._visual.children = []; - }; - - Surface.prototype.destroy = function destroy () { - this._visual = null; - this.element._kendoExportVisual = null; - this.unbind(); - }; - - Surface.prototype.eventTarget = function eventTarget (e) { - var this$1 = this; - - var domNode = Object(__WEBPACK_IMPORTED_MODULE_4__util__["eventElement"])(e); - var node; - - while (!node && domNode) { - node = domNode._kendoNode; - if (domNode === this$1.element) { - break; - } - - domNode = domNode.parentElement; - } - - if (node) { - return node.srcElement; - } - }; - - Surface.prototype.exportVisual = function exportVisual () { - return this._visual; - }; - - Surface.prototype.getSize = function getSize () { - return Object(__WEBPACK_IMPORTED_MODULE_4__util__["elementSize"])(this.element); - }; - - Surface.prototype.currentSize = function currentSize (size) { - if (size) { - this._size = size; - } else { - return this._size; - } - }; - - Surface.prototype.setSize = function setSize (size) { - Object(__WEBPACK_IMPORTED_MODULE_4__util__["elementSize"])(this.element, size); - - this.currentSize(size); - this._resize(); - }; - - Surface.prototype.resize = function resize (force) { - var size = this.getSize(); - var currentSize = this.currentSize(); - - if (force || (size.width > 0 || size.height > 0) && (!currentSize || size.width !== currentSize.width || size.height !== currentSize.height)) { - this.currentSize(size); - this._resize(size, force); - this.trigger("resize", size); - } - }; - - Surface.prototype.size = function size (value) { - if (!value) { - return this.getSize(); - } - - this.setSize(value); - }; - - Surface.prototype.suspendTracking = function suspendTracking () { - this._suspendedTracking = true; - }; - - Surface.prototype.resumeTracking = function resumeTracking () { - this._suspendedTracking = false; - }; - - Surface.prototype._enableTracking = function _enableTracking () {}; - - Surface.prototype._resize = function _resize () {}; - - Surface.prototype._handler = function _handler (eventName) { - var this$1 = this; - - return function (e) { - var node = this$1.eventTarget(e); - if (node && !this$1._suspendedTracking) { - this$1.trigger(eventName, { - element: node, - originalEvent: e, - type: eventName - }); - } - }; - }; - - Surface.prototype._elementOffset = function _elementOffset () { - var element = this.element; - var ref = Object(__WEBPACK_IMPORTED_MODULE_4__util__["elementStyles"])(element, [ "paddingLeft", "paddingTop" ]); - var paddingLeft = ref.paddingLeft; - var paddingTop = ref.paddingTop; - var ref$1 = Object(__WEBPACK_IMPORTED_MODULE_4__util__["elementOffset"])(element); - var left = ref$1.left; - var top = ref$1.top; - - return { - left: left + parseInt(paddingLeft, 10), - top: top + parseInt(paddingTop, 10) - }; - }; - - Surface.prototype._surfacePoint = function _surfacePoint (e) { - var offset = this._elementOffset(); - var coord = Object(__WEBPACK_IMPORTED_MODULE_4__util__["eventCoordinates"])(e); - var x = coord.x - offset.left; - var y = coord.y - offset.top; - - return new __WEBPACK_IMPORTED_MODULE_1__geometry_point__["a" /* default */](x, y); - }; - - return Surface; -}(__WEBPACK_IMPORTED_MODULE_3__common__["c" /* Observable */])); - -Surface.create = function(element, options) { - return __WEBPACK_IMPORTED_MODULE_2__surface_factory__["a" /* default */].current.create(element, options); -}; - -Surface.support = {}; - -/* harmony default export */ __webpack_exports__["a"] = (Surface); - -//# sourceMappingURL=surface.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/drawing.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shapes__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes.js"); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "Element", function() { return __WEBPACK_IMPORTED_MODULE_0__shapes__["c"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "Circle", function() { return __WEBPACK_IMPORTED_MODULE_0__shapes__["b"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "Arc", function() { return __WEBPACK_IMPORTED_MODULE_0__shapes__["a"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "Path", function() { return __WEBPACK_IMPORTED_MODULE_0__shapes__["h"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "MultiPath", function() { return __WEBPACK_IMPORTED_MODULE_0__shapes__["g"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "Text", function() { return __WEBPACK_IMPORTED_MODULE_0__shapes__["j"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "Image", function() { return __WEBPACK_IMPORTED_MODULE_0__shapes__["e"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "Group", function() { return __WEBPACK_IMPORTED_MODULE_0__shapes__["d"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "Layout", function() { return __WEBPACK_IMPORTED_MODULE_0__shapes__["f"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "Rect", function() { return __WEBPACK_IMPORTED_MODULE_0__shapes__["i"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__alignment__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment.js"); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "align", function() { return __WEBPACK_IMPORTED_MODULE_1__alignment__["a"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "vAlign", function() { return __WEBPACK_IMPORTED_MODULE_1__alignment__["d"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return __WEBPACK_IMPORTED_MODULE_1__alignment__["c"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "vStack", function() { return __WEBPACK_IMPORTED_MODULE_1__alignment__["e"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return __WEBPACK_IMPORTED_MODULE_1__alignment__["g"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "vWrap", function() { return __WEBPACK_IMPORTED_MODULE_1__alignment__["f"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "fit", function() { return __WEBPACK_IMPORTED_MODULE_1__alignment__["b"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__gradients__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/gradients.js"); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "LinearGradient", function() { return __WEBPACK_IMPORTED_MODULE_2__gradients__["c"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "RadialGradient", function() { return __WEBPACK_IMPORTED_MODULE_2__gradients__["d"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "GradientStop", function() { return __WEBPACK_IMPORTED_MODULE_2__gradients__["b"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "Gradient", function() { return __WEBPACK_IMPORTED_MODULE_2__gradients__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__animations__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/animations.js"); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return __WEBPACK_IMPORTED_MODULE_3__animations__["a"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "AnimationFactory", function() { return __WEBPACK_IMPORTED_MODULE_3__animations__["b"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__parsing_path_parser__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/parsing/path-parser.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "PathParser", function() { return __WEBPACK_IMPORTED_MODULE_4__parsing_path_parser__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__core_surface__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/surface.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Surface", function() { return __WEBPACK_IMPORTED_MODULE_5__core_surface__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__core_base_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/base-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BaseNode", function() { return __WEBPACK_IMPORTED_MODULE_6__core_base_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__core_surface_factory__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/surface-factory.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SurfaceFactory", function() { return __WEBPACK_IMPORTED_MODULE_7__core_surface_factory__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__core_options_store__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/options-store.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "OptionsStore", function() { return __WEBPACK_IMPORTED_MODULE_8__core_options_store__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__svg__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__canvas__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__canvas_export_image__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/canvas/export-image.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "exportImage", function() { return __WEBPACK_IMPORTED_MODULE_12__canvas_export_image__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__svg_export_svg__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/export-svg.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "exportSVG", function() { return __WEBPACK_IMPORTED_MODULE_13__svg_export_svg__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__search_quad_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/search/quad-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "QuadNode", function() { return __WEBPACK_IMPORTED_MODULE_14__search_quad_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__search_shapes_quad_tree__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/search/shapes-quad-tree.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ShapesQuadTree", function() { return __WEBPACK_IMPORTED_MODULE_15__search_shapes_quad_tree__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__mixins_observers_mixin__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ObserversMixin", function() { return __WEBPACK_IMPORTED_MODULE_16__mixins_observers_mixin__["a"]; }); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return __WEBPACK_IMPORTED_MODULE_9__svg__; }); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "canvas", function() { return __WEBPACK_IMPORTED_MODULE_10__canvas__; }); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "util", function() { return __WEBPACK_IMPORTED_MODULE_11__util__; }); - - - - - - - - - - - - - - - - - - - - - - - - -//# sourceMappingURL=drawing.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry_circle__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/circle.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Circle", function() { return __WEBPACK_IMPORTED_MODULE_0__geometry_circle__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry_arc__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/arc.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Arc", function() { return __WEBPACK_IMPORTED_MODULE_1__geometry_arc__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__geometry_rect__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/rect.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Rect", function() { return __WEBPACK_IMPORTED_MODULE_2__geometry_rect__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__geometry_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Point", function() { return __WEBPACK_IMPORTED_MODULE_3__geometry_point__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__geometry_segment__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/segment.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Segment", function() { return __WEBPACK_IMPORTED_MODULE_4__geometry_segment__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__geometry_matrix__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/matrix.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Matrix", function() { return __WEBPACK_IMPORTED_MODULE_5__geometry_matrix__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__geometry_size__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/size.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Size", function() { return __WEBPACK_IMPORTED_MODULE_6__geometry_size__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__geometry_to_matrix__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/to-matrix.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "toMatrix", function() { return __WEBPACK_IMPORTED_MODULE_7__geometry_to_matrix__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__geometry_transformation__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/transformation.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Transformation", function() { return __WEBPACK_IMPORTED_MODULE_8__geometry_transformation__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__geometry_transform__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/transform.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "transform", function() { return __WEBPACK_IMPORTED_MODULE_9__geometry_transform__["a"]; }); - - - - - - - - - - - -//# sourceMappingURL=geometry.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/arc.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__accessors_define_accessors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/accessors/define-accessors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_observers_mixin__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__math_close_or_less__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/close-or-less.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__math_line_intersection__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/line-intersection.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__math_ellipse_extreme_angles__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/ellipse-extreme-angles.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__rect__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/rect.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__transform__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/transform.js"); - - - - - - - - - - - - - - -var MAX_INTERVAL = 45; -var pow = Math.pow; - -var Arc = (function (Class) { - function Arc(center, options) { - if ( center === void 0 ) center = new __WEBPACK_IMPORTED_MODULE_8__point__["a" /* default */](); - if ( options === void 0 ) options = {}; - - Class.call(this); - - this.setCenter(center); - - this.radiusX = options.radiusX; - this.radiusY = options.radiusY || options.radiusX; - this.startAngle = options.startAngle; - this.endAngle = options.endAngle; - this.anticlockwise = options.anticlockwise || false; - this.xRotation = options.xRotation; - } - - if ( Class ) Arc.__proto__ = Class; - Arc.prototype = Object.create( Class && Class.prototype ); - Arc.prototype.constructor = Arc; - - Arc.prototype.clone = function clone () { - return new Arc(this.center, { - radiusX: this.radiusX, - radiusY: this.radiusY, - startAngle: this.startAngle, - endAngle: this.endAngle, - anticlockwise: this.anticlockwise - }); - }; - - Arc.prototype.setCenter = function setCenter (value) { - this._observerField("center", __WEBPACK_IMPORTED_MODULE_8__point__["a" /* default */].create(value)); - this.geometryChange(); - return this; - }; - - Arc.prototype.getCenter = function getCenter () { - return this.center; - }; - - Arc.prototype.pointAt = function pointAt (angle) { - var center = this.center; - var radian = Object(__WEBPACK_IMPORTED_MODULE_3__util__["rad"])(angle); - - return new __WEBPACK_IMPORTED_MODULE_8__point__["a" /* default */]( - center.x + this.radiusX * Math.cos(radian), - center.y + this.radiusY * Math.sin(radian) - ); - }; - - Arc.prototype.curvePoints = function curvePoints () { - var this$1 = this; - - var startAngle = this.startAngle; - var dir = this.anticlockwise ? -1 : 1; - var curvePoints = [ this.pointAt(startAngle) ]; - var interval = this._arcInterval(); - var intervalAngle = interval.endAngle - interval.startAngle; - var subIntervalsCount = Math.ceil(intervalAngle / MAX_INTERVAL); - var subIntervalAngle = intervalAngle / subIntervalsCount; - var currentAngle = startAngle; - var transformation; - if (this.xRotation) { - transformation = Object(__WEBPACK_IMPORTED_MODULE_10__transform__["a" /* default */])().rotate(this.xRotation, this.center); - } - - for (var i = 1; i <= subIntervalsCount; i++) { - var nextAngle = currentAngle + dir * subIntervalAngle; - var points = this$1._intervalCurvePoints(currentAngle, nextAngle, transformation); - - curvePoints.push(points.cp1, points.cp2, points.p2); - currentAngle = nextAngle; - } - - return curvePoints; - }; - - Arc.prototype.bbox = function bbox (matrix) { - var this$1 = this; - - var interval = this._arcInterval(); - var startAngle = interval.startAngle; - var endAngle = interval.endAngle; - var extremeAngles = Object(__WEBPACK_IMPORTED_MODULE_6__math_ellipse_extreme_angles__["a" /* default */])(this.center, this.radiusX, this.radiusY, matrix); - var extremeX = Object(__WEBPACK_IMPORTED_MODULE_3__util__["deg"])(extremeAngles.x); - var extremeY = Object(__WEBPACK_IMPORTED_MODULE_3__util__["deg"])(extremeAngles.y); - var endPoint = this.pointAt(endAngle).transformCopy(matrix); - var currentAngleX = bboxStartAngle(extremeX, startAngle); - var currentAngleY = bboxStartAngle(extremeY, startAngle); - var currentPoint = this.pointAt(startAngle).transformCopy(matrix); - var minPoint = __WEBPACK_IMPORTED_MODULE_8__point__["a" /* default */].min(currentPoint, endPoint); - var maxPoint = __WEBPACK_IMPORTED_MODULE_8__point__["a" /* default */].max(currentPoint, endPoint); - - while (currentAngleX < endAngle || currentAngleY < endAngle) { - var currentPointX; - if (currentAngleX < endAngle) { - currentPointX = this$1.pointAt(currentAngleX).transformCopy(matrix); - currentAngleX += 90; - } - - var currentPointY; - if (currentAngleY < endAngle) { - currentPointY = this$1.pointAt(currentAngleY).transformCopy(matrix); - currentAngleY += 90; - } - - currentPoint = new __WEBPACK_IMPORTED_MODULE_8__point__["a" /* default */](currentPointX.x, currentPointY.y); - minPoint = __WEBPACK_IMPORTED_MODULE_8__point__["a" /* default */].min(minPoint, currentPoint); - maxPoint = __WEBPACK_IMPORTED_MODULE_8__point__["a" /* default */].max(maxPoint, currentPoint); - } - - return __WEBPACK_IMPORTED_MODULE_9__rect__["a" /* default */].fromPoints(minPoint, maxPoint); - }; - - Arc.prototype._arcInterval = function _arcInterval () { - var ref = this; - var startAngle = ref.startAngle; - var endAngle = ref.endAngle; - var anticlockwise = ref.anticlockwise; - - if (anticlockwise) { - var oldStart = startAngle; - startAngle = endAngle; - endAngle = oldStart; - } - - if (startAngle > endAngle || (anticlockwise && startAngle === endAngle)) { - endAngle += 360; - } - - return { - startAngle: startAngle, - endAngle: endAngle - }; - }; - - Arc.prototype._intervalCurvePoints = function _intervalCurvePoints (startAngle, endAngle, transformation) { - var p1 = this.pointAt(startAngle); - var p2 = this.pointAt(endAngle); - var p1Derivative = this._derivativeAt(startAngle); - var p2Derivative = this._derivativeAt(endAngle); - var t = (Object(__WEBPACK_IMPORTED_MODULE_3__util__["rad"])(endAngle) - Object(__WEBPACK_IMPORTED_MODULE_3__util__["rad"])(startAngle)) / 3; - var cp1 = new __WEBPACK_IMPORTED_MODULE_8__point__["a" /* default */](p1.x + t * p1Derivative.x, p1.y + t * p1Derivative.y); - var cp2 = new __WEBPACK_IMPORTED_MODULE_8__point__["a" /* default */](p2.x - t * p2Derivative.x, p2.y - t * p2Derivative.y); - if (transformation) { - p1.transform(transformation); - p2.transform(transformation); - cp1.transform(transformation); - cp2.transform(transformation); - } - - return { - p1: p1, - cp1: cp1, - cp2: cp2, - p2: p2 - }; - }; - - Arc.prototype._derivativeAt = function _derivativeAt (angle) { - var radian = Object(__WEBPACK_IMPORTED_MODULE_3__util__["rad"])(angle); - - return new __WEBPACK_IMPORTED_MODULE_8__point__["a" /* default */](-this.radiusX * Math.sin(radian), this.radiusY * Math.cos(radian)); - }; - - Arc.prototype.containsPoint = function containsPoint (point) { - var interval = this._arcInterval(); - var intervalAngle = interval.endAngle - interval.startAngle; - var ref = this; - var center = ref.center; - var radiusX = ref.radiusX; - var radiusY = ref.radiusY; - var distance = center.distanceTo(point); - var angleRad = Math.atan2(point.y - center.y, point.x - center.x); - var pointRadius = (radiusX * radiusY) / - Math.sqrt(pow(radiusX, 2) * pow(Math.sin(angleRad), 2) + pow(radiusY, 2) * pow(Math.cos(angleRad), 2)); - var startPoint = this.pointAt(this.startAngle).round(__WEBPACK_IMPORTED_MODULE_7__constants__["a" /* PRECISION */]); - var endPoint = this.pointAt(this.endAngle).round(__WEBPACK_IMPORTED_MODULE_7__constants__["a" /* PRECISION */]); - var intersection = Object(__WEBPACK_IMPORTED_MODULE_5__math_line_intersection__["a" /* default */])(center, point.round(__WEBPACK_IMPORTED_MODULE_7__constants__["a" /* PRECISION */]), startPoint, endPoint); - var containsPoint; - - if (intervalAngle < 180) { - containsPoint = intersection && Object(__WEBPACK_IMPORTED_MODULE_4__math_close_or_less__["a" /* default */])(center.distanceTo(intersection), distance) && Object(__WEBPACK_IMPORTED_MODULE_4__math_close_or_less__["a" /* default */])(distance, pointRadius); - } else { - var angle = calculateAngle(center.x, center.y, radiusX, radiusY, point.x, point.y); - if (angle !== 360) { - angle = (360 + angle) % 360; - } - - var inAngleRange = interval.startAngle <= angle && angle <= interval.endAngle; - containsPoint = (inAngleRange && Object(__WEBPACK_IMPORTED_MODULE_4__math_close_or_less__["a" /* default */])(distance, pointRadius)) || (!inAngleRange && (!intersection || intersection.equals(point))); - } - return containsPoint; - }; - - Arc.prototype._isOnPath = function _isOnPath (point, width) { - var interval = this._arcInterval(); - var center = this.center; - var angle = calculateAngle(center.x, center.y, this.radiusX, this.radiusY, point.x, point.y); - if (angle !== 360) { - angle = (360 + angle) % 360; - } - - var inAngleRange = interval.startAngle <= angle && angle <= interval.endAngle; - - return inAngleRange && this.pointAt(angle).distanceTo(point) <= width; - }; - - Arc.fromPoints = function fromPoints (start, end, rx, ry, largeArc, swipe, rotation) {// eslint-disable-line max-params - var arcParameters = normalizeArcParameters({ - x1: start.x, - y1: start.y, - x2: end.x, - y2: end.y, - rx: rx, - ry: ry, - largeArc: largeArc, - swipe: swipe, - rotation: rotation - }); - - return new Arc(arcParameters.center, { - startAngle: arcParameters.startAngle, - endAngle: arcParameters.endAngle, - radiusX: arcParameters.radiusX, - radiusY: arcParameters.radiusY, - xRotation: arcParameters.xRotation, - anticlockwise: swipe === 0 - }); - }; - - return Arc; -}(__WEBPACK_IMPORTED_MODULE_2__common__["a" /* Class */])); - -Object(__WEBPACK_IMPORTED_MODULE_0__accessors_define_accessors__["a" /* default */])(Arc.prototype, [ "radiusX", "radiusY", "startAngle", "endAngle", "anticlockwise" ]); -__WEBPACK_IMPORTED_MODULE_1__mixins_observers_mixin__["a" /* default */].extend(Arc.prototype); - -function calculateAngle(cx, cy, rx, ry, x, y) { - var cos = Object(__WEBPACK_IMPORTED_MODULE_3__util__["round"])((x - cx) / rx, 3); - var sin = Object(__WEBPACK_IMPORTED_MODULE_3__util__["round"])((y - cy) / ry, 3); - - return Object(__WEBPACK_IMPORTED_MODULE_3__util__["round"])(Object(__WEBPACK_IMPORTED_MODULE_3__util__["deg"])(Math.atan2(sin, cos))); -} - -function normalizeArcParameters(parameters) { - var x1 = parameters.x1; - var y1 = parameters.y1; - var x2 = parameters.x2; - var y2 = parameters.y2; - var rx = parameters.rx; - var ry = parameters.ry; - var largeArc = parameters.largeArc; - var swipe = parameters.swipe; - var rotation = parameters.rotation; if ( rotation === void 0 ) rotation = 0; - - var radians = Object(__WEBPACK_IMPORTED_MODULE_3__util__["rad"])(rotation); - var cosine = Math.cos(radians); - var sine = Math.sin(radians); - - var xT = cosine * (x1 - x2) / 2 + sine * (y1 - y2) / 2; - var yT = -sine * (x1 - x2) / 2 + cosine * (y1 - y2) / 2; - - var sign = largeArc !== swipe ? 1 : -1; - - var xt2 = Math.pow(xT, 2); - var yt2 = Math.pow(yT, 2); - var rx2 = Math.pow(rx, 2); - var ry2 = Math.pow(ry, 2); - - var delta = xt2 / rx2 + yt2 / ry2; - - if (delta > 1) { - delta = Math.sqrt(xt2 / rx2 + yt2 / ry2); - rx = delta * rx; - rx2 = Math.pow(rx, 2); - - ry = delta * ry; - ry2 = Math.pow(ry, 2); - } - - var constT = sign * Math.sqrt((rx2 * ry2 - rx2 * yt2 - ry2 * xt2) / (rx2 * yt2 + ry2 * xt2)); - // due to rounding errors the value could become NaN even after radii correction - if (isNaN(constT)) { - constT = 0; - } - - var cxT = constT * (rx * yT) / ry; - var cyT = - constT * (ry * xT) / rx; - - var cx = cosine * cxT - sine * cyT + (x1 + x2) / 2; - var cy = sine * cxT + cosine * cyT + (y1 + y2) / 2; - - - var uX = (xT - cxT) / rx; - var uY = (yT - cyT) / ry; - var vX = -(xT + cxT) / rx; - var vY = -(yT + cyT) / ry; - - var startAngle = (uY >= 0 ? 1 : -1) * Object(__WEBPACK_IMPORTED_MODULE_3__util__["deg"])(Math.acos(uX / Math.sqrt(uX * uX + uY * uY))); - - var angleCosine = Object(__WEBPACK_IMPORTED_MODULE_3__util__["round"])((uX * vX + uY * vY) / (Math.sqrt(uX * uX + uY * uY) * Math.sqrt(vX * vX + vY * vY)), 10); - var angle = (uX * vY - uY * vX >= 0 ? 1 : -1) * Object(__WEBPACK_IMPORTED_MODULE_3__util__["deg"])(Math.acos(angleCosine)); - - if (!swipe && angle > 0) { - angle -= 360; - } - - if (swipe && angle < 0) { - angle += 360; - } - var endAngle = startAngle + angle; - var signEndAngle = endAngle >= 0 ? 1 : -1; - endAngle = (Math.abs(endAngle) % 360) * signEndAngle; - - return { - center: new __WEBPACK_IMPORTED_MODULE_8__point__["a" /* default */](cx, cy), - startAngle: startAngle, - endAngle: endAngle, - radiusX: rx, - radiusY: ry, - xRotation: rotation - }; -} - -function bboxStartAngle(angle, start) { - var startAngle = angle; - - while (startAngle < start) { - startAngle += 90; - } - - return startAngle; -} - -/* harmony default export */ __webpack_exports__["a"] = (Arc); - -//# sourceMappingURL=arc.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/circle.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__accessors_define_accessors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/accessors/define-accessors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_observers_mixin__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__rect__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/rect.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__math_ellipse_extreme_angles__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/ellipse-extreme-angles.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - - - -var PI_DIV_2 = Math.PI / 2; - -var Circle = (function (Class) { - function Circle(center, radius) { - if ( center === void 0 ) center = new __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */](); - if ( radius === void 0 ) radius = 0; - - Class.call(this); - - this.setCenter(center); - this.setRadius(radius); - } - - if ( Class ) Circle.__proto__ = Class; - Circle.prototype = Object.create( Class && Class.prototype ); - Circle.prototype.constructor = Circle; - - Circle.prototype.setCenter = function setCenter (value) { - this._observerField("center", __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */].create(value)); - this.geometryChange(); - return this; - }; - - Circle.prototype.getCenter = function getCenter () { - return this.center; - }; - - Circle.prototype.equals = function equals (other) { - return other && - other.center.equals(this.center) && - other.radius === this.radius; - }; - - Circle.prototype.clone = function clone () { - return new Circle(this.center.clone(), this.radius); - }; - - Circle.prototype.pointAt = function pointAt (angle) { - return this._pointAt(Object(__WEBPACK_IMPORTED_MODULE_6__util__["rad"])(angle)); - }; - - Circle.prototype.bbox = function bbox (matrix) { - var this$1 = this; - - var extremeAngles = Object(__WEBPACK_IMPORTED_MODULE_4__math_ellipse_extreme_angles__["a" /* default */])(this.center, this.radius, this.radius, matrix); - var minPoint = __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */].maxPoint(); - var maxPoint = __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */].minPoint(); - - for (var i = 0; i < 4; i++) { - var currentPointX = this$1._pointAt(extremeAngles.x + i * PI_DIV_2).transformCopy(matrix); - var currentPointY = this$1._pointAt(extremeAngles.y + i * PI_DIV_2).transformCopy(matrix); - var currentPoint = new __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */](currentPointX.x, currentPointY.y); - - minPoint = __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */].min(minPoint, currentPoint); - maxPoint = __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */].max(maxPoint, currentPoint); - } - - return __WEBPACK_IMPORTED_MODULE_3__rect__["a" /* default */].fromPoints(minPoint, maxPoint); - }; - - Circle.prototype._pointAt = function _pointAt (angle) { - var ref = this; - var center = ref.center; - var radius = ref.radius; - - return new __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */]( - center.x + radius * Math.cos(angle), - center.y + radius * Math.sin(angle) - ); - }; - - Circle.prototype.containsPoint = function containsPoint (point) { - var ref = this; - var center = ref.center; - var radius = ref.radius; - var inCircle = Math.pow(point.x - center.x, 2) + - Math.pow(point.y - center.y, 2) <= Math.pow(radius, 2); - return inCircle; - }; - - Circle.prototype._isOnPath = function _isOnPath (point, width) { - var ref = this; - var center = ref.center; - var radius = ref.radius; - var pointDistance = center.distanceTo(point); - - return radius - width <= pointDistance && pointDistance <= radius + width; - }; - - return Circle; -}(__WEBPACK_IMPORTED_MODULE_5__common__["a" /* Class */])); - -Object(__WEBPACK_IMPORTED_MODULE_0__accessors_define_accessors__["a" /* default */])(Circle.prototype, [ "radius" ]); -__WEBPACK_IMPORTED_MODULE_1__mixins_observers_mixin__["a" /* default */].extend(Circle.prototype); - -/* harmony default export */ __webpack_exports__["a"] = (Circle); -//# sourceMappingURL=circle.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/constants.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PRECISION; }); -var PRECISION = 10; - - -//# sourceMappingURL=constants.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/math/calculate-curve-at.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = calculateCurveAt; -function calculateCurveAt(t, field, points) { - var t1 = 1 - t; - return Math.pow(t1, 3) * points[0][field] + - 3 * Math.pow(t1, 2) * t * points[1][field] + - 3 * Math.pow(t, 2) * t1 * points[2][field] + - Math.pow(t, 3) * points[3][field]; -} -//# sourceMappingURL=calculate-curve-at.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/math/close-or-less.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = closeOrLess; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__close__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/close.js"); - - -function closeOrLess(a, b, tolerance) { - return a < b || Object(__WEBPACK_IMPORTED_MODULE_0__close__["a" /* default */])(a, b, tolerance); -} -//# sourceMappingURL=close-or-less.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/math/close.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = close; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - -function close(a, b, tolerance) { - if ( tolerance === void 0 ) tolerance = __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* PRECISION */]; - - return Object(__WEBPACK_IMPORTED_MODULE_1__util__["round"])(Math.abs(a - b), tolerance) === 0; -} -//# sourceMappingURL=close.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/math/complex-number.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - -var ComplexNumber = (function (Class) { - function ComplexNumber(real, img) { - if ( real === void 0 ) real = 0; - if ( img === void 0 ) img = 0; - - Class.call(this); - - this.real = real; - this.img = img; - } - - if ( Class ) ComplexNumber.__proto__ = Class; - ComplexNumber.prototype = Object.create( Class && Class.prototype ); - ComplexNumber.prototype.constructor = ComplexNumber; - - ComplexNumber.prototype.add = function add (cNumber) { - return new ComplexNumber(Object(__WEBPACK_IMPORTED_MODULE_2__util__["round"])(this.real + cNumber.real, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* PRECISION */]), Object(__WEBPACK_IMPORTED_MODULE_2__util__["round"])(this.img + cNumber.img, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* PRECISION */])); - }; - - ComplexNumber.prototype.addConstant = function addConstant (value) { - return new ComplexNumber(this.real + value, this.img); - }; - - ComplexNumber.prototype.negate = function negate () { - return new ComplexNumber(-this.real, -this.img); - }; - - ComplexNumber.prototype.multiply = function multiply (cNumber) { - return new ComplexNumber(this.real * cNumber.real - this.img * cNumber.img, - this.real * cNumber.img + this.img * cNumber.real); - }; - - ComplexNumber.prototype.multiplyConstant = function multiplyConstant (value) { - return new ComplexNumber(this.real * value, this.img * value); - }; - - ComplexNumber.prototype.nthRoot = function nthRoot (n) { - var rad = Math.atan2(this.img, this.real); - var r = Math.sqrt(Math.pow(this.img, 2) + Math.pow(this.real, 2)); - var nthR = Math.pow(r, 1 / n); - - return new ComplexNumber(nthR * Math.cos(rad / n), nthR * Math.sin(rad / n)); //Moivre's formula - }; - - ComplexNumber.prototype.equals = function equals (cNumber) { - return this.real === cNumber.real && this.img === cNumber.img; - }; - - ComplexNumber.prototype.isReal = function isReal () { - return this.img === 0; - }; - - return ComplexNumber; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -/* harmony default export */ __webpack_exports__["a"] = (ComplexNumber); -//# sourceMappingURL=complex-number.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/math/curve-intersections-count.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = curveIntersectionsCount; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_cubic_polynomial__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/to-cubic-polynomial.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__solve_cubic_equation__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/solve-cubic-equation.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__calculate_curve_at__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/calculate-curve-at.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__close__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/close.js"); - - - - - -function curveIntersectionsCount(points, point, bbox) { - var polynomial = Object(__WEBPACK_IMPORTED_MODULE_0__to_cubic_polynomial__["a" /* default */])(points, "x"); - var roots = Object(__WEBPACK_IMPORTED_MODULE_1__solve_cubic_equation__["a" /* default */])(polynomial[0], polynomial[1], polynomial[2], polynomial[3] - point.x); - var rayIntersection, intersectsRay; - var count = 0; - for (var i = 0; i < roots.length; i++) { - rayIntersection = Object(__WEBPACK_IMPORTED_MODULE_2__calculate_curve_at__["a" /* default */])(roots[i], "y", points); - intersectsRay = Object(__WEBPACK_IMPORTED_MODULE_3__close__["a" /* default */])(rayIntersection, point.y) || rayIntersection > point.y; - if (intersectsRay && (((roots[i] === 0 || roots[i] === 1) && bbox.bottomRight().x > point.x) || (0 < roots[i] && roots[i] < 1))) { - count++; - } - } - - return count; -} -//# sourceMappingURL=curve-intersections-count.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/math/ellipse-extreme-angles.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = ellipseExtremeAngles; -function ellipseExtremeAngles(center, rx, ry, matrix) { - var extremeX = 0; - var extremeY = 0; - - if (matrix) { - extremeX = Math.atan2(matrix.c * ry, matrix.a * rx); - if (matrix.b !== 0) { - extremeY = Math.atan2(matrix.d * ry, matrix.b * rx); - } - } - - return { - x: extremeX, - y: extremeY - }; -} -//# sourceMappingURL=ellipse-extreme-angles.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/math/has-roots-in-range.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = hasRootsInRange; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_cubic_polynomial__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/to-cubic-polynomial.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__solve_cubic_equation__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/solve-cubic-equation.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__calculate_curve_at__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/calculate-curve-at.js"); - - - - -function hasRootsInRange(points, point, field, rootField, range) { - var polynomial = Object(__WEBPACK_IMPORTED_MODULE_0__to_cubic_polynomial__["a" /* default */])(points, rootField); - var roots = Object(__WEBPACK_IMPORTED_MODULE_1__solve_cubic_equation__["a" /* default */])(polynomial[0], polynomial[1], polynomial[2], polynomial[3] - point[rootField]); - var intersection; - - for (var idx = 0; idx < roots.length; idx++) { - if (0 <= roots[idx] && roots[idx] <= 1) { - intersection = Object(__WEBPACK_IMPORTED_MODULE_2__calculate_curve_at__["a" /* default */])(roots[idx], field, points); - if (Math.abs(intersection - point[field]) <= range) { - return true; - } - } - } -} -//# sourceMappingURL=has-roots-in-range.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/math/is-out-of-end-point.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = isOutOfEndPoint; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__transform__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/transform.js"); - - - -function isOutOfEndPoint(endPoint, controlPoint, point) { - var angle = Object(__WEBPACK_IMPORTED_MODULE_0__util__["deg"])(Math.atan2(controlPoint.y - endPoint.y, controlPoint.x - endPoint.x)); - var rotatedPoint = point.transformCopy(Object(__WEBPACK_IMPORTED_MODULE_1__transform__["a" /* default */])().rotate(-angle, endPoint)); - - return rotatedPoint.x < endPoint.x; -} -//# sourceMappingURL=is-out-of-end-point.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/math/line-intersection.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = lineIntersection; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); - - -function lineIntersection(p0, p1, p2, p3) { - var s1x = p1.x - p0.x; - var s2x = p3.x - p2.x; - var s1y = p1.y - p0.y; - var s2y = p3.y - p2.y; - var nx = p0.x - p2.x; - var ny = p0.y - p2.y; - var d = s1x * s2y - s2x * s1y; - var s = (s1x * ny - s1y * nx) / d; - var t = (s2x * ny - s2y * nx) / d; - - if (s >= 0 && s <= 1 && t >= 0 && t <= 1) { - return new __WEBPACK_IMPORTED_MODULE_0__point__["a" /* default */](p0.x + t * s1x, p0.y + t * s1y); - } -} -//# sourceMappingURL=line-intersection.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/math/line-intersections-count.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = lineIntersectionsCount; -function lineIntersectionsCount(a, b, point) { - var intersects; - if (a.x !== b.x) { - var minX = Math.min(a.x, b.x); - var maxX = Math.max(a.x, b.x); - var minY = Math.min(a.y, b.y); - var maxY = Math.max(a.y, b.y); - var inRange = minX <= point.x && point.x < maxX; - - if (minY === maxY) { - intersects = point.y <= minY && inRange; - } else { - intersects = inRange && (((maxY - minY) * ((a.x - b.x) * (a.y - b.y) > 0 ? point.x - minX : maxX - point.x)) / (maxX - minX) + minY - point.y) >= 0; - } - } - - return intersects ? 1 : 0; -} -//# sourceMappingURL=line-intersections-count.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/math/solve-cubic-equation.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = solveCubicEquation; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__complex_number__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/complex-number.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - -function numberSign(x) { - return x < 0 ? -1 : 1; -} - -function solveQuadraticEquation(a, b, c) { - var squareRoot = Math.sqrt(Math.pow(b, 2) - 4 * a * c); - return [ - (-b + squareRoot) / (2 * a), - (-b - squareRoot) / (2 * a) - ]; -} - -//Cardano's formula -function solveCubicEquation(a, b, c, d) { - if (a === 0) { - return solveQuadraticEquation(b, c, d); - } - - var p = (3 * a * c - Math.pow(b, 2)) / (3 * Math.pow(a, 2)); - var q = (2 * Math.pow(b, 3) - 9 * a * b * c + 27 * Math.pow(a, 2) * d) / (27 * Math.pow(a, 3)); - var Q = Math.pow(p / 3, 3) + Math.pow(q / 2, 2); - var i = new __WEBPACK_IMPORTED_MODULE_0__complex_number__["a" /* default */](0,1); - var b3a = -b / (3 * a); - var x1, x2, y1, y2, y3, z1, z2; - - if (Q < 0) { - x1 = new __WEBPACK_IMPORTED_MODULE_0__complex_number__["a" /* default */](-q / 2, Math.sqrt(-Q)).nthRoot(3); - x2 = new __WEBPACK_IMPORTED_MODULE_0__complex_number__["a" /* default */](-q / 2, - Math.sqrt(-Q)).nthRoot(3); - } else { - x1 = -q / 2 + Math.sqrt(Q); - x1 = new __WEBPACK_IMPORTED_MODULE_0__complex_number__["a" /* default */](numberSign(x1) * Math.pow(Math.abs(x1), 1 / 3)); - x2 = -q / 2 - Math.sqrt(Q); - x2 = new __WEBPACK_IMPORTED_MODULE_0__complex_number__["a" /* default */](numberSign(x2) * Math.pow(Math.abs(x2), 1 / 3)); - } - - y1 = x1.add(x2); - - z1 = x1.add(x2).multiplyConstant(-1 / 2); - z2 = x1.add(x2.negate()).multiplyConstant(Math.sqrt(3) / 2); - - y2 = z1.add(i.multiply(z2)); - y3 = z1.add(i.negate().multiply(z2)); - - var result = []; - - if (y1.isReal()) { - result.push(Object(__WEBPACK_IMPORTED_MODULE_2__util__["round"])(y1.real + b3a, __WEBPACK_IMPORTED_MODULE_1__constants__["a" /* PRECISION */])); - } - if (y2.isReal()) { - result.push(Object(__WEBPACK_IMPORTED_MODULE_2__util__["round"])(y2.real + b3a, __WEBPACK_IMPORTED_MODULE_1__constants__["a" /* PRECISION */])); - } - if (y3.isReal()) { - result.push(Object(__WEBPACK_IMPORTED_MODULE_2__util__["round"])(y3.real + b3a, __WEBPACK_IMPORTED_MODULE_1__constants__["a" /* PRECISION */])); - } - - return result; -} -//# sourceMappingURL=solve-cubic-equation.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/math/to-cubic-polynomial.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = toCubicPolynomial; -function toCubicPolynomial(points, field) { - return [ -points[0][field] + 3 * points[1][field] - 3 * points[2][field] + points[3][field], - 3 * (points[0][field] - 2 * points[1][field] + points[2][field]), - 3 * (-points[0][field] + points[1][field]), - points[0][field] - ]; -} -//# sourceMappingURL=to-cubic-polynomial.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/matrix.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - -var Matrix = (function (Class) { - function Matrix(a, b, c, d, e, f) { - if ( a === void 0 ) a = 0; - if ( b === void 0 ) b = 0; - if ( c === void 0 ) c = 0; - if ( d === void 0 ) d = 0; - if ( e === void 0 ) e = 0; - if ( f === void 0 ) f = 0; - - Class.call(this); - - this.a = a; - this.b = b; - this.c = c; - this.d = d; - this.e = e; - this.f = f; - } - - if ( Class ) Matrix.__proto__ = Class; - Matrix.prototype = Object.create( Class && Class.prototype ); - Matrix.prototype.constructor = Matrix; - - Matrix.prototype.multiplyCopy = function multiplyCopy (matrix) { - return new Matrix( - this.a * matrix.a + this.c * matrix.b, - this.b * matrix.a + this.d * matrix.b, - this.a * matrix.c + this.c * matrix.d, - this.b * matrix.c + this.d * matrix.d, - this.a * matrix.e + this.c * matrix.f + this.e, - this.b * matrix.e + this.d * matrix.f + this.f - ); - }; - - Matrix.prototype.invert = function invert () { - var ref = this; - var a = ref.a; - var b = ref.b; - var d = ref.c; - var e = ref.d; - var g = ref.e; - var h = ref.f; - var det = a * e - b * d; - - if (det === 0) { - return null; - } - - return new Matrix(e / det, -b / det, -d / det, a / det, - (d * h - e * g) / det, (b * g - a * h) / det); - }; - - Matrix.prototype.clone = function clone () { - return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f); - }; - - Matrix.prototype.equals = function equals (other) { - if (!other) { - return false; - } - - return this.a === other.a && this.b === other.b && - this.c === other.c && this.d === other.d && - this.e === other.e && this.f === other.f; - }; - - Matrix.prototype.round = function round$1 (precision) { - this.a = Object(__WEBPACK_IMPORTED_MODULE_1__util__["round"])(this.a, precision); - this.b = Object(__WEBPACK_IMPORTED_MODULE_1__util__["round"])(this.b, precision); - this.c = Object(__WEBPACK_IMPORTED_MODULE_1__util__["round"])(this.c, precision); - this.d = Object(__WEBPACK_IMPORTED_MODULE_1__util__["round"])(this.d, precision); - this.e = Object(__WEBPACK_IMPORTED_MODULE_1__util__["round"])(this.e, precision); - this.f = Object(__WEBPACK_IMPORTED_MODULE_1__util__["round"])(this.f, precision); - - return this; - }; - - Matrix.prototype.toArray = function toArray (precision) { - var result = [ this.a, this.b, this.c, this.d, this.e, this.f ]; - - if (Object(__WEBPACK_IMPORTED_MODULE_1__util__["defined"])(precision)) { - for (var i = 0; i < result.length; i++) { - result[i] = Object(__WEBPACK_IMPORTED_MODULE_1__util__["round"])(result[i], precision); - } - } - - return result; - }; - - Matrix.prototype.toString = function toString (precision, separator) { - if ( separator === void 0 ) separator = ","; - - return this.toArray(precision).join(separator); - }; - - Matrix.translate = function translate (x, y) { - return new Matrix(1, 0, 0, 1, x, y); - }; - - Matrix.unit = function unit () { - return new Matrix(1, 0, 0, 1, 0, 0); - }; - - Matrix.rotate = function rotate (angle, x, y) { - var matrix = new Matrix(); - matrix.a = Math.cos(Object(__WEBPACK_IMPORTED_MODULE_1__util__["rad"])(angle)); - matrix.b = Math.sin(Object(__WEBPACK_IMPORTED_MODULE_1__util__["rad"])(angle)); - matrix.c = -matrix.b; - matrix.d = matrix.a; - matrix.e = (x - x * matrix.a + y * matrix.b) || 0; - matrix.f = (y - y * matrix.a - x * matrix.b) || 0; - - return matrix; - }; - - Matrix.scale = function scale (scaleX, scaleY) { - return new Matrix(scaleX, 0, 0, scaleY, 0, 0); - }; - - return Matrix; -}(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* Class */])); - -Matrix.IDENTITY = Matrix.unit(); - -/* harmony default export */ __webpack_exports__["a"] = (Matrix); -//# sourceMappingURL=matrix.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/point.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__accessors_define_accessors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/accessors/define-accessors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_observers_mixin__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matrix__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/matrix.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__to_matrix__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/to-matrix.js"); - - - - - - - -var Point = (function (Class) { - function Point(x, y) { - Class.call(this); - - this.x = x || 0; - this.y = y || 0; - } - - if ( Class ) Point.__proto__ = Class; - Point.prototype = Object.create( Class && Class.prototype ); - Point.prototype.constructor = Point; - - var staticAccessors = { ZERO: {} }; - - Point.prototype.equals = function equals (other) { - return other && other.x === this.x && other.y === this.y; - }; - - Point.prototype.clone = function clone () { - return new Point(this.x, this.y); - }; - - Point.prototype.rotate = function rotate (angle, origin) { - var originPoint = Point.create(origin) || Point.ZERO; - - return this.transform(__WEBPACK_IMPORTED_MODULE_4__matrix__["a" /* default */].rotate(angle, originPoint.x, originPoint.y)); - }; - - Point.prototype.translate = function translate (x, y) { - this.x += x; - this.y += y; - - this.geometryChange(); - - return this; - }; - - Point.prototype.translateWith = function translateWith (point) { - return this.translate(point.x, point.y); - }; - - Point.prototype.move = function move (x, y) { - this.x = this.y = 0; - return this.translate(x, y); - }; - - Point.prototype.scale = function scale (scaleX, scaleY) { - if ( scaleY === void 0 ) scaleY = scaleX; - - this.x *= scaleX; - this.y *= scaleY; - - this.geometryChange(); - - return this; - }; - - Point.prototype.scaleCopy = function scaleCopy (scaleX, scaleY) { - return this.clone().scale(scaleX, scaleY); - }; - - Point.prototype.transform = function transform (transformation) { - var matrix = Object(__WEBPACK_IMPORTED_MODULE_5__to_matrix__["a" /* default */])(transformation); - var ref = this; - var x = ref.x; - var y = ref.y; - - this.x = matrix.a * x + matrix.c * y + matrix.e; - this.y = matrix.b * x + matrix.d * y + matrix.f; - - this.geometryChange(); - - return this; - }; - - Point.prototype.transformCopy = function transformCopy (transformation) { - var point = this.clone(); - - if (transformation) { - point.transform(transformation); - } - - return point; - }; - - Point.prototype.distanceTo = function distanceTo (point) { - var dx = this.x - point.x; - var dy = this.y - point.y; - - return Math.sqrt(dx * dx + dy * dy); - }; - - Point.prototype.round = function round$1 (digits) { - this.x = Object(__WEBPACK_IMPORTED_MODULE_3__util__["round"])(this.x, digits); - this.y = Object(__WEBPACK_IMPORTED_MODULE_3__util__["round"])(this.y, digits); - - this.geometryChange(); - - return this; - }; - - Point.prototype.toArray = function toArray (digits) { - var doRound = Object(__WEBPACK_IMPORTED_MODULE_3__util__["defined"])(digits); - var x = doRound ? Object(__WEBPACK_IMPORTED_MODULE_3__util__["round"])(this.x, digits) : this.x; - var y = doRound ? Object(__WEBPACK_IMPORTED_MODULE_3__util__["round"])(this.y, digits) : this.y; - - return [ x, y ]; - }; - - Point.prototype.toString = function toString (digits, separator) { - if ( separator === void 0 ) separator = " "; - - var ref = this; - var x = ref.x; - var y = ref.y; - - if (Object(__WEBPACK_IMPORTED_MODULE_3__util__["defined"])(digits)) { - x = Object(__WEBPACK_IMPORTED_MODULE_3__util__["round"])(x, digits); - y = Object(__WEBPACK_IMPORTED_MODULE_3__util__["round"])(y, digits); - } - - return x + separator + y; - }; - - Point.create = function create (arg0, arg1) { - if (Object(__WEBPACK_IMPORTED_MODULE_3__util__["defined"])(arg0)) { - if (arg0 instanceof Point) { - return arg0; - } else if (arguments.length === 1 && arg0.length === 2) { - return new Point(arg0[0], arg0[1]); - } - - return new Point(arg0, arg1); - } - }; - - Point.min = function min () { - var arguments$1 = arguments; - - var minX = __WEBPACK_IMPORTED_MODULE_3__util__["MAX_NUM"]; - var minY = __WEBPACK_IMPORTED_MODULE_3__util__["MAX_NUM"]; - - for (var i = 0; i < arguments.length; i++) { - var point = arguments$1[i]; - minX = Math.min(point.x, minX); - minY = Math.min(point.y, minY); - } - - return new Point(minX, minY); - }; - - Point.max = function max () { - var arguments$1 = arguments; - - var maxX = __WEBPACK_IMPORTED_MODULE_3__util__["MIN_NUM"]; - var maxY = __WEBPACK_IMPORTED_MODULE_3__util__["MIN_NUM"]; - - for (var i = 0; i < arguments.length; i++) { - var point = arguments$1[i]; - maxX = Math.max(point.x, maxX); - maxY = Math.max(point.y, maxY); - } - - return new Point(maxX, maxY); - }; - - Point.minPoint = function minPoint () { - return new Point(__WEBPACK_IMPORTED_MODULE_3__util__["MIN_NUM"], __WEBPACK_IMPORTED_MODULE_3__util__["MIN_NUM"]); - }; - - Point.maxPoint = function maxPoint () { - return new Point(__WEBPACK_IMPORTED_MODULE_3__util__["MAX_NUM"], __WEBPACK_IMPORTED_MODULE_3__util__["MAX_NUM"]); - }; - - staticAccessors.ZERO.get = function () { - return new Point(0, 0); - }; - - Object.defineProperties( Point, staticAccessors ); - - return Point; -}(__WEBPACK_IMPORTED_MODULE_2__common__["a" /* Class */])); - -Object(__WEBPACK_IMPORTED_MODULE_0__accessors_define_accessors__["a" /* default */])(Point.prototype, [ "x", "y" ]); -__WEBPACK_IMPORTED_MODULE_1__mixins_observers_mixin__["a" /* default */].extend(Point.prototype); - -/* harmony default export */ __webpack_exports__["a"] = (Point); - -//# sourceMappingURL=point.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/rect.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mixins_observers_mixin__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__size__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/size.js"); - - - - - -var Rect = (function (Class) { - function Rect(origin, size) { - if ( origin === void 0 ) origin = new __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */](); - if ( size === void 0 ) size = new __WEBPACK_IMPORTED_MODULE_3__size__["a" /* default */](); - - Class.call(this); - - this.setOrigin(origin); - this.setSize(size); - } - - if ( Class ) Rect.__proto__ = Class; - Rect.prototype = Object.create( Class && Class.prototype ); - Rect.prototype.constructor = Rect; - - Rect.prototype.clone = function clone () { - return new Rect( - this.origin.clone(), - this.size.clone() - ); - }; - - Rect.prototype.equals = function equals (other) { - return other && - other.origin.equals(this.origin) && - other.size.equals(this.size); - }; - - Rect.prototype.setOrigin = function setOrigin (value) { - this._observerField("origin", __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */].create(value)); - this.geometryChange(); - return this; - }; - - Rect.prototype.getOrigin = function getOrigin () { - return this.origin; - }; - - Rect.prototype.setSize = function setSize (value) { - this._observerField("size", __WEBPACK_IMPORTED_MODULE_3__size__["a" /* default */].create(value)); - this.geometryChange(); - return this; - }; - - Rect.prototype.getSize = function getSize () { - return this.size; - }; - - Rect.prototype.width = function width () { - return this.size.width; - }; - - Rect.prototype.height = function height () { - return this.size.height; - }; - - Rect.prototype.topLeft = function topLeft () { - return this.origin.clone(); - }; - - Rect.prototype.bottomRight = function bottomRight () { - return this.origin.clone().translate(this.width(), this.height()); - }; - - Rect.prototype.topRight = function topRight () { - return this.origin.clone().translate(this.width(), 0); - }; - - Rect.prototype.bottomLeft = function bottomLeft () { - return this.origin.clone().translate(0, this.height()); - }; - - Rect.prototype.center = function center () { - return this.origin.clone().translate(this.width() / 2, this.height() / 2); - }; - - Rect.prototype.bbox = function bbox (matrix) { - var tl = this.topLeft().transformCopy(matrix); - var tr = this.topRight().transformCopy(matrix); - var br = this.bottomRight().transformCopy(matrix); - var bl = this.bottomLeft().transformCopy(matrix); - - return Rect.fromPoints(tl, tr, br, bl); - }; - - Rect.prototype.transformCopy = function transformCopy (m) { - return Rect.fromPoints( - this.topLeft().transform(m), - this.bottomRight().transform(m) - ); - }; - - Rect.prototype.expand = function expand (x, y) { - if ( y === void 0 ) y = x; - - - this.size.width += 2 * x; - this.size.height += 2 * y; - - this.origin.translate(-x, -y); - - return this; - }; - - Rect.prototype.expandCopy = function expandCopy (x, y) { - return this.clone().expand(x, y); - }; - - Rect.prototype.containsPoint = function containsPoint (point) { - var origin = this.origin; - var bottomRight = this.bottomRight(); - return !(point.x < origin.x || point.y < origin.y || bottomRight.x < point.x || bottomRight.y < point.y); - }; - - Rect.prototype._isOnPath = function _isOnPath (point, width) { - var rectOuter = this.expandCopy(width, width); - var rectInner = this.expandCopy(-width, -width); - - return rectOuter.containsPoint(point) && !rectInner.containsPoint(point); - }; - - Rect.fromPoints = function fromPoints () { - var topLeft = __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */].min.apply(null, arguments); - var bottomRight = __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */].max.apply(null, arguments); - var size = new __WEBPACK_IMPORTED_MODULE_3__size__["a" /* default */]( - bottomRight.x - topLeft.x, - bottomRight.y - topLeft.y - ); - - return new Rect(topLeft, size); - }; - - Rect.union = function union (a, b) { - return Rect.fromPoints( - __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */].min(a.topLeft(), b.topLeft()), - __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */].max(a.bottomRight(), b.bottomRight()) - ); - }; - - Rect.intersect = function intersect (a, b) { - var rect1 = { - left: a.topLeft().x, - top: a.topLeft().y, - right: a.bottomRight().x, - bottom: a.bottomRight().y - }; - - var rect2 = { - left: b.topLeft().x, - top: b.topLeft().y, - right: b.bottomRight().x, - bottom: b.bottomRight().y - }; - - if (rect1.left <= rect2.right && - rect2.left <= rect1.right && - rect1.top <= rect2.bottom && - rect2.top <= rect1.bottom) { - return Rect.fromPoints( - new __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */](Math.max(rect1.left, rect2.left), Math.max(rect1.top, rect2.top)), - new __WEBPACK_IMPORTED_MODULE_2__point__["a" /* default */](Math.min(rect1.right, rect2.right), Math.min(rect1.bottom, rect2.bottom)) - ); - } - }; - - return Rect; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -__WEBPACK_IMPORTED_MODULE_0__mixins_observers_mixin__["a" /* default */].extend(Rect.prototype); - -/* harmony default export */ __webpack_exports__["a"] = (Rect); -//# sourceMappingURL=rect.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/segment.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mixins_observers_mixin__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__accessors_define_point_accessors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/accessors/define-point-accessors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__rect__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/rect.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__transform__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/transform.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__math_is_out_of_end_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/is-out-of-end-point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__math_calculate_curve_at__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/calculate-curve-at.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__math_has_roots_in_range__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/has-roots-in-range.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__math_curve_intersections_count__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/curve-intersections-count.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__math_line_intersections_count__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/line-intersections-count.js"); - - - - - - - - - - - - - -var Segment = (function (Class) { - function Segment(anchor, controlIn, controlOut) { - Class.call(this); - - this.anchor(anchor || new __WEBPACK_IMPORTED_MODULE_4__point__["a" /* default */]()); - this.controlIn(controlIn); - this.controlOut(controlOut); - } - - if ( Class ) Segment.__proto__ = Class; - Segment.prototype = Object.create( Class && Class.prototype ); - Segment.prototype.constructor = Segment; - - Segment.prototype.bboxTo = function bboxTo (toSegment, matrix) { - var segmentAnchor = this.anchor().transformCopy(matrix); - var toSegmentAnchor = toSegment.anchor().transformCopy(matrix); - var rect; - - if (this.controlOut() && toSegment.controlIn()) { - rect = this._curveBoundingBox( - segmentAnchor, this.controlOut().transformCopy(matrix), - toSegment.controlIn().transformCopy(matrix), toSegmentAnchor - ); - } else { - rect = this._lineBoundingBox(segmentAnchor, toSegmentAnchor); - } - - return rect; - }; - - Segment.prototype._lineBoundingBox = function _lineBoundingBox (p1, p2) { - return __WEBPACK_IMPORTED_MODULE_3__rect__["a" /* default */].fromPoints(p1, p2); - }; - - Segment.prototype._curveBoundingBox = function _curveBoundingBox (p1, cp1, cp2, p2) { - var points = [ p1, cp1, cp2, p2 ]; - var extremesX = this._curveExtremesFor(points, "x"); - var extremesY = this._curveExtremesFor(points, "y"); - var xLimits = arrayLimits([ extremesX.min, extremesX.max, p1.x, p2.x ]); - var yLimits = arrayLimits([ extremesY.min, extremesY.max, p1.y, p2.y ]); - - return __WEBPACK_IMPORTED_MODULE_3__rect__["a" /* default */].fromPoints(new __WEBPACK_IMPORTED_MODULE_4__point__["a" /* default */](xLimits.min, yLimits.min), new __WEBPACK_IMPORTED_MODULE_4__point__["a" /* default */](xLimits.max, yLimits.max)); - }; - - Segment.prototype._curveExtremesFor = function _curveExtremesFor (points, field) { - var extremes = this._curveExtremes( - points[0][field], points[1][field], - points[2][field], points[3][field] - ); - - return { - min: Object(__WEBPACK_IMPORTED_MODULE_8__math_calculate_curve_at__["a" /* default */])(extremes.min, field, points), - max: Object(__WEBPACK_IMPORTED_MODULE_8__math_calculate_curve_at__["a" /* default */])(extremes.max, field, points) - }; - }; - - Segment.prototype._curveExtremes = function _curveExtremes (x1, x2, x3, x4) { - var a = x1 - 3 * x2 + 3 * x3 - x4; - var b = - 2 * (x1 - 2 * x2 + x3); - var c = x1 - x2; - var sqrt = Math.sqrt(b * b - 4 * a * c); - var t1 = 0; - var t2 = 1; - - if (a === 0) { - if (b !== 0) { - t1 = t2 = -c / b; - } - } else if (!isNaN(sqrt)) { - t1 = (- b + sqrt) / (2 * a); - t2 = (- b - sqrt) / (2 * a); - } - - var min = Math.max(Math.min(t1, t2), 0); - if (min < 0 || min > 1) { - min = 0; - } - - var max = Math.min(Math.max(t1, t2), 1); - if (max > 1 || max < 0) { - max = 1; - } - - return { - min: min, - max: max - }; - }; - - Segment.prototype._intersectionsTo = function _intersectionsTo (segment, point) { - var intersectionsCount; - if (this.controlOut() && segment.controlIn()) { - intersectionsCount = Object(__WEBPACK_IMPORTED_MODULE_10__math_curve_intersections_count__["a" /* default */])([ this.anchor(), this.controlOut(), segment.controlIn(), segment.anchor() ], point, this.bboxTo(segment)); - } else { - intersectionsCount = Object(__WEBPACK_IMPORTED_MODULE_11__math_line_intersections_count__["a" /* default */])(this.anchor(), segment.anchor(), point); - } - return intersectionsCount; - }; - - Segment.prototype._isOnCurveTo = function _isOnCurveTo (segment, point, width, endSegment) { - var bbox = this.bboxTo(segment).expand(width, width); - if (bbox.containsPoint(point)) { - var p1 = this.anchor(); - var p2 = this.controlOut(); - var p3 = segment.controlIn(); - var p4 = segment.anchor(); - - if (endSegment === "start" && p1.distanceTo(point) <= width) { - return !Object(__WEBPACK_IMPORTED_MODULE_7__math_is_out_of_end_point__["a" /* default */])(p1, p2, point); - } else if (endSegment === "end" && p4.distanceTo(point) <= width) { - return !Object(__WEBPACK_IMPORTED_MODULE_7__math_is_out_of_end_point__["a" /* default */])(p4, p3, point); - } - - //the approach is not entirely correct but is close and the alternatives are solving a 6th degree polynomial or testing the segment points - var points = [ p1, p2, p3, p4 ]; - if (Object(__WEBPACK_IMPORTED_MODULE_9__math_has_roots_in_range__["a" /* default */])(points, point, "x", "y", width) || Object(__WEBPACK_IMPORTED_MODULE_9__math_has_roots_in_range__["a" /* default */])(points, point, "y", "x", width)) { - return true; - } - var rotation = Object(__WEBPACK_IMPORTED_MODULE_5__transform__["a" /* default */])().rotate(45, point); - var rotatedPoints = [ p1.transformCopy(rotation), p2.transformCopy(rotation), p3.transformCopy(rotation), p4.transformCopy(rotation) ]; - return Object(__WEBPACK_IMPORTED_MODULE_9__math_has_roots_in_range__["a" /* default */])(rotatedPoints, point, "x", "y", width) || Object(__WEBPACK_IMPORTED_MODULE_9__math_has_roots_in_range__["a" /* default */])(rotatedPoints, point, "y", "x", width); - } - }; - - Segment.prototype._isOnLineTo = function _isOnLineTo (segment, point, width) { - var p1 = this.anchor(); - var p2 = segment.anchor(); - var angle = Object(__WEBPACK_IMPORTED_MODULE_6__util__["deg"])(Math.atan2(p2.y - p1.y, p2.x - p1.x)); - var rect = new __WEBPACK_IMPORTED_MODULE_3__rect__["a" /* default */]([ p1.x, p1.y - width / 2 ], [ p1.distanceTo(p2), width ]); - return rect.containsPoint(point.transformCopy(Object(__WEBPACK_IMPORTED_MODULE_5__transform__["a" /* default */])().rotate(-angle, p1))); - }; - - Segment.prototype._isOnPathTo = function _isOnPathTo (segment, point, width, endSegment) { - var isOnPath; - if (this.controlOut() && segment.controlIn()) { - isOnPath = this._isOnCurveTo(segment, point, width / 2, endSegment); - } else { - isOnPath = this._isOnLineTo(segment, point, width); - } - return isOnPath; - }; - - return Segment; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -Object(__WEBPACK_IMPORTED_MODULE_2__accessors_define_point_accessors__["a" /* default */])(Segment.prototype, [ "anchor", "controlIn", "controlOut" ]); -__WEBPACK_IMPORTED_MODULE_0__mixins_observers_mixin__["a" /* default */].extend(Segment.prototype); - -function arrayLimits(arr) { - var length = arr.length; - var min = __WEBPACK_IMPORTED_MODULE_6__util__["MAX_NUM"]; - var max = __WEBPACK_IMPORTED_MODULE_6__util__["MIN_NUM"]; - - for (var i = 0; i < length; i ++) { - max = Math.max(max, arr[i]); - min = Math.min(min, arr[i]); - } - - return { - min: min, - max: max - }; -} - -/* harmony default export */ __webpack_exports__["a"] = (Segment); -//# sourceMappingURL=segment.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/size.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__accessors_define_accessors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/accessors/define-accessors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_observers_mixin__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - -var Size = (function (Class) { - function Size(width, height) { - Class.call(this); - - this.width = width || 0; - this.height = height || 0; - } - - if ( Class ) Size.__proto__ = Class; - Size.prototype = Object.create( Class && Class.prototype ); - Size.prototype.constructor = Size; - - var staticAccessors = { ZERO: {} }; - - Size.prototype.equals = function equals (other) { - return other && other.width === this.width && other.height === this.height; - }; - - Size.prototype.clone = function clone () { - return new Size(this.width, this.height); - }; - - Size.prototype.toArray = function toArray (digits) { - var doRound = Object(__WEBPACK_IMPORTED_MODULE_3__util__["defined"])(digits); - var width = doRound ? Object(__WEBPACK_IMPORTED_MODULE_3__util__["round"])(this.width, digits) : this.width; - var height = doRound ? Object(__WEBPACK_IMPORTED_MODULE_3__util__["round"])(this.height, digits) : this.height; - - return [ width, height ]; - }; - - Size.create = function create (arg0, arg1) { - if (Object(__WEBPACK_IMPORTED_MODULE_3__util__["defined"])(arg0)) { - if (arg0 instanceof Size) { - return arg0; - } else if (arguments.length === 1 && arg0.length === 2) { - return new Size(arg0[0], arg0[1]); - } - - return new Size(arg0, arg1); - } - }; - - staticAccessors.ZERO.get = function () { - return new Size(0, 0); - }; - - Object.defineProperties( Size, staticAccessors ); - - return Size; -}(__WEBPACK_IMPORTED_MODULE_2__common__["a" /* Class */])); - -Object(__WEBPACK_IMPORTED_MODULE_0__accessors_define_accessors__["a" /* default */])(Size.prototype, [ "width", "height" ]); -__WEBPACK_IMPORTED_MODULE_1__mixins_observers_mixin__["a" /* default */].extend(Size.prototype); - -/* harmony default export */ __webpack_exports__["a"] = (Size); -//# sourceMappingURL=size.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/to-matrix.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = toMatrix; -function toMatrix(transformation) { - if (transformation && typeof transformation.matrix === "function") { - return transformation.matrix(); - } - - return transformation; -} -//# sourceMappingURL=to-matrix.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/transform.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = transform; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__transformation__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/transformation.js"); - - -function transform(matrix) { - if (matrix === null) { - return null; - } - - if (matrix instanceof __WEBPACK_IMPORTED_MODULE_0__transformation__["a" /* default */]) { - return matrix; - } - - return new __WEBPACK_IMPORTED_MODULE_0__transformation__["a" /* default */](matrix); -} -//# sourceMappingURL=transform.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/geometry/transformation.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mixins_observers_mixin__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__to_matrix__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/to-matrix.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__matrix__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/matrix.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); - - - - - - -var Transformation = (function (Class) { - function Transformation(matrix) { - if ( matrix === void 0 ) matrix = __WEBPACK_IMPORTED_MODULE_3__matrix__["a" /* default */].unit(); - - Class.call(this); - - this._matrix = matrix; - } - - if ( Class ) Transformation.__proto__ = Class; - Transformation.prototype = Object.create( Class && Class.prototype ); - Transformation.prototype.constructor = Transformation; - - Transformation.prototype.clone = function clone () { - return new Transformation( - this._matrix.clone() - ); - }; - - Transformation.prototype.equals = function equals (other) { - return other && - other._matrix.equals(this._matrix); - }; - - Transformation.prototype.translate = function translate (x, y) { - this._matrix = this._matrix.multiplyCopy(__WEBPACK_IMPORTED_MODULE_3__matrix__["a" /* default */].translate(x, y)); - - this._optionsChange(); - return this; - }; - - Transformation.prototype.scale = function scale (scaleX, scaleY, origin) { - if ( scaleY === void 0 ) scaleY = scaleX; - if ( origin === void 0 ) origin = null; - - var originPoint = origin; - - if (originPoint) { - originPoint = __WEBPACK_IMPORTED_MODULE_4__point__["a" /* default */].create(originPoint); - this._matrix = this._matrix.multiplyCopy(__WEBPACK_IMPORTED_MODULE_3__matrix__["a" /* default */].translate(originPoint.x, originPoint.y)); - } - - this._matrix = this._matrix.multiplyCopy(__WEBPACK_IMPORTED_MODULE_3__matrix__["a" /* default */].scale(scaleX, scaleY)); - - if (originPoint) { - this._matrix = this._matrix.multiplyCopy(__WEBPACK_IMPORTED_MODULE_3__matrix__["a" /* default */].translate(-originPoint.x, -originPoint.y)); - } - - this._optionsChange(); - return this; - }; - - Transformation.prototype.rotate = function rotate (angle, origin) { - var originPoint = __WEBPACK_IMPORTED_MODULE_4__point__["a" /* default */].create(origin) || __WEBPACK_IMPORTED_MODULE_4__point__["a" /* default */].ZERO; - - this._matrix = this._matrix.multiplyCopy(__WEBPACK_IMPORTED_MODULE_3__matrix__["a" /* default */].rotate(angle, originPoint.x, originPoint.y)); - - this._optionsChange(); - return this; - }; - - Transformation.prototype.multiply = function multiply (transformation) { - var matrix = Object(__WEBPACK_IMPORTED_MODULE_2__to_matrix__["a" /* default */])(transformation); - - this._matrix = this._matrix.multiplyCopy(matrix); - - this._optionsChange(); - return this; - }; - - Transformation.prototype.matrix = function matrix (value) { - if (value) { - this._matrix = value; - this._optionsChange(); - return this; - } - - return this._matrix; - }; - - Transformation.prototype._optionsChange = function _optionsChange () { - this.optionsChange({ - field: "transform", - value: this - }); - }; - - return Transformation; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -__WEBPACK_IMPORTED_MODULE_0__mixins_observers_mixin__["a" /* default */].extend(Transformation.prototype); - -/* harmony default export */ __webpack_exports__["a"] = (Transformation); - -//# sourceMappingURL=transformation.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/gradients.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gradients_linear_gradient__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/gradients/linear-gradient.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__gradients_linear_gradient__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__gradients_radial_gradient__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/gradients/radial-gradient.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_1__gradients_radial_gradient__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__gradients_gradient_stop__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/gradients/gradient-stop.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__gradients_gradient_stop__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__gradients_gradient__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/gradients/gradient.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_3__gradients_gradient__["a"]; }); - - - - -//# sourceMappingURL=gradients.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/gradients/gradient-stop.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__accessors_define_options_accessors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/accessors/define-options-accessors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_options_store__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/options-store.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_observers_mixin__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - -var GradientStop = (function (Class) { - function GradientStop(offset, color, opacity) { - Class.call(this); - - this.options = new __WEBPACK_IMPORTED_MODULE_1__core_options_store__["a" /* default */]({ - offset: offset, - color: color, - opacity: Object(__WEBPACK_IMPORTED_MODULE_4__util__["defined"])(opacity) ? opacity : 1 - }); - this.options.addObserver(this); - } - - if ( Class ) GradientStop.__proto__ = Class; - GradientStop.prototype = Object.create( Class && Class.prototype ); - GradientStop.prototype.constructor = GradientStop; - - GradientStop.create = function create (arg) { - if (Object(__WEBPACK_IMPORTED_MODULE_4__util__["defined"])(arg)) { - var stop; - if (arg instanceof GradientStop) { - stop = arg; - } else if (arg.length > 1) { - stop = new GradientStop(arg[0], arg[1], arg[2]); - } else { - stop = new GradientStop(arg.offset, arg.color, arg.opacity); - } - - return stop; - } - }; - - return GradientStop; -}(__WEBPACK_IMPORTED_MODULE_3__common__["a" /* Class */])); - -Object(__WEBPACK_IMPORTED_MODULE_0__accessors_define_options_accessors__["a" /* default */])(GradientStop.prototype, [ "offset", "color", "opacity" ]); -__WEBPACK_IMPORTED_MODULE_2__mixins_observers_mixin__["a" /* default */].extend(GradientStop.prototype); - -/* harmony default export */ __webpack_exports__["a"] = (GradientStop); - -//# sourceMappingURL=gradient-stop.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/gradients/gradient.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mixins_observers_mixin__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stops_array__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/gradients/stops-array.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__gradient_stop__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/gradients/gradient-stop.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - -var Gradient = (function (Class) { - function Gradient(options) { - if ( options === void 0 ) options = {}; - - Class.call(this); - - this.stops = new __WEBPACK_IMPORTED_MODULE_1__stops_array__["a" /* default */](this._createStops(options.stops)); - this.stops.addObserver(this); - this._userSpace = options.userSpace; - this.id = Object(__WEBPACK_IMPORTED_MODULE_4__util__["definitionId"])(); - } - - if ( Class ) Gradient.__proto__ = Class; - Gradient.prototype = Object.create( Class && Class.prototype ); - Gradient.prototype.constructor = Gradient; - - Gradient.prototype.userSpace = function userSpace (value) { - if (Object(__WEBPACK_IMPORTED_MODULE_4__util__["defined"])(value)) { - this._userSpace = value; - this.optionsChange(); - return this; - } - - return this._userSpace; - }; - - Gradient.prototype._createStops = function _createStops (stops) { - if ( stops === void 0 ) stops = []; - - var result = []; - for (var idx = 0; idx < stops.length; idx++) { - result.push(__WEBPACK_IMPORTED_MODULE_2__gradient_stop__["a" /* default */].create(stops[idx])); - } - - return result; - }; - - Gradient.prototype.addStop = function addStop (offset, color, opacity) { - this.stops.push(new __WEBPACK_IMPORTED_MODULE_2__gradient_stop__["a" /* default */](offset, color, opacity)); - }; - - Gradient.prototype.removeStop = function removeStop (stop) { - var index = this.stops.indexOf(stop); - if (index >= 0) { - this.stops.splice(index, 1); - } - }; - - return Gradient; -}(__WEBPACK_IMPORTED_MODULE_3__common__["a" /* Class */])); - -Gradient.prototype.nodeType = "Gradient"; - -__WEBPACK_IMPORTED_MODULE_0__mixins_observers_mixin__["a" /* default */].extend(Gradient.prototype); - -Object.assign(Gradient.prototype, { - optionsChange: function(e) { - this.trigger("optionsChange", { - field: "gradient" + (e ? "." + e.field : ""), - value: this - }); - }, - - geometryChange: function() { - this.optionsChange(); - } -}); - -/* harmony default export */ __webpack_exports__["a"] = (Gradient); -//# sourceMappingURL=gradient.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/gradients/linear-gradient.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__accessors_define_point_accessors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/accessors/define-point-accessors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__gradient__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/gradients/gradient.js"); - - - - -var LinearGradient = (function (Gradient) { - function LinearGradient(options) { - if ( options === void 0 ) options = {}; - - Gradient.call(this, options); - - this.start(options.start || new __WEBPACK_IMPORTED_MODULE_1__geometry_point__["a" /* default */]()); - - this.end(options.end || new __WEBPACK_IMPORTED_MODULE_1__geometry_point__["a" /* default */](1, 0)); - } - - if ( Gradient ) LinearGradient.__proto__ = Gradient; - LinearGradient.prototype = Object.create( Gradient && Gradient.prototype ); - LinearGradient.prototype.constructor = LinearGradient; - - return LinearGradient; -}(__WEBPACK_IMPORTED_MODULE_2__gradient__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_0__accessors_define_point_accessors__["a" /* default */])(LinearGradient.prototype, [ "start", "end" ]); - -/* harmony default export */ __webpack_exports__["a"] = (LinearGradient); -//# sourceMappingURL=linear-gradient.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/gradients/radial-gradient.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__accessors_define_point_accessors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/accessors/define-point-accessors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__gradient__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/gradients/gradient.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - -var RadialGradient = (function (Gradient) { - function RadialGradient(options) { - if ( options === void 0 ) options = {}; - - Gradient.call(this, options); - - this.center(options.center || new __WEBPACK_IMPORTED_MODULE_1__geometry_point__["a" /* default */]()); - this._radius = Object(__WEBPACK_IMPORTED_MODULE_3__util__["defined"])(options.radius) ? options.radius : 1; - this._fallbackFill = options.fallbackFill; - } - - if ( Gradient ) RadialGradient.__proto__ = Gradient; - RadialGradient.prototype = Object.create( Gradient && Gradient.prototype ); - RadialGradient.prototype.constructor = RadialGradient; - - RadialGradient.prototype.radius = function radius (value) { - if (Object(__WEBPACK_IMPORTED_MODULE_3__util__["defined"])(value)) { - this._radius = value; - this.geometryChange(); - return this; - } - - return this._radius; - }; - - RadialGradient.prototype.fallbackFill = function fallbackFill (value) { - if (Object(__WEBPACK_IMPORTED_MODULE_3__util__["defined"])(value)) { - this._fallbackFill = value; - this.optionsChange(); - return this; - } - - return this._fallbackFill; - }; - - return RadialGradient; -}(__WEBPACK_IMPORTED_MODULE_2__gradient__["a" /* default */])); - -Object(__WEBPACK_IMPORTED_MODULE_0__accessors_define_point_accessors__["a" /* default */])(RadialGradient.prototype, [ "center" ]); - -/* harmony default export */ __webpack_exports__["a"] = (RadialGradient); -//# sourceMappingURL=radial-gradient.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/gradients/stops-array.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shapes_elements_array__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/elements-array.js"); - - -var StopsArray = (function (ElementsArray) { - function StopsArray () { - ElementsArray.apply(this, arguments); - } - - if ( ElementsArray ) StopsArray.__proto__ = ElementsArray; - StopsArray.prototype = Object.create( ElementsArray && ElementsArray.prototype ); - StopsArray.prototype.constructor = StopsArray; - - StopsArray.prototype._change = function _change () { - this.optionsChange({ - field: "stops" - }); - }; - - return StopsArray; -}(__WEBPACK_IMPORTED_MODULE_0__shapes_elements_array__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (StopsArray); -//# sourceMappingURL=stops-array.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/html.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__html_core__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/html/core.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__html_core__["a"]; }); - - -//# sourceMappingURL=html.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/html/core.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return drawDOM; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__pdf__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/pdf.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/drawing.js"); -/* eslint-disable no-multi-spaces, key-spacing, indent, camelcase, space-before-blocks, eqeqeq, brace-style */ -/* eslint-disable space-infix-ops, space-before-function-paren, array-bracket-spacing, object-curly-spacing */ -/* eslint-disable no-nested-ternary, max-params, default-case, no-else-return, no-empty, yoda */ -/* eslint-disable no-param-reassign, no-var, block-scoped-var */ - - - - - - - -var browser = __WEBPACK_IMPORTED_MODULE_3__common__["i" /* support */].browser; -/* - - XXX: to test: - - - cloneNodes function: - - drawing document containing canvas with page breaking - - drawing document with named radio -s (should not clear selection) - - IE9/IE10 don't support el.dataset; do they copy user data? - - - repeating table headers/footers on page breaking - - - forceBreak, keepTogether - - - avoidLinks - - */ - -/* -----[ local vars ]----- */ - -function slice(thing) { - return Array.prototype.slice.call(thing); -} - -var KENDO_PSEUDO_ELEMENT = "KENDO-PSEUDO-ELEMENT"; - -var IMAGE_CACHE = {}; - -var nodeInfo = {}; -nodeInfo._root = nodeInfo; - -/* -----[ Custom Text node to speed up rendering in PDF ]----- */ - -var microsoft = browser.msie || browser.edge; - -var TextRect = (function (Text) { - function TextRect(str, rect, options) { - Text.call(this, str, rect.getOrigin(), options); - this._pdfRect = rect; - } - - if ( Text ) TextRect.__proto__ = Text; - TextRect.prototype = Object.create( Text && Text.prototype ); - TextRect.prototype.constructor = TextRect; - TextRect.prototype.rect = function rect () { - // this is the crux of it: we can avoid a call to - // measure(), which is what the base class does, since we - // already know the rect. measure() is s-l-o-w. - return this._pdfRect; - }; - TextRect.prototype.rawBBox = function rawBBox () { - // also let's avoid creating a new rectangle. - return this._pdfRect; - }; - - return TextRect; -}(__WEBPACK_IMPORTED_MODULE_4__drawing__["Text"])); - -function addClass(el, cls) { - if (el.classList) { - el.classList.add(cls); - } else { - el.className += " " + cls; - } -} - -function removeClass(el, cls) { - if (el.classList) { - el.classList.remove(cls); - } else { - el.className = el.className.split(/\s+/).reduce(function(a, word){ - if (word != cls) { - a.push(word); - } - return a; - }, []).join(" "); - } -} - -function setCSS(el, styles) { - Object.keys(styles).forEach(function(key){ - el.style[key] = styles[key]; - }); -} - -var matches = typeof Element !== "undefined" && Element.prototype && (function(p){ - if (p.matches) { - return function(el, selector) { return el.matches(selector); }; - } - if (p.webkitMatchesSelector) { - return function(el, selector) { return el.webkitMatchesSelector(selector); }; - } - if (p.mozMatchesSelector) { - return function(el, selector) { return el.mozMatchesSelector(selector); }; - } - if (p.msMatchesSelector) { - return function(el, selector) { return el.msMatchesSelector(selector); }; - } - return function(s) { - return [].indexOf.call(document.querySelectorAll(s), this) !== -1; - }; -})(Element.prototype); - -function closest(el, selector) { - if (el.closest) { - return el.closest(selector); - } - // IE: stringifying rather than simply comparing with `document`, - // which is not iframe-proof and fails in editor export — - // https://github.com/telerik/kendo/issues/6721 - while (el && !/^\[object (?:HTML)?Document\]$/.test(String(el))) { - if (el.nodeType == 1 /* Element */ && matches(el, selector)) { - return el; - } - el = el.parentNode; - } -} - -// clone nodes ourselves, so that we redraw (DOM or -// jQuery clone will not) -var cloneNodes = (function($){ - if ($) { - // if we have Kendo and jQuery, use this version as it will - // maintain proper links between cloned element and Kendo - // widgets (i.e. it clones jQuery data(), which isn't the same - // as element's data attributes). - // https://github.com/telerik/kendo-ui-core/issues/2750 - return function cloneNodes(el) { - var clone = el.cloneNode(false); - if (el.nodeType == 1 /* Element */) { - var $el = $(el), $clone = $(clone), i; - var data = $el.data(); - for (i in data) { - $clone.data(i, data[i]); - } - if (/^canvas$/i.test(el.tagName)) { - clone.getContext("2d").drawImage(el, 0, 0); - } else if (/^(?:input|select|textarea|option)$/i.test(el.tagName)) { - // drop the name attributes so that we don't affect the selection of the - // original nodes (i.e. checked status of radio buttons) when we insert our copy - // into the DOM. https://github.com/telerik/kendo/issues/5409 - clone.removeAttribute("id"); - clone.removeAttribute("name"); - clone.value = el.value; - clone.checked = el.checked; - clone.selected = el.selected; - } - for (i = el.firstChild; i; i = i.nextSibling) { - clone.appendChild(cloneNodes(i)); - } - } - return clone; - }; - } else { - // the no-jQuery version - return function cloneNodes(el) { - var clone = (function dive(node){ - var clone = node.cloneNode(false); - if (node._kendoExportVisual) { - clone._kendoExportVisual = node._kendoExportVisual; - } - for (var i = node.firstChild; i; i = i.nextSibling) { - clone.appendChild(dive(i)); - } - return clone; - })(el); - - // re-draw canvases - https://github.com/telerik/kendo/issues/4872 - var canvases = el.querySelectorAll("canvas"); - if (canvases.length) { - slice(clone.querySelectorAll("canvas")).forEach(function (canvas, i) { - canvas.getContext("2d").drawImage(canvases[i], 0, 0); - }); - } - - // remove "name" attributes from elements - - // https://github.com/telerik/kendo/issues/5409 - var orig = el.querySelectorAll("input, select, textarea, option"); - slice(clone.querySelectorAll("input, select, textarea, option")).forEach(function (el, i) { - el.removeAttribute("id"); - el.removeAttribute("name"); - el.value = orig[i].value; - el.checked = orig[i].checked; - el.selected = orig[i].selected; - }); - - return clone; - }; - } -})(typeof window !== "undefined" && window.kendo && window.kendo.jQuery); - -function getXY(thing) { - if (typeof thing == "number") { - return { x: thing, y: thing }; - } - if (Array.isArray(thing)) { - return { x: thing[0], y: thing[1] }; - } - return { x: thing.x, y: thing.y }; -} - -function drawDOM(element, options) { - if (!options) { - options = {}; - } - var promise = Object(__WEBPACK_IMPORTED_MODULE_2__util__["createPromise"])(); - - if (!element) { - return promise.reject("No element to export"); - } - - if (typeof window.getComputedStyle != "function") { - throw new Error("window.getComputedStyle is missing. You are using an unsupported browser, or running in IE8 compatibility mode. Drawing HTML is supported in Chrome, Firefox, Safari and IE9+."); - } - - __WEBPACK_IMPORTED_MODULE_1__pdf__["a" /* defineFont */](getFontFaces(element.ownerDocument)); - - var scale = getXY(options.scale || 1); - - function doOne(element) { - var group = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Group"](); - - // translate to start of page - var pos = element.getBoundingClientRect(); - setTransform(group, [ - scale.x, - 0, - 0, - scale.y, - (-pos.left * scale.x), - (-pos.top * scale.y) - ]); - - nodeInfo._clipbox = false; - nodeInfo._matrix = __WEBPACK_IMPORTED_MODULE_0__geometry__["Matrix"].unit(); - nodeInfo._stackingContext = { - element: element, - group: group - }; - - if (options.avoidLinks === true) { - nodeInfo._avoidLinks = "a"; - } else { - nodeInfo._avoidLinks = options.avoidLinks; - } - - addClass(element, "k-pdf-export"); - renderElement(element, group); - removeClass(element, "k-pdf-export"); - - return group; - } - - cacheImages(element, function(){ - var forceBreak = options && options.forcePageBreak; - var hasPaperSize = options && options.paperSize && options.paperSize != "auto"; - var paperOptions = __WEBPACK_IMPORTED_MODULE_1__pdf__["c" /* getPaperOptions */](function(key, def){ - if (key == "paperSize") { - // PDF.getPaperOptions croaks on "auto", just pass dummy A4 as we might - // still be interested in margins. - return hasPaperSize ? options[key] : "A4"; - } - return key in options ? options[key] : def; - }); - var pageWidth = hasPaperSize && paperOptions.paperSize[0]; - var pageHeight = hasPaperSize && paperOptions.paperSize[1]; - var margin = options.margin && paperOptions.margin; - var hasMargin = Boolean(margin); - if (forceBreak || pageHeight) { - if (!margin) { - margin = { left: 0, top: 0, right: 0, bottom: 0 }; - } - - // we want paper size and margin to be unaffected by - // scaling in the output, so we have to reverse-scale - // before our calculations begin. - if (pageWidth) { pageWidth /= scale.x; } - if (pageHeight) { pageHeight /= scale.y; } - margin.left /= scale.x; - margin.right /= scale.x; - margin.top /= scale.y; - margin.bottom /= scale.y; - - var group = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Group"]({ - pdf: { - multiPage : true, - paperSize : hasPaperSize ? paperOptions.paperSize : "auto", - _ignoreMargin : hasMargin // HACK! see exportPDF in pdf/drawing.js - } - }); - handlePageBreaks( - function(x) { - if (options.progress) { - var canceled = false, pageNum = 0; - (function next(){ - if (pageNum < x.pages.length) { - var page = doOne(x.pages[pageNum]); - group.append(page); - options.progress({ - page: page, - pageNum: ++pageNum, - totalPages: x.pages.length, - cancel: function() { - canceled = true; - } - }); - if (!canceled) { - setTimeout(next); - } else { - // XXX: should we also fail() the deferred object? - x.container.parentNode.removeChild(x.container); - } - } else { - x.container.parentNode.removeChild(x.container); - promise.resolve(group); - } - })(); - } else { - x.pages.forEach(function(page){ - group.append(doOne(page)); - }); - x.container.parentNode.removeChild(x.container); - promise.resolve(group); - } - }, - element, - forceBreak, - pageWidth ? pageWidth - margin.left - margin.right : null, - pageHeight ? pageHeight - margin.top - margin.bottom : null, - margin, - options - ); - } else { - promise.resolve(doOne(element)); - } - }); - - function makeTemplate(template) { - if (template != null) { - if (typeof template == "string") { - template = Object(__WEBPACK_IMPORTED_MODULE_3__common__["j" /* template */])(template.replace(/^\s+|\s+$/g, "")); - } - if (typeof template == "function") { - return function(data) { - var el = template(data); - if (el && typeof el == "string") { - var div = document.createElement("div"); - div.innerHTML = el; - el = div.firstElementChild; - } - return el; - }; - } - // assumed DOM element - return function() { - return template.cloneNode(true); - }; - } - } - - function handlePageBreaks(callback, element, forceBreak, pageWidth, pageHeight, margin, options) { - var template = makeTemplate(options.template); - var doc = element.ownerDocument; - var pages = []; - var copy = options._destructive ? element : cloneNodes(element); - var container = doc.createElement("KENDO-PDF-DOCUMENT"); - var adjust = 0; - - // make sure elements are at the end (Grid widget - // places TFOOT before TBODY, tricking our algorithm to - // insert a page break right after the header). - // https://github.com/telerik/kendo/issues/4699 - slice(copy.querySelectorAll("tfoot")).forEach(function(tfoot){ - tfoot.parentNode.appendChild(tfoot); - }); - - // remember the index of each LI from an ordered list. - // we'll use it to reconstruct the proper numbering. - slice(copy.querySelectorAll("ol")).forEach(function(ol){ - slice(ol.children).forEach(function(li, index){ - li.setAttribute("kendo-split-index", index); - }); - }); - - setCSS(container, { - display : "block", - position : "absolute", - boxSizing : "content-box", - left : "-10000px", - top : "-10000px" - }); - - if (pageWidth) { - // subtle: if we don't set the width *and* margins here, the layout in this - // container will be different from the one in our final page elements, and we'll - // split at the wrong places. - setCSS(container, { - width : pageWidth + "px", - paddingLeft : margin.left + "px", - paddingRight : margin.right + "px" - }); - - // when the first element has a margin-top (i.e. a

) the page will be - // inadvertently enlarged by that number (the browser will report the container's - // bounding box top to start at the element's top, rather than including its - // margin). Adding overflow: hidden seems to fix it. - // - // to understand the difference, try the following snippets in your browser: - // - // 1.
- //

Foo

- //
- // - // 2.
- //

Foo

- //
- // - // this detail is not important when automatic page breaking is not requested, hence - // doing it only if pageWidth is defined. - setCSS(copy, { overflow: "hidden" }); - } - - element.parentNode.insertBefore(container, element); - container.appendChild(copy); - - // we need the timeouts here, so that images dimensions are - // properly computed in DOM when we start our thing. - if (options.beforePageBreak) { - setTimeout(function(){ - options.beforePageBreak(container, doPageBreak); - }, 15); - } else { - setTimeout(doPageBreak, 15); - } - - function doPageBreak() { - if (forceBreak != "-" || pageHeight) { - splitElement(copy); - } - - { - var page = makePage(); - copy.parentNode.insertBefore(page, copy); - page.appendChild(copy); - } - - if (template) { - pages.forEach(function(page, i){ - var el = template({ - element : page, - pageNum : i + 1, - totalPages : pages.length - }); - if (el) { - page.appendChild(el); - } - }); - } - - cacheImages(pages, function() { - // Even though we already cached images, they simply won't be available - // immediately in the newly created DOM. Previously we'd allow a 10ms timeout, - // but that's arbitrary and clearly not working in all cases - // (https://github.com/telerik/kendo/issues/5399), so this function will wait - // for their .complete attribute. - whenImagesAreActuallyLoaded(pages, function(){ - callback({ pages: pages, container: container }); - }); - }); - } - - function keepTogether(el) { - if (options.keepTogether && matches(el, options.keepTogether) && el.offsetHeight <= pageHeight - adjust) { - return true; - } - - var tag = el.tagName; - if (/^h[1-6]$/i.test(tag) && el.offsetHeight >= pageHeight - adjust) { - return false; - } - - return (el.getAttribute("data-kendo-chart") || - /^(?:img|tr|thead|th|tfoot|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(el.tagName)); - } - - function splitElement(element) { - if (element.tagName == "TABLE") { - setCSS(element, { tableLayout: "fixed" }); - } - var style = getComputedStyle(element); - var bottomPadding = parseFloat(getPropertyValue(style, "padding-bottom")); - var bottomBorder = parseFloat(getPropertyValue(style, "border-bottom-width")); - var saveAdjust = adjust; - adjust += bottomPadding + bottomBorder; - var isFirst = true; - for (var el = element.firstChild; el; el = el.nextSibling) { - if (el.nodeType == 1 /* Element */) { - isFirst = false; - if (matches(el, forceBreak)) { - breakAtElement(el); - continue; - } - if (!pageHeight) { - // we're in "manual breaks mode" - splitElement(el); - continue; - } - if (!/^(?:static|relative)$/.test(getPropertyValue(getComputedStyle(el), "position"))) { - continue; - } - var fall = fallsOnMargin(el); - if (fall == 1) { - // element starts on next page, break before anyway. - breakAtElement(el); - } - else if (fall) { - // elements ends up on next page, or possibly doesn't fit on a page at - // all. break before it anyway if it's an or , otherwise - // attempt to split. - if (keepTogether(el)) { - breakAtElement(el); - } else { - splitElement(el); - } - } - else { - splitElement(el); - } - } - else if (el.nodeType == 3 /* Text */ && pageHeight) { - splitText(el, isFirst); - isFirst = false; - } - } - adjust = saveAdjust; - } - - function firstInParent(el) { - var p = el.parentNode, first = p.firstChild; - if (el === first) { - return true; - } - if (el === p.children[0]) { - if (first.nodeType == 7 /* comment */ || - first.nodeType == 8 /* processing instruction */) { - return true; - } - if (first.nodeType == 3 /* text */) { - // if whitespace only we can probably consider it's first - return !/\S/.test(first.data); - } - } - return false; - } - - function breakAtElement(el) { - if (el.nodeType == 1 && el !== copy && firstInParent(el)) { - return breakAtElement(el.parentNode); - } - var table, colgroup, thead, grid, gridHead; - table = closest(el, "table"); - colgroup = table && table.querySelector("colgroup"); - if (options.repeatHeaders) { - thead = table && table.querySelector("thead"); - - // If we break page in a Kendo Grid, repeat its header. This ugly hack is - // necessary because a scrollable grid will keep the header in a separate - // element from its content. - // - // XXX: This is likely to break as soon as the widget HTML is modified. - grid = closest(el, ".k-grid.k-widget"); - if (grid && grid.querySelector(".k-auto-scrollable")) { - gridHead = grid.querySelector(".k-grid-header"); - } - } - var page = makePage(); - var range = doc.createRange(); - range.setStartBefore(copy); - range.setEndBefore(el); - page.appendChild(range.extractContents()); - copy.parentNode.insertBefore(page, copy); - preventBulletOnListItem(el.parentNode); - if (table) { - table = closest(el, "table"); // that's the
on next page! - if (options.repeatHeaders && thead) { - table.insertBefore(thead.cloneNode(true), table.firstChild); - } - if (colgroup) { - table.insertBefore(colgroup.cloneNode(true), table.firstChild); - } - } - if (options.repeatHeaders && gridHead) { - grid = closest(el, ".k-grid.k-widget"); - grid.insertBefore(gridHead.cloneNode(true), grid.firstChild); - } - } - - function makePage() { - var page = doc.createElement("KENDO-PDF-PAGE"); - setCSS(page, { - display : "block", - boxSizing: "content-box", - width : pageWidth ? (pageWidth + "px") : "auto", - padding : (margin.top + "px " + - margin.right + "px " + - margin.bottom + "px " + - margin.left + "px"), - - // allow absolutely positioned elements to be relative to current page - position : "relative", - - // without the following we might affect layout of subsequent pages - height : pageHeight ? (pageHeight + "px") : "auto", - overflow : pageHeight || pageWidth ? "hidden" : "visible", - clear : "both" - }); - - // debug - // $("
").css({ - // position : "absolute", - // left : margin.left, - // top : margin.top, - // width : pageWidth, - // height : pageHeight, - // boxSizing : "border-box", - // background: "rgba(255, 255, 0, 0.5)" - // //border : "1px solid red" - // }).appendTo(page); - - if (options && options.pageClassName) { - page.className = options.pageClassName; - } - pages.push(page); - return page; - } - - function fallsOnMargin(thing) { - var box = thing.getBoundingClientRect(); - if (box.width === 0 || box.height === 0) { - // I'd say an element with dimensions zero fits on current page. - return 0; - } - var top = copy.getBoundingClientRect().top; - var available = pageHeight - adjust; - return (box.height > available) ? 3 - : (box.top - top > available) ? 1 - : (box.bottom - top > available) ? 2 - : 0; - } - - function splitText(node, isFirst) { - if (!/\S/.test(node.data)) { - return; - } - - var len = node.data.length; - var range = doc.createRange(); - range.selectNodeContents(node); - var fall = fallsOnMargin(range); - if (!fall) { - return; // the whole text fits on current page - } - - var nextnode = node; - if (fall == 1) { - // starts on next page, break before anyway. - if (isFirst) { - // avoid leaving an empty

,

  • , etc. on previous page. - breakAtElement(node.parentNode); - } else { - breakAtElement(node); - } - } - else { - (function findEOP(min, pos, max) { - range.setEnd(node, pos); - if (min == pos || pos == max) { - return pos; - } - if (fallsOnMargin(range)) { - return findEOP(min, (min + pos) >> 1, pos); - } else { - return findEOP(pos, (pos + max) >> 1, max); - } - })(0, len >> 1, len); - - if (!/\S/.test(range.toString()) && isFirst) { - // avoid leaving an empty

    ,

  • , etc. on previous page. - breakAtElement(node.parentNode); - } else { - // This is only needed for IE, but it feels cleaner to do it anyway. Without - // it, IE will truncate a very long text (playground/pdf-long-text-2.html). - nextnode = node.splitText(range.endOffset); - - var page = makePage(); - range.setStartBefore(copy); - page.appendChild(range.extractContents()); - copy.parentNode.insertBefore(page, copy); - preventBulletOnListItem(nextnode.parentNode); - } - } - - splitText(nextnode); - } - - function preventBulletOnListItem(el) { - // set a hint on continued LI elements, to tell the - // renderer not to draw the bullet again. - // https://github.com/telerik/kendo-ui-core/issues/2732 - var li = closest(el, "li"); - if (li) { - li.setAttribute("kendo-no-bullet", "1"); - preventBulletOnListItem(li.parentNode); - } - } - } - - return promise; -} - -drawDOM.getFontFaces = getFontFaces; - -// This is needed for the Spreadsheet print functionality. Since -// there we only need to draw text, this cuts through the ceremony -// of drawDOM/renderElement and renders the text node directly. -drawDOM.drawText = function(element) { - var group = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Group"](); - nodeInfo._clipbox = false; - nodeInfo._matrix = __WEBPACK_IMPORTED_MODULE_0__geometry__["Matrix"].unit(); - nodeInfo._stackingContext = { - element: element, - group: group - }; - pushNodeInfo(element, getComputedStyle(element), group); - if (element.firstChild.nodeType == 3 /* Text */) { - // avoid the penalty of renderElement - renderText(element, element.firstChild, group); - } else { - _renderElement(element, group); - } - popNodeInfo(); - return group; -}; - -var parseBackgroundImage = (function(){ - var tok_linear_gradient = /^((-webkit-|-moz-|-o-|-ms-)?linear-gradient\s*)\(/; - //var tok_radial_gradient = /^((-webkit-|-moz-|-o-|-ms-)?radial-gradient\s*)\(/; - var tok_percent = /^([-0-9.]+%)/; - var tok_length = /^([-0-9.]+px)/; - var tok_keyword = /^(left|right|top|bottom|to|center)\W/; - var tok_angle = /^([-0-9.]+(deg|grad|rad|turn))/; - var tok_whitespace = /^(\s+)/; - var tok_popen = /^(\()/; - var tok_pclose = /^(\))/; - var tok_comma = /^(,)/; - var tok_url = /^(url)\(/; - var tok_content = /^(.*?)\)/; - - var cache1 = {}, cache2 = {}; - - function parse(input) { - var orig = input; - if (hasOwnProperty(cache1, orig)) { - return cache1[orig]; - } - function skip_ws() { - var m = tok_whitespace.exec(input); - if (m) { - input = input.substr(m[1].length); - } - } - function read(token) { - skip_ws(); - var m = token.exec(input); - if (m) { - input = input.substr(m[1].length); - return m[1]; - } - } - - function read_stop() { - var color = Object(__WEBPACK_IMPORTED_MODULE_3__common__["g" /* parseColor */])(input, true); - var length, percent; - if (color) { - var match = - /^#[0-9a-f]+/i.exec(input) || - /^rgba?\(.*?\)/i.exec(input) || - /^..*?\b/.exec(input); // maybe named color - input = input.substr(match[0].length); - color = color.toRGB(); - if (!(length = read(tok_length))) { - percent = read(tok_percent); - } - return { color: color, length: length, percent: percent }; - } - } - - function read_linear_gradient(propName) { - var angle; - var to1, to2; - var stops = []; - var reverse = false; - - if (read(tok_popen)) { - // 1. [ || to , ]? - angle = read(tok_angle); - if (angle) { - angle = parseAngle(angle); - read(tok_comma); - } - else { - to1 = read(tok_keyword); - if (to1 == "to") { - to1 = read(tok_keyword); - } else if (to1 && /^-/.test(propName)) { - reverse = true; - } - to2 = read(tok_keyword); - read(tok_comma); - } - - if (/-moz-/.test(propName) && angle == null && to1 == null) { - var x = read(tok_percent), y = read(tok_percent); - reverse = true; - if (x == "0%") { - to1 = "left"; - } else if (x == "100%") { - to1 = "right"; - } - if (y == "0%") { - to2 = "top"; - } else if (y == "100%") { - to2 = "bottom"; - } - read(tok_comma); - } - - // 2. color stops - while (input && !read(tok_pclose)) { - var stop = read_stop(); - if (!stop) { - break; - } - stops.push(stop); - read(tok_comma); - } - - return { - type : "linear", - angle : angle, - to : to1 && to2 ? to1 + " " + to2 : to1 ? to1 : to2 ? to2 : null, - stops : stops, - reverse : reverse - }; - } - } - - function read_url() { - if (read(tok_popen)) { - var url = read(tok_content); - url = url.replace(/^['"]+|["']+$/g, ""); - read(tok_pclose); - return { type: "url", url: url }; - } - } - - var tok; - - if ((tok = read(tok_linear_gradient))) { - tok = read_linear_gradient(tok); - } - else if ((tok = read(tok_url))) { - tok = read_url(); - } - - return (cache1[orig] = tok || { type: "none" }); - } - - return function(input) { - if (hasOwnProperty(cache2, input)) { - return cache2[input]; - } - return (cache2[input] = splitProperty(input).map(parse)); - }; -})(); - -var splitProperty = (function(){ - var cache = {}; - return function(input, separator) { - if (!separator) { - separator = /^\s*,\s*/; - } - - var cacheKey = input + separator; - - if (hasOwnProperty(cache, cacheKey)) { - return cache[cacheKey]; - } - - var ret = []; - var last = 0, pos = 0; - var in_paren = 0; - var in_string = false; - var m; - - function looking_at(rx) { - return (m = rx.exec(input.substr(pos))); - } - - function trim(str) { - return str.replace(/^\s+|\s+$/g, ""); - } - - while (pos < input.length) { - if (!in_string && looking_at(/^[\(\[\{]/)) { - in_paren++; - pos++; - } - else if (!in_string && looking_at(/^[\)\]\}]/)) { - in_paren--; - pos++; - } - else if (!in_string && looking_at(/^[\"\']/)) { - in_string = m[0]; - pos++; - } - else if (in_string == "'" && looking_at(/^\\\'/)) { - pos += 2; - } - else if (in_string == '"' && looking_at(/^\\\"/)) { - pos += 2; - } - else if (in_string == "'" && looking_at(/^\'/)) { - in_string = false; - pos++; - } - else if (in_string == '"' && looking_at(/^\"/)) { - in_string = false; - pos++; - } - else if (looking_at(separator)) { - if (!in_string && !in_paren && pos > last) { - ret.push(trim(input.substring(last, pos))); - last = pos + m[0].length; - } - pos += m[0].length; - } - else { - pos++; - } - } - if (last < pos) { - ret.push(trim(input.substring(last, pos))); - } - return (cache[cacheKey] = ret); - }; -})(); - -var getFontURL = (function(cache){ - return function(el){ - // XXX: for IE we get here the whole cssText of the rule, - // because the computedStyle.src is empty. Next time we need - // to fix these regexps we better write a CSS parser. :-\ - var url = cache[el]; - if (!url) { - var m; - if ((m = /url\((['"]?)([^'")]*?)\1\)\s+format\((['"]?)truetype\3\)/.exec(el))) { - url = cache[el] = m[2]; - } else if ((m = /url\((['"]?)([^'")]*?\.ttf)\1\)/.exec(el))) { - url = cache[el] = m[2]; - } - } - return url; - }; -})(Object.create(null)); - -var getFontHeight = (function(cache){ - return function(font) { - var height = cache[font]; - if (height == null) { - height = cache[font] = Object(__WEBPACK_IMPORTED_MODULE_2__util__["measureText"])("Mapq", { font: font }).height; - } - return height; - }; -})(Object.create(null)); - -function getFontFaces(doc) { - if (doc == null) { - doc = document; - } - var result = {}; - for (var i = 0; i < doc.styleSheets.length; ++i) { - doStylesheet(doc.styleSheets[i]); - } - return result; - function doStylesheet(ss) { - if (ss) { - var rules = null; - try { - rules = ss.cssRules; - } catch (ex) {} - if (rules) { - addRules(ss, rules); - } - } - } - function findFonts(rule) { - var src = getPropertyValue(rule.style, "src"); - if (src) { - return splitProperty(src).reduce(function(a, el){ - var font = getFontURL(el); - if (font) { - a.push(font); - } - return a; - }, []); - } else { - // Internet Explorer - // XXX: this is gross. should work though for valid CSS. - var font = getFontURL(rule.cssText); - return font ? [ font ] : []; - } - } - function addRules(styleSheet, rules) { - for (var i = 0; i < rules.length; ++i) { - var r = rules[i]; - switch (r.type) { - case 3: // CSSImportRule - doStylesheet(r.styleSheet); - break; - case 5: // CSSFontFaceRule - var style = r.style; - var family = splitProperty(getPropertyValue(style, "font-family")); - var bold = /^([56789]00|bold)$/i.test(getPropertyValue(style, "font-weight")); - var italic = "italic" == getPropertyValue(style, "font-style"); - var src = findFonts(r); - if (src.length > 0) { - addRule(styleSheet, family, bold, italic, src[0]); - } - } - } - } - function addRule(styleSheet, names, bold, italic, url) { - // We get full resolved absolute URLs in Chrome, but sadly - // not in Firefox. - if (!(/^data:/i.test(url))) { - if (!(/^[^\/:]+:\/\//.test(url) || /^\//.test(url))) { - url = String(styleSheet.href).replace(/[^\/]*$/, "") + url; - } - } - names.forEach(function(name){ - name = name.replace(/^(['"]?)(.*?)\1$/, "$2"); // it's quoted - if (bold) { - name += "|bold"; - } - if (italic) { - name += "|italic"; - } - result[name] = url; - }); - } -} - -function hasOwnProperty(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - -function getCounter(name) { - name = "_counter_" + name; - return nodeInfo[name]; -} - -function getAllCounters(name) { - var values = [], p = nodeInfo; - name = "_counter_" + name; - while (p) { - if (hasOwnProperty(p, name)) { - values.push(p[name]); - } - p = Object.getPrototypeOf(p); - } - return values.reverse(); -} - -function incCounter(name, inc) { - var p = nodeInfo; - name = "_counter_" + name; - while (p && !hasOwnProperty(p, name)) { - p = Object.getPrototypeOf(p); - } - if (!p) { - p = nodeInfo._root; - } - p[name] = (p[name] || 0) + (inc == null ? 1 : inc); -} - -function resetCounter(name, val) { - name = "_counter_" + name; - nodeInfo[name] = val == null ? 0 : val; -} - -function doCounters(a, f, def) { - for (var i = 0; i < a.length;) { - var name = a[i++]; - var val = parseFloat(a[i]); - if (isNaN(val)) { - f(name, def); - } else { - f(name, val); - ++i; - } - } -} - -function updateCounters(style) { - var counterReset = getPropertyValue(style, "counter-reset"); - if (counterReset) { - doCounters(splitProperty(counterReset, /^\s+/), resetCounter, 0); - } - var counterIncrement = getPropertyValue(style, "counter-increment"); - if (counterIncrement) { - doCounters(splitProperty(counterIncrement, /^\s+/), incCounter, 1); - } -} - -function parseColor(str, css) { - var color = Object(__WEBPACK_IMPORTED_MODULE_3__common__["g" /* parseColor */])(str, true); - if (color) { - color = color.toRGB(); - if (css) { - color = color.toCssRgba(); - } else if (color.a === 0) { - color = null; - } - } - return color; -} - -function whenImagesAreActuallyLoaded(elements, callback) { - var pending = 0; - elements.forEach(function(el){ - var images = el.querySelectorAll("img"); - for (var i = 0; i < images.length; ++i) { - var img = images[i]; - if (!img.complete) { - pending++; - img.onload = img.onerror = next; - } - } - }); - if (!pending) { - next(); - } - function next() { - if (--pending <= 0) { - callback(); - } - } -} - -function cacheImages(element, callback) { - var urls = []; - function add(url) { - if (!IMAGE_CACHE[url]) { - IMAGE_CACHE[url] = true; - urls.push(url); - } - } - function dive(element){ - if (/^img$/i.test(element.tagName)) { - add(element.src); - } - parseBackgroundImage( - getPropertyValue( - getComputedStyle(element), "background-image" - ) - ).forEach(function(bg){ - if (bg.type == "url") { - add(bg.url); - } - }); - - if (element.children) { - slice(element.children).forEach(dive); - } - } - - if (Array.isArray(element)) { - element.forEach(dive); - } else { - dive(element); - } - - var count = urls.length; - function next() { - if (--count <= 0) { - callback(); - } - } - if (count === 0) { - next(); - } - urls.forEach(function(url){ - var img = IMAGE_CACHE[url] = new window.Image(); - if (!(/^data:/i.test(url))) { - img.crossOrigin = "Anonymous"; - } - img.src = url; - if (img.complete) { - next(); - } else { - img.onload = next; - img.onerror = function() { - IMAGE_CACHE[url] = null; - next(); - }; - } - }); -} - -function alphaNumeral(n) { - var result = ""; - do { - var r = n % 26; - result = String.fromCharCode(97 + r) + result; - n = Math.floor(n / 26); - } while (n > 0); - return result; -} - -function pushNodeInfo(element, style, group) { - nodeInfo = Object.create(nodeInfo); - nodeInfo[element.tagName.toLowerCase()] = { - element: element, - style: style - }; - var decoration = getPropertyValue(style, "text-decoration"); - if (decoration && decoration != "none") { - var color = getPropertyValue(style, "color"); - decoration.split(/\s+/g).forEach(function(name){ - if (!nodeInfo[name]) { - nodeInfo[name] = color; - } - }); - } - - if (createsStackingContext(style)) { - nodeInfo._stackingContext = { - element: element, - group: group - }; - } -} - -function popNodeInfo() { - nodeInfo = Object.getPrototypeOf(nodeInfo); -} - -function updateClipbox(path) { - if (nodeInfo._clipbox != null) { - var box = path.bbox(nodeInfo._matrix); - if (nodeInfo._clipbox) { - nodeInfo._clipbox = __WEBPACK_IMPORTED_MODULE_0__geometry__["Rect"].intersect(nodeInfo._clipbox, box); - } else { - nodeInfo._clipbox = box; - } - } -} - -function emptyClipbox() { - var cb = nodeInfo._clipbox; - if (cb == null) { - return true; - } - if (cb) { - return cb.width() === 0 || cb.height() === 0; - } -} - -function createsStackingContext(style) { - function prop(name) { return getPropertyValue(style, name); } - if (prop("transform") != "none" || - prop("position") != "static" || - prop("z-index") != "auto" || - prop("opacity") < 1) { - return true; - } -} - -function getComputedStyle(element, pseudoElt) { - return window.getComputedStyle(element, pseudoElt || null); -} - -function getPropertyValue(style, prop, defa) { - var val = style.getPropertyValue(prop); - if (val == null || val === "") { - if (browser.webkit) { - val = style.getPropertyValue("-webkit-" + prop ); - } else if (browser.mozilla) { - val = style.getPropertyValue("-moz-" + prop ); - } else if (browser.opera) { - val = style.getPropertyValue("-o-" + prop); - } else if (microsoft) { - val = style.getPropertyValue("-ms-" + prop); - } - } - if (arguments.length > 2 && (val == null || val === "")) { - return defa; - } else { - return val; - } -} - -function pleaseSetPropertyValue(style, prop, value, important) { - style.setProperty(prop, value, important); - if (browser.webkit) { - style.setProperty("-webkit-" + prop, value, important); - } else if (browser.mozilla) { - style.setProperty("-moz-" + prop, value, important); - } else if (browser.opera) { - style.setProperty("-o-" + prop, value, important); - } else if (microsoft) { - style.setProperty("-ms-" + prop, value, important); - prop = "ms" + prop.replace(/(^|-)([a-z])/g, function(s, p1, p2){ - return p1 + p2.toUpperCase(); - }); - style[prop] = value; - } -} - -function getBorder(style, side) { - side = "border-" + side; - return { - width: parseFloat(getPropertyValue(style, side + "-width")), - style: getPropertyValue(style, side + "-style"), - color: parseColor(getPropertyValue(style, side + "-color"), true) - }; -} - -function saveStyle(element, func) { - var prev = element.style.cssText; - var result = func(); - element.style.cssText = prev; - return result; -} - -function getBorderRadius(style, side) { - var r = getPropertyValue(style, "border-" + side + "-radius").split(/\s+/g).map(parseFloat); - if (r.length == 1) { - r.push(r[0]); - } - return sanitizeRadius({ x: r[0], y: r[1] }); -} - -function getContentBox(element) { - var box = element.getBoundingClientRect(); - box = innerBox(box, "border-*-width", element); - box = innerBox(box, "padding-*", element); - return box; -} - -function innerBox(box, prop, element) { - var style, wt, wr, wb, wl; - if (typeof prop == "string") { - style = getComputedStyle(element); - wt = parseFloat(getPropertyValue(style, prop.replace("*", "top"))); - wr = parseFloat(getPropertyValue(style, prop.replace("*", "right"))); - wb = parseFloat(getPropertyValue(style, prop.replace("*", "bottom"))); - wl = parseFloat(getPropertyValue(style, prop.replace("*", "left"))); - } - else if (typeof prop == "number") { - wt = wr = wb = wl = prop; - } - return { - top : box.top + wt, - right : box.right - wr, - bottom : box.bottom - wb, - left : box.left + wl, - width : box.right - box.left - wr - wl, - height : box.bottom - box.top - wb - wt - }; -} - -function getTransform(style) { - var transform = getPropertyValue(style, "transform"); - if (transform == "none") { - return null; - } - var matrix = /^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(transform); - if (matrix) { - var origin = getPropertyValue(style, "transform-origin"); - matrix = matrix[1].split(/\s*,\s*/g).map(parseFloat); - origin = origin.split(/\s+/g).map(parseFloat); - return { - matrix: matrix, - origin: origin - }; - } -} - -function radiansToDegrees(radians) { - return ((180 * radians) / Math.PI) % 360; -} - -function parseAngle(angle) { - var num = parseFloat(angle); - if (/grad$/.test(angle)) { - return Math.PI * num / 200; - } - else if (/rad$/.test(angle)) { - return num; - } - else if (/turn$/.test(angle)) { - return Math.PI * num * 2; - } - else if (/deg$/.test(angle)) { - return Math.PI * num / 180; - } -} - -function setTransform(shape, m) { - m = new __WEBPACK_IMPORTED_MODULE_0__geometry__["Matrix"](m[0], m[1], m[2], m[3], m[4], m[5]); - shape.transform(m); - return m; -} - -function setClipping(shape, clipPath) { - shape.clip(clipPath); -} - -function addArcToPath(path, x, y, options) { - var points = new __WEBPACK_IMPORTED_MODULE_0__geometry__["Arc"]([ x, y ], options).curvePoints(), i = 1; - while (i < points.length) { - path.curveTo(points[i++], points[i++], points[i++]); - } -} - -function sanitizeRadius(r) { - if (r.x <= 0 || r.y <= 0) { - r.x = r.y = 0; - } - return r; -} - -function adjustBorderRadiusForBox(box, rTL, rTR, rBR, rBL) { - // adjust border radiuses such that the sum of adjacent - // radiuses is not bigger than the length of the side. - // seems the correct algorithm is variant (3) from here: - // http://www.w3.org/Style/CSS/Tracker/issues/29?changelog - var tl_x = Math.max(0, rTL.x), tl_y = Math.max(0, rTL.y); - var tr_x = Math.max(0, rTR.x), tr_y = Math.max(0, rTR.y); - var br_x = Math.max(0, rBR.x), br_y = Math.max(0, rBR.y); - var bl_x = Math.max(0, rBL.x), bl_y = Math.max(0, rBL.y); - - var f = Math.min( - box.width / (tl_x + tr_x), - box.height / (tr_y + br_y), - box.width / (br_x + bl_x), - box.height / (bl_y + tl_y) - ); - - if (f < 1) { - tl_x *= f; tl_y *= f; - tr_x *= f; tr_y *= f; - br_x *= f; br_y *= f; - bl_x *= f; bl_y *= f; - } - - return { - tl: { x: tl_x, y: tl_y }, - tr: { x: tr_x, y: tr_y }, - br: { x: br_x, y: br_y }, - bl: { x: bl_x, y: bl_y } - }; -} - -function elementRoundBox(element, box, type) { - var style = getComputedStyle(element); - - var rTL = getBorderRadius(style, "top-left"); - var rTR = getBorderRadius(style, "top-right"); - var rBL = getBorderRadius(style, "bottom-left"); - var rBR = getBorderRadius(style, "bottom-right"); - - if (type == "padding" || type == "content") { - var bt = getBorder(style, "top"); - var br = getBorder(style, "right"); - var bb = getBorder(style, "bottom"); - var bl = getBorder(style, "left"); - rTL.x -= bl.width; rTL.y -= bt.width; - rTR.x -= br.width; rTR.y -= bt.width; - rBR.x -= br.width; rBR.y -= bb.width; - rBL.x -= bl.width; rBL.y -= bb.width; - if (type == "content") { - var pt = parseFloat(getPropertyValue(style, "padding-top")); - var pr = parseFloat(getPropertyValue(style, "padding-right")); - var pb = parseFloat(getPropertyValue(style, "padding-bottom")); - var pl = parseFloat(getPropertyValue(style, "padding-left")); - rTL.x -= pl; rTL.y -= pt; - rTR.x -= pr; rTR.y -= pt; - rBR.x -= pr; rBR.y -= pb; - rBL.x -= pl; rBL.y -= pb; - } - } - - if (typeof type == "number") { - rTL.x -= type; rTL.y -= type; - rTR.x -= type; rTR.y -= type; - rBR.x -= type; rBR.y -= type; - rBL.x -= type; rBL.y -= type; - } - - return roundBox(box, rTL, rTR, rBR, rBL); -} - -// Create a drawing.Path for a rounded rectangle. Receives the -// bounding box and the border-radiuses in CSS order (top-left, -// top-right, bottom-right, bottom-left). The radiuses must be -// objects containing x (horiz. radius) and y (vertical radius). -function roundBox(box, rTL0, rTR0, rBR0, rBL0) { - var tmp = adjustBorderRadiusForBox(box, rTL0, rTR0, rBR0, rBL0); - var rTL = tmp.tl; - var rTR = tmp.tr; - var rBR = tmp.br; - var rBL = tmp.bl; - var path = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"]({ fill: null, stroke: null }); - path.moveTo(box.left, box.top + rTL.y); - if (rTL.x) { - addArcToPath(path, box.left + rTL.x, box.top + rTL.y, { - startAngle: -180, - endAngle: -90, - radiusX: rTL.x, - radiusY: rTL.y - }); - } - path.lineTo(box.right - rTR.x, box.top); - if (rTR.x) { - addArcToPath(path, box.right - rTR.x, box.top + rTR.y, { - startAngle: -90, - endAngle: 0, - radiusX: rTR.x, - radiusY: rTR.y - }); - } - path.lineTo(box.right, box.bottom - rBR.y); - if (rBR.x) { - addArcToPath(path, box.right - rBR.x, box.bottom - rBR.y, { - startAngle: 0, - endAngle: 90, - radiusX: rBR.x, - radiusY: rBR.y - }); - } - path.lineTo(box.left + rBL.x, box.bottom); - if (rBL.x) { - addArcToPath(path, box.left + rBL.x, box.bottom - rBL.y, { - startAngle: 90, - endAngle: 180, - radiusX: rBL.x, - radiusY: rBL.y - }); - } - return path.close(); -} - -function formatCounter(val, style) { - var str = String(parseFloat(val)); - switch (style) { - case "decimal-leading-zero": - if (str.length < 2) { - str = "0" + str; - } - return str; - case "lower-roman": - return Object(__WEBPACK_IMPORTED_MODULE_2__util__["arabicToRoman"])(val).toLowerCase(); - case "upper-roman": - return Object(__WEBPACK_IMPORTED_MODULE_2__util__["arabicToRoman"])(val).toUpperCase(); - case "lower-latin": - case "lower-alpha": - return alphaNumeral(val - 1); - case "upper-latin": - case "upper-alpha": - return alphaNumeral(val - 1).toUpperCase(); - default: - return str; - } -} - -function evalPseudoElementContent(element, content) { - function displayCounter(name, style, separator) { - if (!separator) { - return formatCounter(getCounter(name) || 0, style); - } - separator = separator.replace(/^\s*(["'])(.*)\1\s*$/, "$2"); - return getAllCounters(name).map(function(val){ - return formatCounter(val, style); - }).join(separator); - } - var a = splitProperty(content, /^\s+/); - var result = [], m; - a.forEach(function(el){ - var tmp; - if ((m = /^\s*(["'])(.*)\1\s*$/.exec(el))) { - result.push(m[2].replace(/\\([0-9a-f]{4})/gi, function(s, p){ - return String.fromCharCode(parseInt(p, 16)); - })); - } - else if ((m = /^\s*counter\((.*?)\)\s*$/.exec(el))) { - tmp = splitProperty(m[1]); - result.push(displayCounter(tmp[0], tmp[1])); - } - else if ((m = /^\s*counters\((.*?)\)\s*$/.exec(el))) { - tmp = splitProperty(m[1]); - result.push(displayCounter(tmp[0], tmp[2], tmp[1])); - } - else if ((m = /^\s*attr\((.*?)\)\s*$/.exec(el))) { - result.push(element.getAttribute(m[1]) || ""); - } - else { - result.push(el); - } - }); - return result.join(""); -} - -function getCssText(style) { - if (style.cssText) { - return style.cssText; - } - // Status: NEW. Report year: 2002. Current year: 2014. - // Nice played, Mozillians. - // https://bugzilla.mozilla.org/show_bug.cgi?id=137687 - var result = []; - for (var i = 0; i < style.length; ++i) { - result.push(style[i] + ": " + getPropertyValue(style, style[i])); - } - return result.join(";\n"); -} - -function _renderWithPseudoElements(element, group) { - if (element.tagName == KENDO_PSEUDO_ELEMENT) { - _renderElement(element, group); - return; - } - var fake = []; - function pseudo(kind, place) { - var style = getComputedStyle(element, kind), content = style.content; - updateCounters(style); - if (content && content != "normal" && content != "none" && style.width != "0px") { - var psel = element.ownerDocument.createElement(KENDO_PSEUDO_ELEMENT); - psel.style.cssText = getCssText(style); - psel.textContent = evalPseudoElementContent(element, content); - element.insertBefore(psel, place); - fake.push(psel); - } - } - pseudo(":before", element.firstChild); - pseudo(":after", null); - if (fake.length > 0) { - var saveClass = element.className; - element.className += " kendo-pdf-hide-pseudo-elements"; - _renderElement(element, group); - element.className = saveClass; - fake.forEach(function(el){ element.removeChild(el); }); - } else { - _renderElement(element, group); - } -} - -function _renderElement(element, group) { - var style = getComputedStyle(element); - - var top = getBorder(style, "top"); - var right = getBorder(style, "right"); - var bottom = getBorder(style, "bottom"); - var left = getBorder(style, "left"); - - var rTL0 = getBorderRadius(style, "top-left"); - var rTR0 = getBorderRadius(style, "top-right"); - var rBL0 = getBorderRadius(style, "bottom-left"); - var rBR0 = getBorderRadius(style, "bottom-right"); - - var dir = getPropertyValue(style, "direction"); - - var backgroundColor = getPropertyValue(style, "background-color"); - backgroundColor = parseColor(backgroundColor); - - var backgroundImage = parseBackgroundImage( getPropertyValue(style, "background-image") ); - var backgroundRepeat = splitProperty( getPropertyValue(style, "background-repeat") ); - var backgroundPosition = splitProperty( getPropertyValue(style, "background-position") ); - var backgroundOrigin = splitProperty( getPropertyValue(style, "background-origin") ); - var backgroundSize = splitProperty( getPropertyValue(style, "background-size") ); - - if (browser.msie && browser.version < 10) { - // IE9 hacks. getPropertyValue won't return the correct - // value. Sucks that we have to do it here, I'd prefer to - // move it in getPropertyValue, but we don't have the - // element. - backgroundPosition = splitProperty(element.currentStyle.backgroundPosition); - } - - var innerbox = innerBox(element.getBoundingClientRect(), "border-*-width", element); - - // CSS "clip" property - if present, replace the group with a - // new one which is clipped. This must happen before drawing - // the borders and background. - (function(){ - var clip = getPropertyValue(style, "clip"); - var m = /^\s*rect\((.*)\)\s*$/.exec(clip); - if (m) { - var a = m[1].split(/[ ,]+/g); - var top = a[0] == "auto" ? innerbox.top : parseFloat(a[0]) + innerbox.top; - var right = a[1] == "auto" ? innerbox.right : parseFloat(a[1]) + innerbox.left; - var bottom = a[2] == "auto" ? innerbox.bottom : parseFloat(a[2]) + innerbox.top; - var left = a[3] == "auto" ? innerbox.left : parseFloat(a[3]) + innerbox.left; - var tmp = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Group"](); - var clipPath = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"]() - .moveTo(left, top) - .lineTo(right, top) - .lineTo(right, bottom) - .lineTo(left, bottom) - .close(); - setClipping(tmp, clipPath); - group.append(tmp); - group = tmp; - updateClipbox(clipPath); - } - })(); - - var boxes, i, cells; - var display = getPropertyValue(style, "display"); - - if (display == "table-row") { - // because of rowspan/colspan, we shouldn't draw background of table row elements on the - // box given by its getBoundingClientRect, because if we do we risk overwritting a - // previously rendered cell. https://github.com/telerik/kendo/issues/4881 - boxes = []; - for (i = 0, cells = element.children; i < cells.length; ++i) { - boxes.push(cells[i].getBoundingClientRect()); - } - } else { - boxes = element.getClientRects(); - if (boxes.length == 1) { - // Workaround the missing borders in Chrome! getClientRects() boxes contains values - // rounded to integer. getBoundingClientRect() appears to work fine. We still need - // getClientRects() to support cases where there are more boxes (continued inline - // elements that might have border/background). - boxes = [ element.getBoundingClientRect() ]; - } - } - - // This function workarounds another Chrome bug, where boxes returned for a table with - // border-collapse: collapse will overlap the table border. Our rendering is not perfect in - // such case anyway, but with this is better than without it. - boxes = adjustBoxes(boxes); - - for (i = 0; i < boxes.length; ++i) { - drawOneBox(boxes[i], i === 0, i == boxes.length - 1); - } - - // Render links as separate groups. We can't use boxes returned by element's getClientRects - // because if display type is "inline" (default for ), boxes will not include the height of - // images inside. https://github.com/telerik/kendo-ui-core/issues/3359 - if (element.tagName == "A" && element.href && !/^#?$/.test(element.getAttribute("href"))) { - if (!nodeInfo._avoidLinks || !matches(element, nodeInfo._avoidLinks)) { - var r = document.createRange(); - r.selectNodeContents(element); - slice(r.getClientRects()).forEach(function(box){ - var g = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Group"](); - g._pdfLink = { - url : element.href, - top : box.top, - right : box.right, - bottom : box.bottom, - left : box.left - }; - group.append(g); - }); - } - } - - if (boxes.length > 0 && display == "list-item" && !element.getAttribute("kendo-no-bullet")) { - drawBullet(boxes[0]); - } - - // overflow: hidden/auto - if present, replace the group with - // a new one clipped by the inner box. - (function(){ - function clipit() { - var clipPath = elementRoundBox(element, innerbox, "padding"); - var tmp = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Group"](); - setClipping(tmp, clipPath); - group.append(tmp); - group = tmp; - updateClipbox(clipPath); - } - if (isFormField(element)) { - clipit(); - } else if (/^(hidden|auto|scroll)/.test(getPropertyValue(style, "overflow"))) { - clipit(); - } else if (/^(hidden|auto|scroll)/.test(getPropertyValue(style, "overflow-x"))) { - clipit(); - } else if (/^(hidden|auto|scroll)/.test(getPropertyValue(style, "overflow-y"))) { - clipit(); - } - })(); - - if (!maybeRenderWidget(element, group)) { - renderContents(element, group); - } - - return group; // only utility functions after this line. - - function adjustBoxes(boxes) { - if (/^td$/i.test(element.tagName)) { - var table = nodeInfo.table; - if (table && getPropertyValue(table.style, "border-collapse") == "collapse") { - var tableBorderLeft = getBorder(table.style, "left").width; - var tableBorderTop = getBorder(table.style, "top").width; - // check if we need to adjust - if (tableBorderLeft === 0 && tableBorderTop === 0) { - return boxes; // nope - } - var tableBox = table.element.getBoundingClientRect(); - var firstCell = table.element.rows[0].cells[0]; - var firstCellBox = firstCell.getBoundingClientRect(); - if (firstCellBox.top == tableBox.top || firstCellBox.left == tableBox.left) { - return slice(boxes).map(function(box){ - return { - left : box.left + tableBorderLeft, - top : box.top + tableBorderTop, - right : box.right + tableBorderLeft, - bottom : box.bottom + tableBorderTop, - height : box.height, - width : box.width - }; - }); - } - } - } - return boxes; - } - - // this function will be called to draw each border. it - // draws starting at origin and the resulted path must be - // translated/rotated to be placed in the proper position. - // - // arguments are named as if it draws the top border: - // - // - `len` the length of the edge - // - `Wtop` the width of the edge (i.e. border-top-width) - // - `Wleft` the width of the left edge (border-left-width) - // - `Wright` the width of the right edge - // - `rl` and `rl` -- the border radius on the left and right - // (objects containing x and y, for horiz/vertical radius) - // - `transform` -- transformation to apply - // - function drawEdge(color, len, Wtop, Wleft, Wright, rl, rr, transform) { - if (Wtop <= 0) { - return; - } - - var path, edge = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Group"](); - setTransform(edge, transform); - group.append(edge); - - sanitizeRadius(rl); - sanitizeRadius(rr); - - // draw main border. this is the area without the rounded corners - path = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"]({ - fill: { color: color }, - stroke: null - }); - edge.append(path); - path.moveTo(rl.x ? Math.max(rl.x, Wleft) : 0, 0) - .lineTo(len - (rr.x ? Math.max(rr.x, Wright) : 0), 0) - .lineTo(len - Math.max(rr.x, Wright), Wtop) - .lineTo(Math.max(rl.x, Wleft), Wtop) - .close(); - - if (rl.x) { - drawRoundCorner(Wleft, rl, [ -1, 0, 0, 1, rl.x, 0 ]); - } - - if (rr.x) { - drawRoundCorner(Wright, rr, [ 1, 0, 0, 1, len - rr.x, 0 ]); - } - - // draws one round corner, starting at origin (needs to be - // translated/rotated to be placed properly). - function drawRoundCorner(Wright, r, transform) { - var angle = Math.PI/2 * Wright / (Wright + Wtop); - - // not sanitizing this one, because negative values - // are useful to fill the box correctly. - var ri = { - x: r.x - Wright, - y: r.y - Wtop - }; - - var path = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"]({ - fill: { color: color }, - stroke: null - }).moveTo(0, 0); - - setTransform(path, transform); - - addArcToPath(path, 0, r.y, { - startAngle: -90, - endAngle: -radiansToDegrees(angle), - radiusX: r.x, - radiusY: r.y - }); - - if (ri.x > 0 && ri.y > 0) { - path.lineTo(ri.x * Math.cos(angle), r.y - ri.y * Math.sin(angle)); - addArcToPath(path, 0, r.y, { - startAngle: -radiansToDegrees(angle), - endAngle: -90, - radiusX: ri.x, - radiusY: ri.y, - anticlockwise: true - }); - } - else if (ri.x > 0) { - path.lineTo(ri.x, Wtop) - .lineTo(0, Wtop); - } - else { - path.lineTo(ri.x, Wtop) - .lineTo(ri.x, 0); - } - - edge.append(path.close()); - } - } - - function drawBackground(box) { - var background = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Group"](); - setClipping(background, roundBox(box, rTL0, rTR0, rBR0, rBL0)); - group.append(background); - - if (backgroundColor) { - var path = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"]({ - fill: { color: backgroundColor.toCssRgba() }, - stroke: null - }); - path.moveTo(box.left, box.top) - .lineTo(box.right, box.top) - .lineTo(box.right, box.bottom) - .lineTo(box.left, box.bottom) - .close(); - background.append(path); - } - - for (var i = backgroundImage.length; --i >= 0;) { - drawOneBackground( - background, box, - backgroundImage[i], - backgroundRepeat[i % backgroundRepeat.length], - backgroundPosition[i % backgroundPosition.length], - backgroundOrigin[i % backgroundOrigin.length], - backgroundSize[i % backgroundSize.length] - ); - } - } - - function drawOneBackground(group, box, background, backgroundRepeat, backgroundPosition, backgroundOrigin, backgroundSize) { - if (!background || (background == "none")) { - return; - } - - if (background.type == "url") { - // SVG taints the canvas, can't draw it. - if (/^url\(\"data:image\/svg/i.test(background.url)) { - return; - } - var img = IMAGE_CACHE[background.url]; - if (img && img.width > 0 && img.height > 0) { - drawBackgroundImage(group, box, img.width, img.height, function(group, rect){ - group.append(new __WEBPACK_IMPORTED_MODULE_4__drawing__["Image"](background.url, rect)); - }); - } - } else if (background.type == "linear") { - drawBackgroundImage(group, box, box.width, box.height, gradientRenderer(background)); - } else { - return; - } - - function drawBackgroundImage(group, box, img_width, img_height, renderBG) { - var aspect_ratio = img_width / img_height, f; - - // for background-origin: border-box the box is already appropriate - var orgBox = box; - if (backgroundOrigin == "content-box") { - orgBox = innerBox(orgBox, "border-*-width", element); - orgBox = innerBox(orgBox, "padding-*", element); - } else if (backgroundOrigin == "padding-box") { - orgBox = innerBox(orgBox, "border-*-width", element); - } - - if (!/^\s*auto(\s+auto)?\s*$/.test(backgroundSize)) { - if (backgroundSize == "contain") { - f = Math.min(orgBox.width / img_width, - orgBox.height / img_height); - img_width *= f; - img_height *= f; - } - else if (backgroundSize == "cover") { - f = Math.max(orgBox.width / img_width, - orgBox.height / img_height); - img_width *= f; - img_height *= f; - } - else { - var size = backgroundSize.split(/\s+/g); - // compute width - if (/%$/.test(size[0])) { - img_width = orgBox.width * parseFloat(size[0]) / 100; - } else { - img_width = parseFloat(size[0]); - } - // compute height - if (size.length == 1 || size[1] == "auto") { - img_height = img_width / aspect_ratio; - } else if (/%$/.test(size[1])) { - img_height = orgBox.height * parseFloat(size[1]) / 100; - } else { - img_height = parseFloat(size[1]); - } - } - } - - var pos = String(backgroundPosition); - - // IE sometimes reports single-word positions - // https://github.com/telerik/kendo-ui-core/issues/2786 - // - // it seems to switch to percentages when the horizontal - // position is not "center", therefore we don't handle - // multi-word cases here. All other browsers return - // percentages or pixels instead of keywords. At least - // for now... - switch (pos) { - case "bottom" : pos = "50% 100%"; break; - case "top" : pos = "50% 0"; break; - case "left" : pos = "0 50%"; break; - case "right" : pos = "100% 50%"; break; - case "center" : pos = "50% 50%"; break; - } - - pos = pos.split(/\s+/); - if (pos.length == 1) { - pos[1] = "50%"; - } - - if (/%$/.test(pos[0])) { - pos[0] = parseFloat(pos[0]) / 100 * (orgBox.width - img_width); - } else { - pos[0] = parseFloat(pos[0]); - } - if (/%$/.test(pos[1])) { - pos[1] = parseFloat(pos[1]) / 100 * (orgBox.height - img_height); - } else { - pos[1] = parseFloat(pos[1]); - } - - var rect = new __WEBPACK_IMPORTED_MODULE_0__geometry__["Rect"]([ orgBox.left + pos[0], orgBox.top + pos[1] ], [ img_width, img_height ]); - - // XXX: background-repeat could be implemented more - // efficiently as a fill pattern (at least for PDF - // output, probably SVG too). - - function rewX() { - while (rect.origin.x > box.left) { - rect.origin.x -= img_width; - } - } - - function rewY() { - while (rect.origin.y > box.top) { - rect.origin.y -= img_height; - } - } - - function repeatX() { - while (rect.origin.x < box.right) { - renderBG(group, rect.clone()); - rect.origin.x += img_width; - } - } - - if (backgroundRepeat == "no-repeat") { - renderBG(group, rect); - } - else if (backgroundRepeat == "repeat-x") { - rewX(); - repeatX(); - } - else if (backgroundRepeat == "repeat-y") { - rewY(); - while (rect.origin.y < box.bottom) { - renderBG(group, rect.clone()); - rect.origin.y += img_height; - } - } - else if (backgroundRepeat == "repeat") { - rewX(); - rewY(); - var origin = rect.origin.clone(); - while (rect.origin.y < box.bottom) { - rect.origin.x = origin.x; - repeatX(); - rect.origin.y += img_height; - } - } - } - } - - function drawBullet() { - var listStyleType = getPropertyValue(style, "list-style-type"); - if (listStyleType == "none") { - return; - } - var listStylePosition = getPropertyValue(style, "list-style-position"); - - function _drawBullet(f) { - saveStyle(element, function(){ - element.style.position = "relative"; - var bullet = element.ownerDocument.createElement(KENDO_PSEUDO_ELEMENT); - bullet.style.position = "absolute"; - bullet.style.boxSizing = "border-box"; - if (listStylePosition == "outside") { - bullet.style.width = "6em"; - bullet.style.left = "-6.8em"; - bullet.style.textAlign = "right"; - } else { - bullet.style.left = "0px"; - } - f(bullet); - element.insertBefore(bullet, element.firstChild); - renderElement(bullet, group); - element.removeChild(bullet); - }); - } - - function elementIndex(f) { - var a = element.parentNode.children; - var k = element.getAttribute("kendo-split-index"); - if (k != null) { - return f(k|0, a.length); - } - for (var i = 0; i < a.length; ++i) { - if (a[i] === element) { - return f(i, a.length); - } - } - } - - switch (listStyleType) { - case "circle": - case "disc": - case "square": - _drawBullet(function(bullet){ - // XXX: the science behind these values is called "trial and error". - bullet.style.fontSize = "60%"; - bullet.style.lineHeight = "200%"; - bullet.style.paddingRight = "0.5em"; - bullet.style.fontFamily = "DejaVu Serif"; - bullet.innerHTML = { - "disc" : "\u25cf", - "circle" : "\u25ef", - "square" : "\u25a0" - }[listStyleType]; - }); - break; - - case "decimal": - case "decimal-leading-zero": - _drawBullet(function(bullet){ - elementIndex(function(idx){ - ++idx; - if (listStyleType == "decimal-leading-zero" && idx < 10) { - idx = "0" + idx; - } - bullet.innerHTML = idx + "."; - }); - }); - break; - - case "lower-roman": - case "upper-roman": - _drawBullet(function(bullet){ - elementIndex(function(idx){ - idx = Object(__WEBPACK_IMPORTED_MODULE_2__util__["arabicToRoman"])(idx + 1); - if (listStyleType == "upper-roman") { - idx = idx.toUpperCase(); - } - bullet.innerHTML = idx + "."; - }); - }); - break; - - case "lower-latin": - case "lower-alpha": - case "upper-latin": - case "upper-alpha": - _drawBullet(function(bullet){ - elementIndex(function(idx){ - idx = alphaNumeral(idx); - if (/^upper/i.test(listStyleType)) { - idx = idx.toUpperCase(); - } - bullet.innerHTML = idx + "."; - }); - }); - break; - } - } - - // draws a single border box - function drawOneBox(box, isFirst, isLast) { - if (box.width === 0 || box.height === 0) { - return; - } - - drawBackground(box); - - var shouldDrawLeft = (left.width > 0 && ((isFirst && dir == "ltr") || (isLast && dir == "rtl"))); - var shouldDrawRight = (right.width > 0 && ((isLast && dir == "ltr") || (isFirst && dir == "rtl"))); - - // The most general case is that the 4 borders have different widths and border - // radiuses. The way that is handled is by drawing 3 Paths for each border: the - // straight line, and two round corners which represent half of the entire rounded - // corner. To simplify code those shapes are drawed at origin (by the drawEdge - // function), then translated/rotated into the right position. - // - // However, this leads to poor results due to rounding in the simpler cases where - // borders are straight lines. Therefore we handle a few such cases separately with - // straight lines. C^wC^wC^w -- nope, scratch that. poor rendering was because of a bug - // in Chrome (getClientRects() returns rounded integer values rather than exact floats. - // web dev is still a ghetto.) - - // first, just in case there is no border... - if (top.width === 0 && left.width === 0 && right.width === 0 && bottom.width === 0) { - return; - } - - // START paint borders - // if all borders have equal colors... - if (top.color == right.color && top.color == bottom.color && top.color == left.color) { - - // if same widths too, we can draw the whole border by stroking a single path. - if (top.width == right.width && top.width == bottom.width && top.width == left.width) - { - if (shouldDrawLeft && shouldDrawRight) { - // reduce box by half the border width, so we can draw it by stroking. - box = innerBox(box, top.width/2); - - // adjust the border radiuses, again by top.width/2, and make the path element. - var path = elementRoundBox(element, box, top.width/2); - path.options.stroke = { - color: top.color, - width: top.width - }; - group.append(path); - return; - } - } - } - - // if border radiuses are zero and widths are at most one pixel, we can again use simple - // paths. - if (rTL0.x === 0 && rTR0.x === 0 && rBR0.x === 0 && rBL0.x === 0) { - // alright, 1.9px will do as well. the difference in color blending should not be - // noticeable. - if (top.width < 2 && left.width < 2 && right.width < 2 && bottom.width < 2) { - // top border - if (top.width > 0) { - group.append( - new __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"]({ - stroke: { width: top.width, color: top.color } - }) - .moveTo(box.left, box.top + top.width/2) - .lineTo(box.right, box.top + top.width/2) - ); - } - - // bottom border - if (bottom.width > 0) { - group.append( - new __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"]({ - stroke: { width: bottom.width, color: bottom.color } - }) - .moveTo(box.left, box.bottom - bottom.width/2) - .lineTo(box.right, box.bottom - bottom.width/2) - ); - } - - // left border - if (shouldDrawLeft) { - group.append( - new __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"]({ - stroke: { width: left.width, color: left.color } - }) - .moveTo(box.left + left.width/2, box.top) - .lineTo(box.left + left.width/2, box.bottom) - ); - } - - // right border - if (shouldDrawRight) { - group.append( - new __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"]({ - stroke: { width: right.width, color: right.color } - }) - .moveTo(box.right - right.width/2, box.top) - .lineTo(box.right - right.width/2, box.bottom) - ); - } - - return; - } - } - // END paint borders - - var tmp = adjustBorderRadiusForBox(box, rTL0, rTR0, rBR0, rBL0); - var rTL = tmp.tl; - var rTR = tmp.tr; - var rBR = tmp.br; - var rBL = tmp.bl; - - // top border - drawEdge(top.color, - box.width, top.width, left.width, right.width, - rTL, rTR, - [ 1, 0, 0, 1, box.left, box.top ]); - - // bottom border - drawEdge(bottom.color, - box.width, bottom.width, right.width, left.width, - rBR, rBL, - [ -1, 0, 0, -1, box.right, box.bottom ]); - - // for left/right borders we need to invert the border-radiuses - function inv(p) { - return { x: p.y, y: p.x }; - } - - // left border - drawEdge(left.color, - box.height, left.width, bottom.width, top.width, - inv(rBL), inv(rTL), - [ 0, -1, 1, 0, box.left, box.bottom ]); - - // right border - drawEdge(right.color, - box.height, right.width, top.width, bottom.width, - inv(rTR), inv(rBR), - [ 0, 1, -1, 0, box.right, box.top ]); - } -} - -function gradientRenderer(gradient) { - return function(group, rect) { - var width = rect.width(), height = rect.height(); - - switch (gradient.type) { - case "linear": - - // figure out the angle. - var angle = gradient.angle != null ? gradient.angle : Math.PI; - switch (gradient.to) { - case "top": - angle = 0; - break; - case "left": - angle = -Math.PI / 2; - break; - case "bottom": - angle = Math.PI; - break; - case "right": - angle = Math.PI / 2; - break; - case "top left": case "left top": - angle = -Math.atan2(height, width); - break; - case "top right": case "right top": - angle = Math.atan2(height, width); - break; - case "bottom left": case "left bottom": - angle = Math.PI + Math.atan2(height, width); - break; - case "bottom right": case "right bottom": - angle = Math.PI - Math.atan2(height, width); - break; - } - - if (gradient.reverse) { - angle -= Math.PI; - } - - // limit the angle between 0..2PI - angle %= 2 * Math.PI; - if (angle < 0) { - angle += 2 * Math.PI; - } - - // compute gradient's start/end points. here len is the length of the gradient line - // and x,y is the end point relative to the center of the rectangle in conventional - // (math) axis direction. - - // this is the original (unscaled) length of the gradient line. needed to deal with - // absolutely positioned color stops. formula from the CSS spec: - // http://dev.w3.org/csswg/css-images-3/#linear-gradient-syntax - var pxlen = Math.abs(width * Math.sin(angle)) + Math.abs(height * Math.cos(angle)); - - // The math below is pretty simple, but it took a while to figure out. We compute x - // and y, the *end* of the gradient line. However, we want to transform them into - // element-based coordinates (SVG's gradientUnits="objectBoundingBox"). That means, - // x=0 is the left edge, x=1 is the right edge, y=0 is the top edge and y=1 is the - // bottom edge. - // - // A naive approach would use the original angle for these calculations. Say we'd - // like to draw a gradient angled at 45deg in a 100x400 box. When we use - // objectBoundingBox, the renderer will draw it in a 1x1 *square* box, and then - // scale that to the desired dimensions. The 45deg angle will look more like 70deg - // after scaling. SVG (http://www.w3.org/TR/SVG/pservers.html#LinearGradients) says - // the following: - // - // When gradientUnits="objectBoundingBox" and 'gradientTransform' is the - // identity matrix, the normal of the linear gradient is perpendicular to the - // gradient vector in object bounding box space (i.e., the abstract coordinate - // system where (0,0) is at the top/left of the object bounding box and (1,1) is - // at the bottom/right of the object bounding box). When the object's bounding - // box is not square, the gradient normal which is initially perpendicular to - // the gradient vector within object bounding box space may render - // non-perpendicular relative to the gradient vector in user space. If the - // gradient vector is parallel to one of the axes of the bounding box, the - // gradient normal will remain perpendicular. This transformation is due to - // application of the non-uniform scaling transformation from bounding box space - // to user space. - // - // which is an extremely long and confusing way to tell what I just said above. - // - // For this reason we need to apply the reverse scaling to the original angle, so - // that when it'll finally be rendered it'll actually be at the desired slope. Now - // I'll let you figure out the math yourself. - - var scaledAngle = Math.atan(width * Math.tan(angle) / height); - var sin = Math.sin(scaledAngle), cos = Math.cos(scaledAngle); - var len = Math.abs(sin) + Math.abs(cos); - var x = len/2 * sin; - var y = len/2 * cos; - - // Because of the arctangent, our scaledAngle ends up between -PI/2..PI/2, possibly - // losing the intended direction of the gradient. The following fixes it. - if (angle > Math.PI/2 && angle <= 3*Math.PI/2) { - x = -x; - y = -y; - } - - // compute the color stops. - var implicit = [], right = 0; - var stops = gradient.stops.map(function(s, i){ - var offset = s.percent; - if (offset) { - offset = parseFloat(offset) / 100; - } else if (s.length) { - offset = parseFloat(s.length) / pxlen; - } else if (i === 0) { - offset = 0; - } else if (i == gradient.stops.length - 1) { - offset = 1; - } - var stop = { - color: s.color.toCssRgba(), - offset: offset - }; - if (offset != null) { - right = offset; - // fix implicit offsets - implicit.forEach(function(s, i){ - var stop = s.stop; - stop.offset = s.left + (right - s.left) * (i + 1) / (implicit.length + 1); - }); - implicit = []; - } else { - implicit.push({ left: right, stop: stop }); - } - return stop; - }); - - var start = [ 0.5 - x, 0.5 + y ]; - var end = [ 0.5 + x, 0.5 - y ]; - - // finally, draw it. - group.append( - __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"].fromRect(rect) - .stroke(null) - .fill(new __WEBPACK_IMPORTED_MODULE_4__drawing__["LinearGradient"]({ - start : start, - end : end, - stops : stops, - userSpace : false - })) - ); - break; - case "radial": - // XXX: - if (window.console && window.console.log) { - window.console.log("Radial gradients are not yet supported in HTML renderer"); - } - break; - } - }; -} - -function maybeRenderWidget(element, group) { - var visual; - - if (element._kendoExportVisual) { - visual = element._kendoExportVisual(); - } else if (window.kendo && window.kendo.jQuery && element.getAttribute(window.kendo.attr("role"))) { - var widget = window.kendo.widgetInstance(window.kendo.jQuery(element)); - if (widget && (widget.exportDOMVisual || widget.exportVisual)) { - if (widget.exportDOMVisual) { - visual = widget.exportDOMVisual(); - } else { - visual = widget.exportVisual(); - } - } - } - - if (!visual) { - return false; - } - - var wrap = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Group"](); - wrap.children.push(visual); - - var bbox = element.getBoundingClientRect(); - wrap.transform(__WEBPACK_IMPORTED_MODULE_0__geometry__["transform"]().translate(bbox.left, bbox.top)); - - group.append(wrap); - - return true; -} - -function renderImage(element, url, group) { - var box = getContentBox(element); - var rect = new __WEBPACK_IMPORTED_MODULE_0__geometry__["Rect"]([ box.left, box.top ], [ box.width, box.height ]); - var image = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Image"](url, rect); - setClipping(image, elementRoundBox(element, box, "content")); - group.append(image); -} - -function zIndexSort(a, b) { - var sa = getComputedStyle(a); - var sb = getComputedStyle(b); - var za = parseFloat(getPropertyValue(sa, "z-index")); - var zb = parseFloat(getPropertyValue(sb, "z-index")); - var pa = getPropertyValue(sa, "position"); - var pb = getPropertyValue(sb, "position"); - if (isNaN(za) && isNaN(zb)) { - if ((/static|absolute/.test(pa)) && (/static|absolute/.test(pb))) { - return 0; - } - if (pa == "static") { - return -1; - } - if (pb == "static") { - return 1; - } - return 0; - } - if (isNaN(za)) { - return zb === 0 ? 0 : zb > 0 ? -1 : 1; - } - if (isNaN(zb)) { - return za === 0 ? 0 : za > 0 ? 1 : -1; - } - return parseFloat(za) - parseFloat(zb); -} - -function isFormField(element) { - return /^(?:textarea|select|input)$/i.test(element.tagName); -} - -function getSelectedOption(element) { - if (element.selectedOptions && element.selectedOptions.length > 0) { - return element.selectedOptions[0]; - } - return element.options[element.selectedIndex]; -} - -function renderCheckbox(element, group) { - var style = getComputedStyle(element); - var color = getPropertyValue(style, "color"); - var box = element.getBoundingClientRect(); - if (element.type == "checkbox") { - group.append( - __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"].fromRect( - new __WEBPACK_IMPORTED_MODULE_0__geometry__["Rect"]([ box.left+1, box.top+1 ], - [ box.width-2, box.height-2 ]) - ).stroke(color, 1) - ); - if (element.checked) { - // fill a rectangle inside? looks kinda ugly. - // group.append( - // Path.fromRect( - // new geo.Rect([ box.left+4, box.top+4 ], - // [ box.width-8, box.height-8]) - // ).fill(color).stroke(null) - // ); - - // let's draw a checkmark instead. artistic, eh? - group.append( - new __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"]() - .stroke(color, 1.2) - .moveTo(box.left + 0.22 * box.width, - box.top + 0.55 * box.height) - .lineTo(box.left + 0.45 * box.width, - box.top + 0.75 * box.height) - .lineTo(box.left + 0.78 * box.width, - box.top + 0.22 * box.width) - ); - } - } else { - group.append( - new __WEBPACK_IMPORTED_MODULE_4__drawing__["Circle"]( - new __WEBPACK_IMPORTED_MODULE_0__geometry__["Circle"]([ - (box.left + box.right) / 2, - (box.top + box.bottom) / 2 - ], Math.min(box.width-2, box.height-2) / 2) - ).stroke(color, 1) - ); - if (element.checked) { - group.append( - new __WEBPACK_IMPORTED_MODULE_4__drawing__["Circle"]( - new __WEBPACK_IMPORTED_MODULE_0__geometry__["Circle"]([ - (box.left + box.right) / 2, - (box.top + box.bottom) / 2 - ], Math.min(box.width-8, box.height-8) / 2) - ).fill(color).stroke(null) - ); - } - } -} - -function renderFormField(element, group) { - var tag = element.tagName.toLowerCase(); - if (tag == "input" && (element.type == "checkbox" || element.type == "radio")) { - return renderCheckbox(element, group); - } - var p = element.parentNode; - var doc = element.ownerDocument; - var el = doc.createElement(KENDO_PSEUDO_ELEMENT); - var option; - el.style.cssText = getCssText(getComputedStyle(element)); - if (tag == "input") { - el.style.whiteSpace = "pre"; - } - if (tag == "select" || tag == "textarea") { - el.style.overflow = "auto"; - } - if (tag == "select") { - if (element.multiple) { - for (var i = 0; i < element.options.length; ++i) { - option = doc.createElement(KENDO_PSEUDO_ELEMENT); - option.style.cssText = getCssText(getComputedStyle(element.options[i])); - option.style.display = "block"; // IE9 messes up without this - option.textContent = element.options[i].textContent; - el.appendChild(option); - } - } else { - option = getSelectedOption(element); - if (option) { - el.textContent = option.textContent; - } - } - } else { - el.textContent = element.value; - } - p.insertBefore(el, element); - el.scrollLeft = element.scrollLeft; - el.scrollTop = element.scrollTop; - - // must temporarily hide the original element, otherwise it - // may affect layout of the fake element we want to render. - element.style.display = "none"; - - renderContents(el, group); - element.style.display = ""; - p.removeChild(el); -} - -function renderContents(element, group) { - if (nodeInfo._stackingContext.element === element) { - // the group that was set in pushNodeInfo might have - // changed due to clipping/transforms, update it here. - nodeInfo._stackingContext.group = group; - } - switch (element.tagName.toLowerCase()) { - case "img": - renderImage(element, element.src, group); - break; - - case "canvas": - try { - renderImage(element, element.toDataURL("image/png"), group); - } catch (ex) { - // tainted; can't draw it, ignore. - } - break; - - case "textarea": - case "input": - case "select": - renderFormField(element, group); - break; - - default: - var children = [], floats = [], positioned = []; - for (var i = element.firstChild; i; i = i.nextSibling) { - switch (i.nodeType) { - case 3: // Text - if (/\S/.test(i.data)) { - renderText(element, i, group); - } - break; - case 1: // Element - var style = getComputedStyle(i); - var floating = getPropertyValue(style, "float"); - var position = getPropertyValue(style, "position"); - if (position != "static") { - positioned.push(i); - } - else if (floating != "none") { - floats.push(i); - } else { - children.push(i); - } - break; - } - } - - Object(__WEBPACK_IMPORTED_MODULE_2__util__["mergeSort"])(children, zIndexSort).forEach(function(el){ renderElement(el, group); }); - Object(__WEBPACK_IMPORTED_MODULE_2__util__["mergeSort"])(floats, zIndexSort).forEach(function(el){ renderElement(el, group); }); - Object(__WEBPACK_IMPORTED_MODULE_2__util__["mergeSort"])(positioned, zIndexSort).forEach(function(el){ renderElement(el, group); }); - } -} - -function renderText(element, node, group) { - if (emptyClipbox()) { - return; - } - var style = getComputedStyle(element); - - if (parseFloat(getPropertyValue(style, "text-indent")) < -500) { - // assume it should not be displayed. the slider's - // draggable handle displays a Drag text for some reason, - // having text-indent: -3333px. - return; - } - - var text = node.data; - var start = 0; - var end = text.search(/\S\s*$/) + 1; - - if (!end) { - return; // whitespace-only node - } - - var fontSize = getPropertyValue(style, "font-size"); - var lineHeight = getPropertyValue(style, "line-height"); - - // simply getPropertyValue("font") doesn't work in Firefox :-\ - var font = [ - getPropertyValue(style, "font-style"), - getPropertyValue(style, "font-variant"), - getPropertyValue(style, "font-weight"), - fontSize, // no need for line height here; it breaks layout in FF - getPropertyValue(style, "font-family") - ].join(" "); - - fontSize = parseFloat(fontSize); - lineHeight = parseFloat(lineHeight); - - if (fontSize === 0) { - return; - } - - var color = getPropertyValue(style, "color"); - var range = element.ownerDocument.createRange(); - var align = getPropertyValue(style, "text-align"); - var isJustified = align == "justify"; - var columnCount = getPropertyValue(style, "column-count", 1); - var whiteSpace = getPropertyValue(style, "white-space"); - var textTransform = getPropertyValue(style, "text-transform"); - - // IE shrinks the text with text-overflow: ellipsis, - // apparently because the returned bounding box for the range - // is limited to the visible area minus space for the dots, - // instead of being the full width of the text. - // - // https://github.com/telerik/kendo/issues/5232 - var textOverflow, saveTextOverflow; - if (microsoft) { - textOverflow = style.textOverflow; // computed style - if (textOverflow == "ellipsis") { - saveTextOverflow = element.style.textOverflow; // own style. - element.style.textOverflow = "clip"; - } - } - - // A line of 500px, with a font of 12px, contains an average of 80 characters, but since we - // err, we'd like to guess a bigger number rather than a smaller one. Multiplying by 5 - // seems to be a good option. - var estimateLineLength = element.getBoundingClientRect().width / fontSize * 5; - if (estimateLineLength === 0) { - estimateLineLength = 500; - } - - // we'll maintain this so we can workaround bugs in Chrome's Range.getClientRects - // https://github.com/telerik/kendo/issues/5740 - var prevLineBottom = null; - - var underline = nodeInfo["underline"]; - var lineThrough = nodeInfo["line-through"]; - var overline = nodeInfo["overline"]; - var hasDecoration = underline || lineThrough || overline; - - // doChunk returns true when all text has been rendered - while (!doChunk()) {} - - if (microsoft && textOverflow == "ellipsis") { - element.style.textOverflow = saveTextOverflow; - } - - if (hasDecoration) { - range.selectNode(node); - slice(range.getClientRects()).forEach(decorate); - } - - return; // only function declarations after this line - - function actuallyGetRangeBoundingRect(range) { - // XXX: to be revised when this Chrome bug is fixed: - // https://bugs.chromium.org/p/chromium/issues/detail?id=612459 - if (microsoft || browser.chrome) { - // Workaround browser bugs: IE and Chrome would sometimes - // return 0 or 1-width rectangles before or after the main - // one. https://github.com/telerik/kendo/issues/4674 - - // Actually Chrome 50 got worse, since the rectangles can now have the width of a - // full character, making it hard to tell whether it's a bogus rectangle or valid - // selection location. The workaround is to ignore rectangles that fall on the - // previous line. https://github.com/telerik/kendo/issues/5740 - var rectangles = range.getClientRects(), box = { - top : Infinity, - right : -Infinity, - bottom : -Infinity, - left : Infinity - }; - for (var i = 0; i < rectangles.length; ++i) { - var b = rectangles[i]; - if (b.width <= 1 || b.bottom === prevLineBottom) { - continue; // bogus rectangle - } - box.left = Math.min(b.left , box.left); - box.top = Math.min(b.top , box.top); - box.right = Math.max(b.right , box.right); - box.bottom = Math.max(b.bottom , box.bottom); - } - box.width = box.right - box.left; - box.height = box.bottom - box.top; - return box; - } - return range.getBoundingClientRect(); - } - - // Render a chunk of text, typically one line (but for justified text we render each word as - // a separate Text object, because spacing is variable). Returns true when it finished the - // current node. After each chunk it updates `start` to just after the last rendered - // character. - function doChunk() { - var origStart = start; - var box, pos = text.substr(start).search(/\S/); - start += pos; - if (pos < 0 || start >= end) { - return true; - } - - // Select a single character to determine the height of a line of text. The box.bottom - // will be essential for us to figure out where the next line begins. - range.setStart(node, start); - range.setEnd(node, start + 1); - box = actuallyGetRangeBoundingRect(range); - - // for justified text we must split at each space, because space has variable width. - var found = false; - if (isJustified || columnCount > 1) { - pos = text.substr(start).search(/\s/); - if (pos >= 0) { - // we can only split there if it's on the same line, otherwise we'll fall back - // to the default mechanism (see findEOL below). - range.setEnd(node, start + pos); - var r = actuallyGetRangeBoundingRect(range); - if (r.bottom == box.bottom) { - box = r; - found = true; - start += pos; - } - } - } - - if (!found) { - // This code does three things: (1) it selects one line of text in `range`, (2) it - // leaves the bounding rect of that line in `box` and (3) it returns the position - // just after the EOL. We know where the line starts (`start`) but we don't know - // where it ends. To figure this out, we select a piece of text and look at the - // bottom of the bounding box. If it changes, we have more than one line selected - // and should retry with a smaller selection. - // - // To speed things up, we first try to select all text in the node (`start` -> - // `end`). If there's more than one line there, then select only half of it. And - // so on. When we find a value for `end` that fits in one line, we try increasing - // it (also in halves) until we get to the next line. The algorithm stops when the - // right side of the bounding box does not change. - // - // One more thing to note is that everything happens in a single Text DOM node. - // There's no other tags inside it, therefore the left/top coordinates of the - // bounding box will not change. - pos = (function findEOL(min, eol, max){ - range.setEnd(node, eol); - var r = actuallyGetRangeBoundingRect(range); - if (r.bottom != box.bottom && min < eol) { - return findEOL(min, (min + eol) >> 1, eol); - } else if (r.right != box.right) { - box = r; - if (eol < max) { - return findEOL(eol, (eol + max) >> 1, max); - } else { - return eol; - } - } else { - return eol; - } - })(start, Math.min(end, start + estimateLineLength), end); - - if (pos == start) { - // if EOL is at the start, then no more text fits on this line. Skip the - // remainder of this node entirely to avoid a stack overflow. - return true; - } - start = pos; - - pos = range.toString().search(/\s+$/); - if (pos === 0) { - return false; // whitespace only; we should not get here. - } - if (pos > 0) { - // eliminate trailing whitespace - range.setEnd(node, range.startOffset + pos); - box = actuallyGetRangeBoundingRect(range); - } - } - - // another workaround for IE: if we rely on getBoundingClientRect() we'll overlap with the bullet for LI - // elements. Calling getClientRects() and using the *first* rect appears to give us the correct location. - // Note: not to be used in Chrome as it randomly returns a zero-width rectangle from the previous line. - if (microsoft) { - box = range.getClientRects()[0]; - } - - var str = range.toString(); - if (!/^(?:pre|pre-wrap)$/i.test(whiteSpace)) { - // node with non-significant space -- collapse whitespace. - str = str.replace(/\s+/g, " "); - } - else if (/\t/.test(str)) { - // with significant whitespace we need to do something about literal TAB characters. - // There's no TAB glyph in a font so they would be rendered in PDF as an empty box, - // and the whole text will stretch to fill the original width. The core PDF lib - // does not have sufficient context to deal with it. - - // calculate the starting column here, since we initially discarded any whitespace. - var cc = 0; - for (pos = origStart; pos < range.startOffset; ++pos) { - var code = text.charCodeAt(pos); - if (code == 9) { - // when we meet a TAB we must round up to the next tab stop. - // in all browsers TABs seem to be 8 characters. - cc += 8 - cc % 8; - } else if (code == 10 || code == 13) { - // just in case we meet a newline we must restart. - cc = 0; - } else { - // ordinary character --> advance one column - cc++; - } - } - - // based on starting column, replace any TAB characters in the string we actually - // have to display with spaces so that they align to columns multiple of 8. - while ((pos = str.search("\t")) >= 0) { - var indent = " ".substr(0, 8 - (cc + pos) % 8); - str = str.substr(0, pos) + indent + str.substr(pos + 1); - } - } - - if (!found) { - prevLineBottom = box.bottom; - } - drawText(str, box); - } - - function drawText(str, box) { - // In IE the box height will be approximately lineHeight, while in - // other browsers it'll (correctly) be the height of the bounding - // box for the current text/font. Which is to say, IE sucks again. - // The only good solution I can think of is to measure the text - // ourselves and center the bounding box. - if (microsoft && !isNaN(lineHeight)) { - var height = getFontHeight(font); - var top = (box.top + box.bottom - height) / 2; - box = { - top : top, - right : box.right, - bottom : top + height, - left : box.left, - height : height, - width : box.right - box.left - }; - } - - // var path = new Path({ stroke: { color: "red" }}); - // path.moveTo(box.left, box.top) - // .lineTo(box.right, box.top) - // .lineTo(box.right, box.bottom) - // .lineTo(box.left, box.bottom) - // .close(); - // group.append(path); - - switch (textTransform) { - case "uppercase": - str = str.toUpperCase(); - break; - case "lowercase": - str = str.toLowerCase(); - break; - case "capitalize": - str = str.replace(/(?:^|\s)\S/g, function (l) { return l.toUpperCase(); }); - break; - } - - var text = new TextRect( - str, new __WEBPACK_IMPORTED_MODULE_0__geometry__["Rect"]([ box.left, box.top ], - [ box.width, box.height ]), - { - font: font, - fill: { color: color } - } - ); - group.append(text); - } - - function decorate(box) { - line(underline, box.bottom); - line(lineThrough, box.bottom - box.height / 2.7); - line(overline, box.top); - function line(color, ypos) { - if (color) { - var width = fontSize / 12; - var path = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"]({ stroke: { - width: width, - color: color - }}); - - ypos -= width; - path.moveTo(box.left, ypos) - .lineTo(box.right, ypos); - group.append(path); - } - } - } -} - -function groupInStackingContext(element, group, zIndex) { - var main; - if (zIndex != "auto") { - // use the current stacking context - main = nodeInfo._stackingContext.group; - zIndex = parseFloat(zIndex); - } else { - // normal flow — use given container. we still have to - // figure out where should we insert this element with the - // assumption that its z-index is zero, as the group might - // already contain elements with higher z-index. - main = group; - zIndex = 0; - } - var a = main.children; - for (var i = 0; i < a.length; ++i) { - if (a[i]._dom_zIndex != null && a[i]._dom_zIndex > zIndex) { - break; - } - } - - var tmp = new __WEBPACK_IMPORTED_MODULE_4__drawing__["Group"](); - main.insert(i, tmp); - tmp._dom_zIndex = zIndex; - - if (main !== group) { - // console.log("Placing", element, "in", nodeInfo._stackingContext.element, "at position", i, " / ", a.length); - // console.log(a.slice(i+1)); - - // if (nodeInfo._matrix) { - // tmp.transform(nodeInfo._matrix); - // } - if (nodeInfo._clipbox) { - var m = nodeInfo._matrix.invert(); - var r = nodeInfo._clipbox.transformCopy(m); - setClipping(tmp, __WEBPACK_IMPORTED_MODULE_4__drawing__["Path"].fromRect(r)); - // console.log(r); - // tmp.append(Path.fromRect(r)); - // tmp.append(new Text(element.className || element.id, r.topLeft())); - } - } - - return tmp; -} - -function renderElement(element, container) { - var style = getComputedStyle(element); - - updateCounters(style); - - if (/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(element.tagName)) { - return; - } - - if (nodeInfo._clipbox == null) { - return; - } - - var opacity = parseFloat(getPropertyValue(style, "opacity")); - var visibility = getPropertyValue(style, "visibility"); - var display = getPropertyValue(style, "display"); - - if (opacity === 0 || visibility == "hidden" || display == "none") { - return; - } - - var tr = getTransform(style); - var group; - - var zIndex = getPropertyValue(style, "z-index"); - if ((tr || opacity < 1) && zIndex == "auto") { - zIndex = 0; - } - group = groupInStackingContext(element, container, zIndex); - - // XXX: remove at some point - // group._pdfElement = element; - // group.options._pdfDebug = ""; - // if (element.id) { - // group.options._pdfDebug = "#" + element.id; - // } - // if (element.className) { - // group.options._pdfDebug += "." + element.className.split(" ").join("."); - // } - - if (opacity < 1) { - group.opacity(opacity * group.opacity()); - } - - pushNodeInfo(element, style, group); - - if (!tr) { - _renderWithPseudoElements(element, group); - } - else { - saveStyle(element, function(){ - // must clear transform, so getBoundingClientRect returns correct values. - pleaseSetPropertyValue(element.style, "transform", "none", "important"); - - // must also clear transitions, so correct values are returned *immediately* - pleaseSetPropertyValue(element.style, "transition", "none", "important"); - - // the presence of any transform makes it behave like it had position: relative, - // because why not. - // http://meyerweb.com/eric/thoughts/2011/09/12/un-fixing-fixed-elements-with-css-transforms/ - if (getPropertyValue(style, "position") == "static") { - // but only if it's not already positioned. :-/ - pleaseSetPropertyValue(element.style, "position", "relative", "important"); - } - - // must translate to origin before applying the CSS - // transformation, then translate back. - var bbox = element.getBoundingClientRect(); - var x = bbox.left + tr.origin[0]; - var y = bbox.top + tr.origin[1]; - var m = [ 1, 0, 0, 1, -x, -y ]; - m = mmul(m, tr.matrix); - m = mmul(m, [ 1, 0, 0, 1, x, y ]); - m = setTransform(group, m); - - nodeInfo._matrix = nodeInfo._matrix.multiplyCopy(m); - - _renderWithPseudoElements(element, group); - }); - } - - popNodeInfo(); - - //drawDebugBox(element.getBoundingClientRect(), container); -} - -// function drawDebugBox(box, group, color) { -// var path = Path.fromRect(new geo.Rect([ box.left, box.top ], [ box.width, box.height ])); -// if (color) { -// path.stroke(color); -// } -// group.append(path); -// } - -// function dumpTextNode(node) { -// var txt = node.data.replace(/^\s+/, ""); -// if (txt.length < 100) { -// console.log(node.data.length + ": |" + txt); -// } else { -// console.log(node.data.length + ": |" + txt.substr(0, 50) + "|...|" + txt.substr(-50)); -// } -// } - -function mmul(a, b) { - var a1 = a[0], b1 = a[1], c1 = a[2], d1 = a[3], e1 = a[4], f1 = a[5]; - var a2 = b[0], b2 = b[1], c2 = b[2], d2 = b[3], e2 = b[4], f2 = b[5]; - return [ - a1*a2 + b1*c2, a1*b2 + b1*d2, - c1*a2 + d1*c2, c1*b2 + d1*d2, - e1*a2 + f1*c2 + e2, e1*b2 + f1*d2 + f2 - ]; -} - - - - -//# sourceMappingURL=core.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/main.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/drawing.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__pdf__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/pdf.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__html__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/html.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_3__html__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_2__pdf__["b"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_0__drawing__["exportImage"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_0__drawing__["exportSVG"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* unused harmony reexport animationFrame */ -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_4__common__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_4__common__["b"]; }); -/* unused harmony reexport htmlEncode */ -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_4__common__["f"]; }); -/* unused harmony reexport Observable */ -/* unused harmony reexport saveAs */ -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_4__common__["i"]; }); -/* unused harmony reexport template */ -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_4__common__["k"]; }); -/* unused harmony reexport Animation */ -/* unused harmony reexport AnimationFactory */ -/* unused harmony reexport Arc */ -/* unused harmony reexport BaseNode */ -/* unused harmony reexport Circle */ -/* unused harmony reexport Element */ -/* unused harmony reexport Gradient */ -/* unused harmony reexport GradientStop */ -/* unused harmony reexport Group */ -/* unused harmony reexport Image */ -/* unused harmony reexport Layout */ -/* unused harmony reexport LinearGradient */ -/* unused harmony reexport MultiPath */ -/* unused harmony reexport ObserversMixin */ -/* unused harmony reexport OptionsStore */ -/* unused harmony reexport Path */ -/* unused harmony reexport PathParser */ -/* unused harmony reexport QuadNode */ -/* unused harmony reexport RadialGradient */ -/* unused harmony reexport Rect */ -/* unused harmony reexport ShapesQuadTree */ -/* unused harmony reexport Surface */ -/* unused harmony reexport SurfaceFactory */ -/* unused harmony reexport Text */ -/* unused harmony reexport align */ -/* unused harmony reexport fit */ -/* unused harmony reexport stack */ -/* unused harmony reexport vAlign */ -/* unused harmony reexport vStack */ -/* unused harmony reexport vWrap */ -/* unused harmony reexport wrap */ -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__drawing__; }); -/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_1__geometry__; }); -/* unused harmony reexport pdf */ - - - - - - - - - - - - - - - -//# sourceMappingURL=main.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/mixins/measurable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry_matrix__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/matrix.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry_to_matrix__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/to-matrix.js"); - - - -var IDENTITY_MATRIX_HASH = __WEBPACK_IMPORTED_MODULE_0__geometry_matrix__["a" /* default */].IDENTITY.toString(); - -var Measurable = { - extend: function(proto) { - proto.bbox = this.bbox; - proto.geometryChange = this.geometryChange; - }, - - bbox: function(transformation) { - var combinedMatrix = Object(__WEBPACK_IMPORTED_MODULE_1__geometry_to_matrix__["a" /* default */])(this.currentTransform(transformation)); - var matrixHash = combinedMatrix ? combinedMatrix.toString() : IDENTITY_MATRIX_HASH; - var bbox; - - if (this._bboxCache && this._matrixHash === matrixHash) { - bbox = this._bboxCache.clone(); - } else { - bbox = this._bbox(combinedMatrix); - this._bboxCache = bbox ? bbox.clone() : null; - this._matrixHash = matrixHash; - } - - var strokeWidth = this.options.get("stroke.width"); - if (strokeWidth && bbox) { - bbox.expand(strokeWidth / 2); - } - - return bbox; - }, - - geometryChange: function() { - delete this._bboxCache; - this.trigger("geometryChange", { - element: this - }); - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (Measurable); -//# sourceMappingURL=measurable.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -var ObserversMixin = { - extend: function(proto) { - var this$1 = this; - - for (var method in this) { - if (method !== "extend") { - proto[method] = this$1[method]; - } - } - }, - - observers: function() { - this._observers = this._observers || []; - return this._observers; - }, - - addObserver: function(element) { - if (!this._observers) { - this._observers = [ element ]; - } else { - this._observers.push(element); - } - return this; - }, - - removeObserver: function(element) { - var observers = this.observers(); - var index = observers.indexOf(element); - if (index !== -1) { - observers.splice(index, 1); - } - return this; - }, - - trigger: function(methodName, event) { - var observers = this._observers; - - if (observers && !this._suspended) { - for (var idx = 0; idx < observers.length; idx++) { - var observer = observers[idx]; - if (observer[methodName]) { - observer[methodName](event); - } - } - } - return this; - }, - - optionsChange: function(e) { - if ( e === void 0 ) e = {}; - - e.element = this; - this.trigger("optionsChange", e); - }, - - geometryChange: function() { - this.trigger("geometryChange", { - element: this - }); - }, - - suspend: function() { - this._suspended = (this._suspended || 0) + 1; - return this; - }, - - resume: function() { - this._suspended = Math.max((this._suspended || 0) - 1, 0); - return this; - }, - - _observerField: function(field, value) { - if (this[field]) { - this[field].removeObserver(this); - } - this[field] = value; - value.addObserver(this); - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (ObserversMixin); -//# sourceMappingURL=observers-mixin.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/mixins/paintable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - -var GRADIENT = "Gradient"; - -var Paintable = { - extend: function(proto) { - proto.fill = this.fill; - proto.stroke = this.stroke; - }, - - fill: function(color, opacity) { - var options = this.options; - - if (Object(__WEBPACK_IMPORTED_MODULE_0__util__["defined"])(color)) { - if (color && color.nodeType !== GRADIENT) { - var newFill = { - color: color - }; - if (Object(__WEBPACK_IMPORTED_MODULE_0__util__["defined"])(opacity)) { - newFill.opacity = opacity; - } - options.set("fill", newFill); - } else { - options.set("fill", color); - } - - return this; - } - - return options.get("fill"); - }, - - stroke: function(color, width, opacity) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__util__["defined"])(color)) { - this.options.set("stroke.color", color); - - if (Object(__WEBPACK_IMPORTED_MODULE_0__util__["defined"])(width)) { - this.options.set("stroke.width", width); - } - - if (Object(__WEBPACK_IMPORTED_MODULE_0__util__["defined"])(opacity)) { - this.options.set("stroke.opacity", opacity); - } - - return this; - } - - return this.options.get("stroke"); - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (Paintable); -//# sourceMappingURL=paintable.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/mixins/traversable.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -var Traversable = { - extend: function(proto, childrenField) { - proto.traverse = function(callback) { - var children = this[childrenField]; - - for (var i = 0; i < children.length; i++) { - var child = children[i]; - - if (child.traverse) { - child.traverse(callback); - } else { - callback(child); - } - } - - return this; - }; - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (Traversable); -//# sourceMappingURL=traversable.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/parsing/path-parser.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shapes_multi_path__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/multi-path.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__shapes_path__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/path.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__geometry_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__shape_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/parsing/shape-map.js"); - - - - - - -var SEGMENT_REGEX = /([a-df-z]{1})([^a-df-z]*)(z)?/gi; -var SPLIT_REGEX = /[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g; -var MOVE = "m"; -var CLOSE = "z"; - -function parseParameters(str) { - var parameters = []; - str.replace(SPLIT_REGEX, function(match, number) { - parameters.push(parseFloat(number)); - }); - return parameters; -} - -var PathParser = (function (Class) { - function PathParser () { - Class.apply(this, arguments); - } - - if ( Class ) PathParser.__proto__ = Class; - PathParser.prototype = Object.create( Class && Class.prototype ); - PathParser.prototype.constructor = PathParser; - - PathParser.prototype.parse = function parse (str, options) { - var multiPath = new __WEBPACK_IMPORTED_MODULE_1__shapes_multi_path__["a" /* default */](options); - var position = new __WEBPACK_IMPORTED_MODULE_3__geometry_point__["a" /* default */](); - var previousCommand; - - str.replace(SEGMENT_REGEX, function (match, element, params, closePath) { - var command = element.toLowerCase(); - var isRelative = command === element; - var parameters = parseParameters(params.trim()); - - if (command === MOVE) { - if (isRelative) { - position.x += parameters[0]; - position.y += parameters[1]; - } else { - position.x = parameters[0]; - position.y = parameters[1]; - } - - multiPath.moveTo(position.x, position.y); - - if (parameters.length > 2) { - command = "l"; - parameters.splice(0, 2); - } - } - - if (__WEBPACK_IMPORTED_MODULE_4__shape_map__["a" /* default */][command]) { - __WEBPACK_IMPORTED_MODULE_4__shape_map__["a" /* default */][command]( - multiPath, { - parameters: parameters, - position: position, - isRelative: isRelative, - previousCommand: previousCommand - } - ); - - if (closePath && closePath.toLowerCase() === CLOSE) { - multiPath.close(); - } - } else if (command !== MOVE) { - throw new Error("Error while parsing SVG path. Unsupported command: " + command); - } - - previousCommand = command; - }); - - return multiPath; - }; - - return PathParser; -}(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* Class */])); - -PathParser.current = new PathParser(); - -__WEBPACK_IMPORTED_MODULE_2__shapes_path__["a" /* default */].parse = function(str, options) { - return PathParser.current.parse(str, options); -}; - -/* harmony default export */ __webpack_exports__["a"] = (PathParser); -//# sourceMappingURL=path-parser.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/parsing/shape-map.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - -var ShapeMap = { - l: function(path, options) { - var parameters = options.parameters; - var position = options.position; - - for (var i = 0; i < parameters.length; i += 2) { - var point = new __WEBPACK_IMPORTED_MODULE_0__geometry_point__["a" /* default */](parameters[i], parameters[i + 1]); - - if (options.isRelative) { - point.translateWith(position); - } - - path.lineTo(point.x, point.y); - - position.x = point.x; - position.y = point.y; - } - }, - - c: function(path, options) { - var parameters = options.parameters; - var position = options.position; - - for (var i = 0; i < parameters.length; i += 6) { - var controlOut = new __WEBPACK_IMPORTED_MODULE_0__geometry_point__["a" /* default */](parameters[i], parameters[i + 1]); - var controlIn = new __WEBPACK_IMPORTED_MODULE_0__geometry_point__["a" /* default */](parameters[i + 2], parameters[i + 3]); - var point = new __WEBPACK_IMPORTED_MODULE_0__geometry_point__["a" /* default */](parameters[i + 4], parameters[i + 5]); - if (options.isRelative) { - controlIn.translateWith(position); - controlOut.translateWith(position); - point.translateWith(position); - } - - path.curveTo(controlOut, controlIn, point); - - position.x = point.x; - position.y = point.y; - } - }, - - v: function(path, options) { - var value = options.isRelative ? 0 : options.position.x; - - toLineParamaters(options.parameters, true, value); - this.l(path, options); - }, - - h: function(path, options) { - var value = options.isRelative ? 0 : options.position.y; - - toLineParamaters(options.parameters, false, value); - this.l(path, options); - }, - - a: function(path, options) { - var parameters = options.parameters; - var position = options.position; - - for (var i = 0; i < parameters.length; i += 7) { - var radiusX = parameters[i]; - var radiusY = parameters[i + 1]; - var rotation = parameters[i + 2]; - var largeArc = parameters[i + 3]; - var swipe = parameters[i + 4]; - var endPoint = new __WEBPACK_IMPORTED_MODULE_0__geometry_point__["a" /* default */](parameters[i + 5], parameters[i + 6]); - - if (options.isRelative) { - endPoint.translateWith(position); - } - if (position.x !== endPoint.x || position.y !== endPoint.y) { - path.arcTo(endPoint, radiusX, radiusY, largeArc, swipe, rotation); - - position.x = endPoint.x; - position.y = endPoint.y; - } - } - }, - - s: function(path, options) { - var parameters = options.parameters; - var position = options.position; - var previousCommand = options.previousCommand; - var lastControlIn; - - if (previousCommand === "s" || previousCommand === "c") { - lastControlIn = Object(__WEBPACK_IMPORTED_MODULE_1__util__["last"])(Object(__WEBPACK_IMPORTED_MODULE_1__util__["last"])(path.paths).segments).controlIn(); - } - - for (var i = 0; i < parameters.length; i += 4) { - var controlIn = new __WEBPACK_IMPORTED_MODULE_0__geometry_point__["a" /* default */](parameters[i], parameters[i + 1]); - var endPoint = new __WEBPACK_IMPORTED_MODULE_0__geometry_point__["a" /* default */](parameters[i + 2], parameters[i + 3]); - var controlOut; - - if (options.isRelative) { - controlIn.translateWith(position); - endPoint.translateWith(position); - } - - if (lastControlIn) { - controlOut = reflectionPoint(lastControlIn, position); - } else { - controlOut = position.clone(); - } - - lastControlIn = controlIn; - - path.curveTo(controlOut, controlIn, endPoint); - - position.x = endPoint.x; - position.y = endPoint.y; - } - }, - - q: function(path, options) { - var parameters = options.parameters; - var position = options.position; - - for (var i = 0; i < parameters.length; i += 4) { - var controlPoint = new __WEBPACK_IMPORTED_MODULE_0__geometry_point__["a" /* default */](parameters[i], parameters[i + 1]); - var endPoint = new __WEBPACK_IMPORTED_MODULE_0__geometry_point__["a" /* default */](parameters[i + 2], parameters[i + 3]); - - if (options.isRelative) { - controlPoint.translateWith(position); - endPoint.translateWith(position); - } - - var cubicControlPoints = quadraticToCubicControlPoints(position, controlPoint, endPoint); - - path.curveTo(cubicControlPoints.controlOut, cubicControlPoints.controlIn, endPoint); - - position.x = endPoint.x; - position.y = endPoint.y; - } - }, - - t: function(path, options) { - var parameters = options.parameters; - var position = options.position; - var previousCommand = options.previousCommand; - var controlPoint; - - if (previousCommand === "q" || previousCommand === "t") { - var lastSegment = Object(__WEBPACK_IMPORTED_MODULE_1__util__["last"])(Object(__WEBPACK_IMPORTED_MODULE_1__util__["last"])(path.paths).segments); - controlPoint = lastSegment.controlIn().clone() - .translateWith(position.scaleCopy(-1 / 3)) - .scale(3 / 2); - } - - for (var i = 0; i < parameters.length; i += 2) { - var endPoint = new __WEBPACK_IMPORTED_MODULE_0__geometry_point__["a" /* default */](parameters[i], parameters[i + 1]); - if (options.isRelative) { - endPoint.translateWith(position); - } - - if (controlPoint) { - controlPoint = reflectionPoint(controlPoint, position); - } else { - controlPoint = position.clone(); - } - - var cubicControlPoints = quadraticToCubicControlPoints(position, controlPoint, endPoint); - - path.curveTo(cubicControlPoints.controlOut, cubicControlPoints.controlIn, endPoint); - - position.x = endPoint.x; - position.y = endPoint.y; - } - } -}; - -function toLineParamaters(parameters, isVertical, value) { - var insertPosition = isVertical ? 0 : 1; - - for (var i = 0; i < parameters.length; i += 2) { - parameters.splice(i + insertPosition, 0, value); - } -} - -function reflectionPoint(point, center) { - if (point && center) { - return center.scaleCopy(2).translate(-point.x, -point.y); - } -} - -var third = 1 / 3; - -function quadraticToCubicControlPoints(position, controlPoint, endPoint) { - var scaledPoint = controlPoint.clone().scale(2 / 3); - return { - controlOut: scaledPoint.clone().translateWith(position.scaleCopy(third)), - controlIn: scaledPoint.translateWith(endPoint.scaleCopy(third)) - }; -} - -/* harmony default export */ __webpack_exports__["a"] = (ShapeMap); -//# sourceMappingURL=shape-map.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/pdf.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__pdf_core__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/pdf/core.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__pdf_core__["d"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__pdf_core__["f"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__pdf_drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/pdf/drawing.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__pdf_drawing__["a"]; }); - - - -//# sourceMappingURL=pdf.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/pdf/core.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PDFDocument; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return defineFont; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return parseFontDef; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getFontURL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return loadFonts; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return loadImages; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getPaperOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return clearImageCache; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return TEXT_RENDERING_MODE; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/pdf/utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ttf__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/pdf/ttf.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deflate__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/pdf/deflate.js"); -/* unused harmony reexport BinaryStream */ -/* eslint-disable no-multi-spaces, key-spacing, indent, camelcase, space-before-blocks, eqeqeq, brace-style */ -/* eslint-disable space-infix-ops, space-before-function-paren, array-bracket-spacing, object-curly-spacing */ -/* eslint-disable no-nested-ternary, max-params, default-case, no-else-return, no-empty */ -/* eslint-disable no-param-reassign, no-var, block-scoped-var */ - - - - - - -var browser = __WEBPACK_IMPORTED_MODULE_1__common__["i" /* support */].browser; -// XXX: remove this junk (assume `true`) when we no longer have to support IE < 10 -var HAS_TYPED_ARRAYS = typeof Uint8Array !== 'undefined'; - -var NL = "\n"; - -var RESOURCE_COUNTER = 0; - -var PAPER_SIZE = { - a0 : [ 2383.94 , 3370.39 ], - a1 : [ 1683.78 , 2383.94 ], - a2 : [ 1190.55 , 1683.78 ], - a3 : [ 841.89 , 1190.55 ], - a4 : [ 595.28 , 841.89 ], - a5 : [ 419.53 , 595.28 ], - a6 : [ 297.64 , 419.53 ], - a7 : [ 209.76 , 297.64 ], - a8 : [ 147.40 , 209.76 ], - a9 : [ 104.88 , 147.40 ], - a10 : [ 73.70 , 104.88 ], - b0 : [ 2834.65 , 4008.19 ], - b1 : [ 2004.09 , 2834.65 ], - b2 : [ 1417.32 , 2004.09 ], - b3 : [ 1000.63 , 1417.32 ], - b4 : [ 708.66 , 1000.63 ], - b5 : [ 498.90 , 708.66 ], - b6 : [ 354.33 , 498.90 ], - b7 : [ 249.45 , 354.33 ], - b8 : [ 175.75 , 249.45 ], - b9 : [ 124.72 , 175.75 ], - b10 : [ 87.87 , 124.72 ], - c0 : [ 2599.37 , 3676.54 ], - c1 : [ 1836.85 , 2599.37 ], - c2 : [ 1298.27 , 1836.85 ], - c3 : [ 918.43 , 1298.27 ], - c4 : [ 649.13 , 918.43 ], - c5 : [ 459.21 , 649.13 ], - c6 : [ 323.15 , 459.21 ], - c7 : [ 229.61 , 323.15 ], - c8 : [ 161.57 , 229.61 ], - c9 : [ 113.39 , 161.57 ], - c10 : [ 79.37 , 113.39 ], - executive : [ 521.86 , 756.00 ], - folio : [ 612.00 , 936.00 ], - legal : [ 612.00 , 1008.00 ], - letter : [ 612.00 , 792.00 ], - tabloid : [ 792.00 , 1224.00 ] -}; - -function makeOutput() { - var indentLevel = 0, output = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - function out() { - var arguments$1 = arguments; - - for (var i = 0; i < arguments.length; ++i) { - var x = arguments$1[i]; - if (x === undefined) { - throw new Error("Cannot output undefined to PDF"); - } - else if (x instanceof PDFValue) { - x.beforeRender(out); - x.render(out); - } - else if (isArray(x)) { - renderArray(x, out); - } - else if (isDate(x)) { - renderDate(x, out); - } - else if (typeof x == "number") { - if (isNaN(x)) { - throw new Error("Cannot output NaN to PDF"); - } - // make sure it doesn't end up in exponent notation - var num = x.toFixed(7); - if (num.indexOf(".") >= 0) { - num = num.replace(/\.?0+$/, ""); - } - if (num == "-0") { - num = "0"; - } - output.writeString(num); - } - else if (/string|boolean/.test(typeof x)) { - output.writeString(String(x)); - } - else if (typeof x.get == "function") { - output.write(x.get()); - } - else if (typeof x == "object") { - if (!x) { - output.writeString("null"); - } else { - out(new PDFDictionary(x)); - } - } - } - } - out.writeData = function(data) { - output.write(data); - }; - out.withIndent = function(f) { - ++indentLevel; - f(out); - --indentLevel; - }; - out.indent = function() { - out(NL, pad("", indentLevel * 2, " ")); - out.apply(null, arguments); - }; - out.offset = function() { - return output.offset(); - }; - out.toString = function() { - throw new Error("FIX CALLER"); - }; - out.get = function() { - return output.get(); - }; - out.stream = function() { - return output; - }; - return out; -} - -function wrapObject(value, id) { - var beforeRender = value.beforeRender; - var renderValue = value.render; - - value.beforeRender = function(){}; - - value.render = function(out) { - out(id, " 0 R"); - }; - - value.renderFull = function(out) { - value._offset = out.offset(); - out(id, " 0 obj "); - beforeRender.call(value, out); - renderValue.call(value, out); - out(" endobj"); - }; -} - -function getPaperOptions(getOption) { - if (typeof getOption != "function") { - var options = getOption; - getOption = function(key, def) { - return key in options ? options[key] : def; - }; - } - var paperSize = getOption("paperSize", PAPER_SIZE.a4); - if (!paperSize) { - return {}; - } - if (typeof paperSize == "string") { - paperSize = PAPER_SIZE[paperSize.toLowerCase()]; - if (paperSize == null) { - throw new Error("Unknown paper size"); - } - } - - paperSize[0] = unitsToPoints(paperSize[0]); - paperSize[1] = unitsToPoints(paperSize[1]); - - if (getOption("landscape", false)) { - paperSize = [ - Math.max(paperSize[0], paperSize[1]), - Math.min(paperSize[0], paperSize[1]) - ]; - } - - var margin = getOption("margin"); - if (margin) { - if (typeof margin == "string" || typeof margin == "number") { - margin = unitsToPoints(margin, 0); - margin = { left: margin, top: margin, right: margin, bottom: margin }; - } else { - margin = { - left : unitsToPoints(margin.left, 0), - top : unitsToPoints(margin.top, 0), - right : unitsToPoints(margin.right, 0), - bottom : unitsToPoints(margin.bottom, 0) - }; - } - if (getOption("addMargin")) { - paperSize[0] += margin.left + margin.right; - paperSize[1] += margin.top + margin.bottom; - } - } - return { paperSize: paperSize, margin: margin }; -} - -function PDFDocument(options) { - var self = this; - var out = makeOutput(); - var objcount = 0; - var objects = []; - - function getOption(name, defval) { - return (options && options[name] != null) ? options[name] : defval; - } - - self.getOption = getOption; - - self.attach = function(value) { - if (objects.indexOf(value) < 0) { - wrapObject(value, ++objcount); - objects.push(value); - } - return value; - }; - - self.pages = []; - - self.FONTS = {}; - self.IMAGES = {}; - self.GRAD_COL_FUNCTIONS = {}; // cache for color gradient functions - self.GRAD_OPC_FUNCTIONS = {}; // cache for opacity gradient functions - self.GRAD_COL = {}; // cache for whole color gradient objects - self.GRAD_OPC = {}; // cache for whole opacity gradient objects - - var catalog = self.attach(new PDFCatalog()); - var pageTree = self.attach(new PDFPageTree()); - catalog.setPages(pageTree); - - var info = self.attach(new PDFDictionary({ - Producer : new PDFString(getOption("producer", "Kendo UI PDF Generator")), // XXX: kendo.version? - Title : new PDFString(getOption("title", "")), - Author : new PDFString(getOption("author", "")), - Subject : new PDFString(getOption("subject", "")), - Keywords : new PDFString(getOption("keywords", "")), - Creator : new PDFString(getOption("creator", "Kendo UI PDF Generator")), - CreationDate : getOption("date", new Date()) - })); - - self.addPage = function(options) { - var paperOptions = getPaperOptions(function(name, defval){ - return (options && options[name] != null) ? options[name] : defval; - }); - var paperSize = paperOptions.paperSize; - var margin = paperOptions.margin; - var contentWidth = paperSize[0]; - var contentHeight = paperSize[1]; - if (margin) { - contentWidth -= margin.left + margin.right; - contentHeight -= margin.top + margin.bottom; - } - var content = new PDFStream(makeOutput(), null, true); - var props = { - Contents : self.attach(content), - Parent : pageTree, - MediaBox : [ 0, 0, paperSize[0], paperSize[1] ] - }; - var page = new PDFPage(self, props); - page._content = content; - pageTree.addPage(self.attach(page)); - - // canvas-like coord. system. (0,0) is upper-left. - // text must be vertically mirorred before drawing. - page.transform(1, 0, 0, -1, 0, paperSize[1]); - - if (margin) { - page.translate(margin.left, margin.top); - // XXX: clip to right/bottom margin. Make this optional? - page.rect(0, 0, contentWidth, contentHeight); - page.clip(); - } - - self.pages.push(page); - return page; - }; - - self.render = function() { - var i; - /// file header - out("%PDF-1.4", NL, "%\xc2\xc1\xda\xcf\xce", NL, NL); - - /// file body - for (i = 0; i < objects.length; ++i) { - objects[i].renderFull(out); - out(NL, NL); - } - - /// cross-reference table - var xrefOffset = out.offset(); - out("xref", NL, 0, " ", objects.length + 1, NL); - out("0000000000 65535 f ", NL); - for (i = 0; i < objects.length; ++i) { - out(zeropad(objects[i]._offset, 10), " 00000 n ", NL); - } - out(NL); - - /// trailer - out("trailer", NL); - out(new PDFDictionary({ - Size: objects.length + 1, - Root: catalog, - Info: info - }), NL, NL); - - /// end - out("startxref", NL, xrefOffset, NL); - out("%%EOF", NL); - - return out.stream().offset(0); - }; -} - -var FONT_CACHE = { - "Times-Roman" : true, - "Times-Bold" : true, - "Times-Italic" : true, - "Times-BoldItalic" : true, - "Helvetica" : true, - "Helvetica-Bold" : true, - "Helvetica-Oblique" : true, - "Helvetica-BoldOblique" : true, - "Courier" : true, - "Courier-Bold" : true, - "Courier-Oblique" : true, - "Courier-BoldOblique" : true, - "Symbol" : true, - "ZapfDingbats" : true -}; - -function loadBinary(url, cont) { - function error() { - if (window.console) { - if (window.console.error) { - window.console.error("Cannot load URL: %s", url); - } else { - window.console.log("Cannot load URL: %s", url); - } - } - cont(null); - } - var req = new XMLHttpRequest(); - req.open('GET', url, true); - if (HAS_TYPED_ARRAYS) { - req.responseType = "arraybuffer"; - } - req.onload = function() { - if (req.status == 200 || req.status == 304) { - if (HAS_TYPED_ARRAYS) { - cont(new Uint8Array(req.response)); - } else { - cont(new window.VBArray(req.responseBody).toArray()); // IE9 only - } - } else { - error(); - } - }; - req.onerror = error; - req.send(null); -} - -function loadFont(url, cont) { - var font = FONT_CACHE[url]; - if (font) { - cont(font); - } else { - loadBinary(url, function(data){ - if (data == null) { - throw new Error("Cannot load font from " + url); - } else { - var font = new __WEBPACK_IMPORTED_MODULE_2__ttf__["a" /* TTFFont */](data); - FONT_CACHE[url] = font; - cont(font); - } - }); - } -} - -var IMAGE_CACHE = {}; - -function clearImageCache() { - IMAGE_CACHE = {}; -} - -function loadImage(url, size, cont) { - var img = IMAGE_CACHE[url], bloburl, blob; - if (img) { - cont(img); - } else { - img = new Image(); - if (!(/^data:/i.test(url))) { - img.crossOrigin = "Anonymous"; - } - if (HAS_TYPED_ARRAYS && !(/^data:/i.test(url))) { - // IE10 fails to load images from another domain even when the server sends the - // proper CORS headers. a XHR, however, will be able to load the data. - // http://stackoverflow.com/a/19734516/154985 - // - // On the other hand, it's worth doing it this way for all browsers which support - // responseType = "blob" (HAS_TYPED_ARRAYS will be true), because we can inspect the - // mime type and if it's a JPEG (very common case) we can save a lot of time in - // _load below. - var xhr = new XMLHttpRequest(); - xhr.onload = function() { - blob = xhr.response; - bloburl = URL.createObjectURL(blob); - _load(bloburl); - }; - xhr.onerror = _onerror; - xhr.open("GET", url, true); - xhr.responseType = "blob"; - xhr.send(); - } else { - _load(url); - } - } - - function _load(url) { - img.src = url; - if (img.complete && !browser.msie) { - // IE, bless it's little heart, says img.complete == true even though the image is - // not loaded (width=0), therefore we must go the onload route (ticket 929635). - _onload(); - } else { - img.onload = _onload; - img.onerror = _onerror; - } - } - - function _onerror() { - cont(IMAGE_CACHE[url] = "TAINTED"); - } - - function _onload() { - if (size) { - // but if requested size is bigger than the image, just use the original image. - if (size.width >= img.width || size.height >= img.height) { - size = null; - } - } - if (!size && blob && /^image\/jpe?g$/i.test(blob.type)) { - // If we know we got a JPEG, we can skip the process of rendering it to a - // canvas, getting the pixel data, searching for transparency we know we won't - // find, getting back a data URI and then decoding the BASE64 to finally get the - // binary we already have. Also, we avoid downgrading the image quality, with - // the possible drawback of making a bigger PDF; still, seems legit. - // - // Besides saving a lot of work, this also reuses the buffer memory - // (BinaryStream does not create a copy), potentially saving some GC cycles. - var reader = new FileReader(); - reader.onload = function() { - var img = new PDFJpegImage(Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(new Uint8Array(this.result))); - URL.revokeObjectURL(bloburl); - cont(IMAGE_CACHE[url] = img); - }; - reader.readAsArrayBuffer(blob); - return; - } - - if (!size) { - size = { width: img.width, height: img.height }; - } - - var canvas = document.createElement("canvas"); - canvas.width = size.width; - canvas.height = size.height; - - var ctx = canvas.getContext("2d"); - ctx.drawImage(img, 0, 0, size.width, size.height); - - var imgdata; - try { - imgdata = ctx.getImageData(0, 0, size.width, size.height); - } catch (ex) { - // it tainted the canvas -- can't draw it. - _onerror(); - return; - } finally { - if (bloburl) { - URL.revokeObjectURL(bloburl); - } - } - - // in case it contains transparency, we must separate rgb data from the alpha - // channel and create a PDFRawImage image with opacity. otherwise we can use a - // PDFJpegImage. - // - // to do this in one step, we create the rgb and alpha streams anyway, even if - // we might end up not using them if hasAlpha remains false. - - var hasAlpha = false, rgb = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(), alpha = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - var rawbytes = imgdata.data; - var i = 0; - while (i < rawbytes.length) { - rgb.writeByte(rawbytes[i++]); - rgb.writeByte(rawbytes[i++]); - rgb.writeByte(rawbytes[i++]); - var a = rawbytes[i++]; - if (a < 255) { - hasAlpha = true; - } - alpha.writeByte(a); - } - - if (hasAlpha) { - img = new PDFRawImage(size.width, size.height, rgb, alpha); - } else { - // no transparency, encode as JPEG. - var data = canvas.toDataURL("image/jpeg"); - data = data.substr(data.indexOf(";base64,") + 8); - - var stream = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - stream.writeBase64(data); - img = new PDFJpegImage(stream); - } - - cont(IMAGE_CACHE[url] = img); - } -} - -function manyLoader(loadOne) { - return function(urls, callback) { - var n = urls.length, i = n; - if (n === 0) { - return callback(); - } - function next() { - if (--n === 0) { - callback(); - } - } - while (i-- > 0) { - loadOne(urls[i], next); - } - }; -} - -var loadFonts = manyLoader(loadFont); -var loadImages = function(images, callback) { - var urls = Object.keys(images), n = urls.length; - if (n === 0) { - return callback(); - } - function next() { - if (--n === 0) { - callback(); - } - } - urls.forEach(function(url){ - loadImage(url, images[url], next); - }); -}; - -PDFDocument.prototype = { - loadFonts: loadFonts, - loadImages: loadImages, - - getFont: function(url) { - var font = this.FONTS[url]; - if (!font) { - font = FONT_CACHE[url]; - if (!font) { - throw new Error("Font " + url + " has not been loaded"); - } - if (font === true) { - font = this.attach(new PDFStandardFont(url)); - } else { - font = this.attach(new PDFFont(this, font)); - } - this.FONTS[url] = font; - } - return font; - }, - - getImage: function(url) { - var img = this.IMAGES[url]; - if (!img) { - img = IMAGE_CACHE[url]; - if (!img) { - throw new Error("Image " + url + " has not been loaded"); - } - if (img === "TAINTED") { - return null; - } - img = this.IMAGES[url] = this.attach(img.asStream(this)); - } - return img; - }, - - getOpacityGS: function(opacity, forStroke) { - var id = parseFloat(opacity).toFixed(3); - opacity = parseFloat(id); - id += forStroke ? "S" : "F"; - var cache = this._opacityGSCache || (this._opacityGSCache = {}); - var gs = cache[id]; - if (!gs) { - var props = { - Type: _("ExtGState") - }; - if (forStroke) { - props.CA = opacity; - } else { - props.ca = opacity; - } - gs = this.attach(new PDFDictionary(props)); - gs._resourceName = _("GS" + (++RESOURCE_COUNTER)); - cache[id] = gs; - } - return gs; - }, - - dict: function(props) { - return new PDFDictionary(props); - }, - - name: function(str) { - return _(str); - }, - - stream: function(props, content) { - return new PDFStream(content, props); - } -}; - -/* -----[ utils ]----- */ - -function pad(str, len, ch) { - while (str.length < len) { - str = ch + str; - } - return str; -} - -function zeropad(n, len) { - return pad(String(n), len, "0"); -} - -function hasOwnProperty(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - -var isArray = Array.isArray || function(obj) { - return obj instanceof Array; -}; - -function isDate(obj) { - return obj instanceof Date; -} - -function renderArray(a, out) { - out("["); - if (a.length > 0) { - out.withIndent(function(){ - for (var i = 0; i < a.length; ++i) { - if (i > 0 && i % 8 === 0) { - out.indent(a[i]); - } else { - out(" ", a[i]); - } - } - }); - //out.indent(); - } - out(" ]"); -} - -function renderDate(date, out) { - out("(D:", - zeropad(date.getUTCFullYear(), 4), - zeropad(date.getUTCMonth() + 1, 2), - zeropad(date.getUTCDate(), 2), - zeropad(date.getUTCHours(), 2), - zeropad(date.getUTCMinutes(), 2), - zeropad(date.getUTCSeconds(), 2), - "Z)"); -} - -function mm2pt(mm) { - return mm * (72/25.4); -} - -function cm2pt(cm) { - return mm2pt(cm * 10); -} - -function in2pt(inch) { - return inch * 72; -} - - -function unitsToPoints(x, def) { - if (typeof x == "number") { - return x; - } - if (typeof x == "string") { - var m; - m = /^\s*([0-9.]+)\s*(mm|cm|in|pt)\s*$/.exec(x); - if (m) { - var num = parseFloat(m[1]); - if (!isNaN(num)) { - if (m[2] == "pt") { - return num; - } - return { - "mm": mm2pt, - "cm": cm2pt, - "in": in2pt - }[m[2]](num); - } - } - } - if (def != null) { - return def; - } - throw new Error("Can't parse unit: " + x); -} - -/* -----[ PDF basic objects ]----- */ - -function PDFValue(){} - -PDFValue.prototype.beforeRender = function(){}; - -function defclass(Ctor, proto, Base) { - if (!Base) { - Base = PDFValue; - } - Ctor.prototype = new Base(); - for (var i in proto) { - if (hasOwnProperty(proto, i)) { - Ctor.prototype[i] = proto[i]; - } - } - return Ctor; -} - -/// strings - -var PDFString = defclass(function PDFString(value){ - this.value = value; -}, { - render: function(out) { - var txt = "", val = this.value; - for (var i = 0; i < val.length; ++i) { - txt += String.fromCharCode(val.charCodeAt(i) & 0xFF); - } - out("(", txt.replace(/([\(\)\\])/g, "\\$1"), ")"); - }, - toString: function() { - return this.value; - } -}); - -var PDFHexString = defclass(function PDFHexString(value){ - this.value = value; -}, { - render: function(out) { - var this$1 = this; - - out("<"); - for (var i = 0; i < this.value.length; ++i) { - out(zeropad(this$1.value.charCodeAt(i).toString(16), 4)); - } - out(">"); - } -}, PDFString); - -/// names - -var PDFName = defclass(function PDFName(name) { - this.name = name; -}, { - render: function(out) { - out("/" + this.escape()); - }, - escape: function() { - return this.name.replace(/[^\x21-\x7E]/g, function(c){ - return "#" + zeropad(c.charCodeAt(0).toString(16), 2); - }); - }, - toString: function() { - return this.name; - } -}); - -var PDFName_cache = {}; -PDFName.get = _; - -function _(name) { - if (hasOwnProperty(PDFName_cache, name)) { - return PDFName_cache[name]; - } - return (PDFName_cache[name] = new PDFName(name)); -} - -/// dictionary - -var PDFDictionary = defclass(function PDFDictionary(props) { - this.props = props; -}, { - render: function(out) { - var props = this.props, empty = true; - out("<<"); - out.withIndent(function(){ - for (var i in props) { - if (hasOwnProperty(props, i) && !/^_/.test(i)) { - empty = false; - out.indent(_(i), " ", props[i]); - } - } - }); - if (!empty) { - out.indent(); - } - out(">>"); - } -}); - -/// streams - -var PDFStream = defclass(function PDFStream(data, props, compress) { - if (typeof data == "string") { - var tmp = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - tmp.write(data); - data = tmp; - } - this.data = data; - this.props = props || {}; - this.compress = compress; -}, { - render: function(out) { - var data = this.data.get(), props = this.props; - if (this.compress && Object(__WEBPACK_IMPORTED_MODULE_3__deflate__["b" /* supportsDeflate */])()) { - if (!props.Filter) { - props.Filter = []; - } else if (!(props.Filter instanceof Array)) { - props.Filter = [ props.Filter ]; - } - props.Filter.unshift(_("FlateDecode")); - data = Object(__WEBPACK_IMPORTED_MODULE_3__deflate__["a" /* deflate */])(data); - } - props.Length = data.length; - out(new PDFDictionary(props), " stream", NL); - out.writeData(data); - out(NL, "endstream"); - } -}); - -/// catalog - -var PDFCatalog = defclass(function PDFCatalog(props){ - props = this.props = props || {}; - props.Type = _("Catalog"); -}, { - setPages: function(pagesObj) { - this.props.Pages = pagesObj; - } -}, PDFDictionary); - -/// page tree - -var PDFPageTree = defclass(function PDFPageTree(){ - this.props = { - Type : _("Pages"), - Kids : [], - Count : 0 - }; -}, { - addPage: function(pageObj) { - this.props.Kids.push(pageObj); - this.props.Count++; - } -}, PDFDictionary); - -/// images - -// JPEG - -var SOF_CODES = [0xc0, 0xc1, 0xc2, 0xc3, 0xc5, 0xc6, 0xc7, 0xc9, 0xca, 0xcb, 0xcd, 0xce, 0xcf]; - -function PDFJpegImage(data) { - // we must determine the correct color space. we'll parse a bit - // of the JPEG stream for this, it's still better than going - // through the canvas. - // https://github.com/telerik/kendo-ui-core/issues/2845 - data.offset(0); - var width, height, colorSpace, bitsPerComponent; - var soi = data.readShort(); - if (soi != 0xFFD8) { - // XXX: do we have some better options here? - throw new Error("Invalid JPEG image"); - } - while (!data.eof()) { - var ff = data.readByte(); - if (ff != 0xFF) { - throw new Error("Invalid JPEG image"); - } - var marker = data.readByte(); - var length = data.readShort(); - if (SOF_CODES.indexOf(marker) >= 0) { - // "start of frame" marker - bitsPerComponent = data.readByte(); - height = data.readShort(); - width = data.readShort(); - colorSpace = data.readByte(); - break; - } - data.skip(length - 2); - } - - if (colorSpace == null) { - throw new Error("Invalid JPEG image"); - } - - var props = { - Type : _("XObject"), - Subtype : _("Image"), - Width : width, - Height : height, - BitsPerComponent : bitsPerComponent, - Filter : _("DCTDecode") - }; - - switch (colorSpace) { - case 1: - props.ColorSpace = _("DeviceGray"); - break; - case 3: - props.ColorSpace = _("DeviceRGB"); - break; - case 4: - props.ColorSpace = _("DeviceCMYK"); - props.Decode = [ 1, 0, 1, 0, 1, 0, 1, 0 ]; // invert colors - break; - } - - this.asStream = function() { - data.offset(0); - var stream = new PDFStream(data, props); - stream._resourceName = _("I" + (++RESOURCE_COUNTER)); - return stream; - }; -} - -// PDFRawImage will be used for images with transparency (PNG) - -function PDFRawImage(width, height, rgb, alpha) { - this.asStream = function(pdf) { - var mask = new PDFStream(alpha, { - Type : _("XObject"), - Subtype : _("Image"), - Width : width, - Height : height, - BitsPerComponent : 8, - ColorSpace : _("DeviceGray") - }, true); - var stream = new PDFStream(rgb, { - Type : _("XObject"), - Subtype : _("Image"), - Width : width, - Height : height, - BitsPerComponent : 8, - ColorSpace : _("DeviceRGB"), - SMask : pdf.attach(mask) - }, true); - stream._resourceName = _("I" + (++RESOURCE_COUNTER)); - return stream; - }; -} - -/// standard fonts - -var PDFStandardFont = defclass(function PDFStandardFont(name){ - this.props = { - Type : _("Font"), - Subtype : _("Type1"), - BaseFont : _(name) - }; - this._resourceName = _("F" + (++RESOURCE_COUNTER)); -}, { - encodeText: function(str) { - return new PDFString(String(str)); - } -}, PDFDictionary); - -/// TTF fonts - -var PDFFont = defclass(function PDFFont(pdf, font, props){ - props = this.props = props || {}; - props.Type = _("Font"); - props.Subtype = _("Type0"); - props.Encoding = _("Identity-H"); - - this._pdf = pdf; - this._font = font; - this._sub = font.makeSubset(); - this._resourceName = _("F" + (++RESOURCE_COUNTER)); - - var head = font.head; - - this.name = font.psName; - var scale = this.scale = font.scale; - this.bbox = [ - head.xMin * scale, - head.yMin * scale, - head.xMax * scale, - head.yMax * scale - ]; - - this.italicAngle = font.post.italicAngle; - this.ascent = font.ascent * scale; - this.descent = font.descent * scale; - this.lineGap = font.lineGap * scale; - this.capHeight = font.os2.capHeight || this.ascent; - this.xHeight = font.os2.xHeight || 0; - this.stemV = 0; - - this.familyClass = (font.os2.familyClass || 0) >> 8; - this.isSerif = this.familyClass >= 1 && this.familyClass <= 7; - this.isScript = this.familyClass == 10; - - this.flags = ((font.post.isFixedPitch ? 1 : 0) | - (this.isSerif ? 1 << 1 : 0) | - (this.isScript ? 1 << 3 : 0) | - (this.italicAngle !== 0 ? 1 << 6 : 0) | - (1 << 5)); -}, { - encodeText: function(text) { - return new PDFHexString(this._sub.encodeText(String(text))); - }, - getTextWidth: function(fontSize, text) { - var this$1 = this; - - var width = 0, codeMap = this._font.cmap.codeMap; - for (var i = 0; i < text.length; ++i) { - var glyphId = codeMap[text.charCodeAt(i)]; - width += this$1._font.widthOfGlyph(glyphId || 0); - } - return width * fontSize / 1000; - }, - beforeRender: function() { - var self = this; - var sub = self._sub; - - // write the TTF data - var data = sub.render(); - var fontStream = new PDFStream(Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(data), { - Length1: data.length - }, true); - - var descriptor = self._pdf.attach(new PDFDictionary({ - Type : _("FontDescriptor"), - FontName : _(self._sub.psName), - FontBBox : self.bbox, - Flags : self.flags, - StemV : self.stemV, - ItalicAngle : self.italicAngle, - Ascent : self.ascent, - Descent : self.descent, - CapHeight : self.capHeight, - XHeight : self.xHeight, - FontFile2 : self._pdf.attach(fontStream) - })); - - var cmap = sub.ncid2ogid; - var firstChar = sub.firstChar; - var lastChar = sub.lastChar; - var charWidths = []; - (function loop(i, chunk){ - if (i <= lastChar) { - var gid = cmap[i]; - if (gid == null) { - loop(i + 1); - } else { - if (!chunk) { - charWidths.push(i, chunk = []); - } - chunk.push(self._font.widthOfGlyph(gid)); - loop(i + 1, chunk); - } - } - })(firstChar); - - // As if two dictionaries weren't enough, we need another - // one, the "descendant font". Only that one can be of - // Subtype CIDFontType2. PDF is the X11 of document - // formats: portable but full of legacy that nobody cares - // about anymore. - - var descendant = new PDFDictionary({ - Type: _("Font"), - Subtype: _("CIDFontType2"), - BaseFont: _(self._sub.psName), - CIDSystemInfo: new PDFDictionary({ - Registry : new PDFString("Adobe"), - Ordering : new PDFString("Identity"), - Supplement : 0 - }), - FontDescriptor: descriptor, - FirstChar: firstChar, - LastChar: lastChar, - DW: Math.round(self._font.widthOfGlyph(0)), - W: charWidths, - CIDToGIDMap: self._pdf.attach(self._makeCidToGidMap()) - }); - - var dict = self.props; - dict.BaseFont = _(self._sub.psName); - dict.DescendantFonts = [ self._pdf.attach(descendant) ]; - - // Compute the ToUnicode map so that apps can extract - // meaningful text from the PDF. - var unimap = new PDFToUnicodeCmap(firstChar, lastChar, sub.subset); - var unimapStream = new PDFStream(makeOutput(), null, true); - unimapStream.data(unimap); - dict.ToUnicode = self._pdf.attach(unimapStream); - }, - _makeCidToGidMap: function() { - return new PDFStream(Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(this._sub.cidToGidMap()), null, true); - } -}, PDFDictionary); - -var PDFToUnicodeCmap = defclass(function PDFUnicodeCMap(firstChar, lastChar, map){ - this.firstChar = firstChar; - this.lastChar = lastChar; - this.map = map; -}, { - render: function(out) { - out.indent("/CIDInit /ProcSet findresource begin"); - out.indent("12 dict begin"); - out.indent("begincmap"); - out.indent("/CIDSystemInfo <<"); - out.indent(" /Registry (Adobe)"); - out.indent(" /Ordering (UCS)"); - out.indent(" /Supplement 0"); - out.indent(">> def"); - out.indent("/CMapName /Adobe-Identity-UCS def"); - out.indent("/CMapType 2 def"); - out.indent("1 begincodespacerange"); - out.indent(" <0000>"); - out.indent("endcodespacerange"); - - var self = this; - out.indent(self.lastChar - self.firstChar + 1, " beginbfchar"); - out.withIndent(function(){ - for (var code = self.firstChar; code <= self.lastChar; ++code) { - var unicode = self.map[code]; - var str = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["c" /* ucs2encode */])([ unicode ]); - out.indent("<", zeropad(code.toString(16), 4), ">", "<"); - for (var i = 0; i < str.length; ++i) { - out(zeropad(str.charCodeAt(i).toString(16), 4)); - } - out(">"); - } - }); - out.indent("endbfchar"); - - out.indent("endcmap"); - out.indent("CMapName currentdict /CMap defineresource pop"); - out.indent("end"); - out.indent("end"); - } -}); - -/// gradients - -function makeHash(a) { - return a.map(function(x){ - return isArray(x) ? makeHash(x) - : typeof x == "number" ? (Math.round(x * 1000) / 1000).toFixed(3) - : x; - }).join(" "); -} - -function cacheColorGradientFunction(pdf, r1, g1, b1, r2, g2, b2) { - var hash = makeHash([ r1, g1, b1, r2, g2, b2 ]); - var func = pdf.GRAD_COL_FUNCTIONS[hash]; - if (!func) { - func = pdf.GRAD_COL_FUNCTIONS[hash] = pdf.attach(new PDFDictionary({ - FunctionType: 2, - Domain: [ 0, 1 ], - Range: [ 0, 1, 0, 1, 0, 1 ], - N: 1, - C0: [ r1 , g1 , b1 ], - C1: [ r2 , g2 , b2 ] - })); - } - return func; -} - -function cacheOpacityGradientFunction(pdf, a1, a2) { - var hash = makeHash([ a1, a2 ]); - var func = pdf.GRAD_OPC_FUNCTIONS[hash]; - if (!func) { - func = pdf.GRAD_OPC_FUNCTIONS[hash] = pdf.attach(new PDFDictionary({ - FunctionType: 2, - Domain: [ 0, 1 ], - Range: [ 0, 1 ], - N: 1, - C0: [ a1 ], - C1: [ a2 ] - })); - } - return func; -} - -function makeGradientFunctions(pdf, stops) { - var hasAlpha = false; - var opacities = []; - var colors = []; - var offsets = []; - var encode = []; - var i, prev, cur, prevColor, curColor; - for (i = 1; i < stops.length; ++i) { - prev = stops[i - 1]; - cur = stops[i]; - prevColor = prev.color; - curColor = cur.color; - colors.push(cacheColorGradientFunction( - pdf, - prevColor.r, prevColor.g, prevColor.b, - curColor.r, curColor.g, curColor.b - )); - if (prevColor.a < 1 || curColor.a < 1) { - hasAlpha = true; - } - offsets.push(cur.offset); - encode.push(0, 1); - } - if (hasAlpha) { - for (i = 1; i < stops.length; ++i) { - prev = stops[i - 1]; - cur = stops[i]; - prevColor = prev.color; - curColor = cur.color; - opacities.push(cacheOpacityGradientFunction( - pdf, prevColor.a, curColor.a - )); - } - } - offsets.pop(); - return { - hasAlpha : hasAlpha, - colors : assemble(colors), - opacities : hasAlpha ? assemble(opacities) : null - }; - function assemble(funcs) { - if (funcs.length == 1) { - return funcs[0]; - } - return { - FunctionType: 3, - Functions: funcs, - Domain: [ 0, 1 ], - Bounds: offsets, - Encode: encode - }; - } -} - -function cacheColorGradient(pdf, isRadial, stops, coords, funcs, box) { - var shading, hash; - // if box is given then we have user-space coordinates, which - // means the gradient is designed for a certain position/size - // on page. caching won't do any good. - if (!box) { - var a = [ isRadial ].concat(coords); - stops.forEach(function(x){ - a.push(x.offset, x.color.r, x.color.g, x.color.b); - }); - hash = makeHash(a); - shading = pdf.GRAD_COL[hash]; - } - if (!shading) { - shading = new PDFDictionary({ - Type: _("Shading"), - ShadingType: isRadial ? 3 : 2, - ColorSpace: _("DeviceRGB"), - Coords: coords, - Domain: [ 0, 1 ], - Function: funcs, - Extend: [ true, true ] - }); - pdf.attach(shading); - shading._resourceName = "S" + (++RESOURCE_COUNTER); - if (hash) { - pdf.GRAD_COL[hash] = shading; - } - } - return shading; -} - -function cacheOpacityGradient(pdf, isRadial, stops, coords, funcs, box) { - var opacity, hash; - // if box is given then we have user-space coordinates, which - // means the gradient is designed for a certain position/size - // on page. caching won't do any good. - if (!box) { - var a = [ isRadial ].concat(coords); - stops.forEach(function(x){ - a.push(x.offset, x.color.a); - }); - hash = makeHash(a); - opacity = pdf.GRAD_OPC[hash]; - } - if (!opacity) { - opacity = new PDFDictionary({ - Type: _("ExtGState"), - AIS: false, - CA: 1, - ca: 1, - SMask: { - Type: _("Mask"), - S: _("Luminosity"), - G: pdf.attach(new PDFStream("/a0 gs /s0 sh", { - Type: _("XObject"), - Subtype: _("Form"), - FormType: 1, - BBox: (box ? [ - box.left, box.top + box.height, box.left + box.width, box.top - ] : [ 0, 1, 1, 0 ]), - Group: { - Type: _("Group"), - S: _("Transparency"), - CS: _("DeviceGray"), - I: true - }, - Resources: { - ExtGState: { - a0: { CA: 1, ca: 1 } - }, - Shading: { - s0: { - ColorSpace: _("DeviceGray"), - Coords: coords, - Domain: [ 0, 1 ], - ShadingType: isRadial ? 3 : 2, - Function: funcs, - Extend: [ true, true ] - } - } - } - })) - } - }); - pdf.attach(opacity); - opacity._resourceName = "O" + (++RESOURCE_COUNTER); - if (hash) { - pdf.GRAD_OPC[hash] = opacity; - } - } - return opacity; -} - -function cacheGradient(pdf, gradient, box) { - var isRadial = gradient.type == "radial"; - var funcs = makeGradientFunctions(pdf, gradient.stops); - var coords = isRadial ? [ - gradient.start.x , gradient.start.y , gradient.start.r, - gradient.end.x , gradient.end.y , gradient.end.r - ] : [ - gradient.start.x , gradient.start.y, - gradient.end.x , gradient.end.y - ]; - var shading = cacheColorGradient( - pdf, isRadial, gradient.stops, coords, funcs.colors, gradient.userSpace && box - ); - var opacity = funcs.hasAlpha ? cacheOpacityGradient( - pdf, isRadial, gradient.stops, coords, funcs.opacities, gradient.userSpace && box - ) : null; - return { - hasAlpha: funcs.hasAlpha, - shading: shading, - opacity: opacity - }; -} - -/// page object - -var PDFPage = defclass(function PDFPage(pdf, props){ - this._pdf = pdf; - this._rcount = 0; - this._textMode = false; - this._fontResources = {}; - this._gsResources = {}; - this._xResources = {}; - this._patResources = {}; - this._shResources = {}; - this._opacity = 1; - this._matrix = [ 1, 0, 0, 1, 0, 0 ]; - this._annotations = []; - - this._font = null; - this._fontSize = null; - - this._contextStack = []; - - props = this.props = props || {}; - props.Type = _("Page"); - props.ProcSet = [ - _("PDF"), - _("Text"), - _("ImageB"), - _("ImageC"), - _("ImageI") - ]; - props.Resources = new PDFDictionary({ - Font : new PDFDictionary(this._fontResources), - ExtGState : new PDFDictionary(this._gsResources), - XObject : new PDFDictionary(this._xResources), - Pattern : new PDFDictionary(this._patResources), - Shading : new PDFDictionary(this._shResources) - }); - props.Annots = this._annotations; -}, { - _out: function() { - this._content.data.apply(null, arguments); - }, - transform: function(a, b, c, d, e, f) { - if (!isIdentityMatrix(arguments)) { - this._matrix = mmul(arguments, this._matrix); - this._out(a, " ", b, " ", c, " ", d, " ", e, " ", f, " cm"); - // XXX: debug - // this._out(" % current matrix: ", this._matrix); - this._out(NL); - } - }, - translate: function(dx, dy) { - this.transform(1, 0, 0, 1, dx, dy); - }, - scale: function(sx, sy) { - this.transform(sx, 0, 0, sy, 0, 0); - }, - rotate: function(angle) { - var cos = Math.cos(angle), sin = Math.sin(angle); - this.transform(cos, sin, -sin, cos, 0, 0); - }, - beginText: function() { - this._textMode = true; - this._out("BT", NL); - }, - endText: function() { - this._textMode = false; - this._out("ET", NL); - }, - _requireTextMode: function() { - if (!this._textMode) { - throw new Error("Text mode required; call page.beginText() first"); - } - }, - _requireFont: function() { - if (!this._font) { - throw new Error("No font selected; call page.setFont() first"); - } - }, - setFont: function(font, size) { - this._requireTextMode(); - if (font == null) { - font = this._font; - } else if (!(font instanceof PDFFont)) { - font = this._pdf.getFont(font); - } - if (size == null) { - size = this._fontSize; - } - this._fontResources[font._resourceName] = font; - this._font = font; - this._fontSize = size; - this._out(font._resourceName, " ", size, " Tf", NL); - }, - setTextLeading: function(size) { - this._requireTextMode(); - this._out(size, " TL", NL); - }, - setTextRenderingMode: function(mode) { - this._requireTextMode(); - this._out(mode, " Tr", NL); - }, - showText: function(text, requestedWidth) { - this._requireFont(); - if (text.length > 1 && requestedWidth && this._font instanceof PDFFont) { - var outputWidth = this._font.getTextWidth(this._fontSize, text); - var scale = requestedWidth / outputWidth * 100; - this._out(scale, " Tz "); - } - this._out(this._font.encodeText(text), " Tj", NL); - }, - showTextNL: function(text) { - this._requireFont(); - this._out(this._font.encodeText(text), " '", NL); - }, - addLink: function(uri, box) { - var ll = this._toPage({ x: box.left, y: box.bottom }); - var ur = this._toPage({ x: box.right, y: box.top }); - this._annotations.push(new PDFDictionary({ - Type : _("Annot"), - Subtype : _("Link"), - Rect : [ ll.x, ll.y, ur.x, ur.y ], - Border : [ 0, 0, 0 ], - A : new PDFDictionary({ - Type : _("Action"), - S : _("URI"), - URI : new PDFString(uri) - }) - })); - }, - setStrokeColor: function(r, g, b) { - this._out(r, " ", g, " ", b, " RG", NL); - }, - setOpacity: function(opacity) { - this.setFillOpacity(opacity); - this.setStrokeOpacity(opacity); - this._opacity *= opacity; - }, - setStrokeOpacity: function(opacity) { - if (opacity < 1) { - var gs = this._pdf.getOpacityGS(this._opacity * opacity, true); - this._gsResources[gs._resourceName] = gs; - this._out(gs._resourceName, " gs", NL); - } - }, - setFillColor: function(r, g, b) { - this._out(r, " ", g, " ", b, " rg", NL); - }, - setFillOpacity: function(opacity) { - if (opacity < 1) { - var gs = this._pdf.getOpacityGS(this._opacity * opacity, false); - this._gsResources[gs._resourceName] = gs; - this._out(gs._resourceName, " gs", NL); - } - }, - gradient: function(gradient, box) { - this.save(); - this.rect(box.left, box.top, box.width, box.height); - this.clip(); - if (!gradient.userSpace) { - this.transform(box.width, 0, 0, box.height, box.left, box.top); - } - var g = cacheGradient(this._pdf, gradient, box); - var sname = g.shading._resourceName, oname; - this._shResources[sname] = g.shading; - if (g.hasAlpha) { - oname = g.opacity._resourceName; - this._gsResources[oname] = g.opacity; - this._out("/" + oname + " gs "); - } - this._out("/" + sname + " sh", NL); - this.restore(); - }, - setDashPattern: function(dashArray, dashPhase) { - this._out(dashArray, " ", dashPhase, " d", NL); - }, - setLineWidth: function(width) { - this._out(width, " w", NL); - }, - setLineCap: function(lineCap) { - this._out(lineCap, " J", NL); - }, - setLineJoin: function(lineJoin) { - this._out(lineJoin, " j", NL); - }, - setMitterLimit: function(mitterLimit) { - this._out(mitterLimit, " M", NL); - }, - save: function() { - this._contextStack.push(this._context()); - this._out("q", NL); - }, - restore: function() { - this._out("Q", NL); - this._context(this._contextStack.pop()); - }, - - // paths - moveTo: function(x, y) { - this._out(x, " ", y, " m", NL); - }, - lineTo: function(x, y) { - this._out(x, " ", y, " l", NL); - }, - bezier: function(x1, y1, x2, y2, x3, y3) { - this._out(x1, " ", y1, " ", x2, " ", y2, " ", x3, " ", y3, " c", NL); - }, - bezier1: function(x1, y1, x3, y3) { - this._out(x1, " ", y1, " ", x3, " ", y3, " y", NL); - }, - bezier2: function(x2, y2, x3, y3) { - this._out(x2, " ", y2, " ", x3, " ", y3, " v", NL); - }, - close: function() { - this._out("h", NL); - }, - rect: function(x, y, w, h) { - this._out(x, " ", y, " ", w, " ", h, " re", NL); - }, - ellipse: function(x, y, rx, ry) { - function _X(v) { return x + v; } - function _Y(v) { return y + v; } - - // how to get to the "magic number" is explained here: - // http://www.whizkidtech.redprince.net/bezier/circle/kappa/ - var k = 0.5522847498307936; - - this.moveTo(_X(0), _Y(ry)); - this.bezier( - _X(rx * k) , _Y(ry), - _X(rx) , _Y(ry * k), - _X(rx) , _Y(0) - ); - this.bezier( - _X(rx) , _Y(-ry * k), - _X(rx * k) , _Y(-ry), - _X(0) , _Y(-ry) - ); - this.bezier( - _X(-rx * k) , _Y(-ry), - _X(-rx) , _Y(-ry * k), - _X(-rx) , _Y(0) - ); - this.bezier( - _X(-rx) , _Y(ry * k), - _X(-rx * k) , _Y(ry), - _X(0) , _Y(ry) - ); - }, - circle: function(x, y, r) { - this.ellipse(x, y, r, r); - }, - stroke: function() { - this._out("S", NL); - }, - nop: function() { - this._out("n", NL); - }, - clip: function() { - this._out("W n", NL); - }, - clipStroke: function() { - this._out("W S", NL); - }, - closeStroke: function() { - this._out("s", NL); - }, - fill: function() { - this._out("f", NL); - }, - fillStroke: function() { - this._out("B", NL); - }, - drawImage: function(url) { - var img = this._pdf.getImage(url); - if (img) { // the result can be null for a cross-domain image - this._xResources[img._resourceName] = img; - this._out(img._resourceName, " Do", NL); - } - }, - comment: function(txt) { - var self = this; - txt.split(/\r?\n/g).forEach(function(line){ - self._out("% ", line, NL); - }); - }, - - // internal - _context: function(val) { - if (val != null) { - this._opacity = val.opacity; - this._matrix = val.matrix; - } else { - return { - opacity: this._opacity, - matrix: this._matrix - }; - } - }, - - _toPage: function(p) { - var m = this._matrix; - var a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5]; - return { - x: a*p.x + c*p.y + e, - y: b*p.x + d*p.y + f - }; - } -}, PDFDictionary); - -function unquote(str) { - return str.replace(/^\s*(['"])(.*)\1\s*$/, "$2"); -} - -function parseFontDef(fontdef) { - // XXX: this is very crude for now and buggy. Proper parsing is quite involved. - var rx = /^\s*((normal|italic)\s+)?((normal|small-caps)\s+)?((normal|bold|\d+)\s+)?(([0-9.]+)(px|pt))(\/(([0-9.]+)(px|pt)|normal))?\s+(.*?)\s*$/i; - var m = rx.exec(fontdef); - if (!m) { - return { fontSize: 12, fontFamily: "sans-serif" }; - } - var fontSize = m[8] ? parseInt(m[8], 10) : 12; - return { - italic : m[2] && m[2].toLowerCase() == "italic", - variant : m[4], - bold : m[6] && /bold|700/i.test(m[6]), - fontSize : fontSize, - lineHeight : m[12] ? m[12] == "normal" ? fontSize : parseInt(m[12], 10) : null, - fontFamily : m[14].split(/\s*,\s*/g).map(unquote) - }; -} - -function getFontURL(style) { - function mkFamily(name) { - if (style.bold) { - name += "|bold"; - } - if (style.italic) { - name += "|italic"; - } - return name.toLowerCase(); - } - var fontFamily = style.fontFamily; - var name, url; - if (fontFamily instanceof Array) { - for (var i = 0; i < fontFamily.length; ++i) { - name = mkFamily(fontFamily[i]); - url = FONT_MAPPINGS[name]; - if (url) { - break; - } - } - } else { - url = FONT_MAPPINGS[fontFamily.toLowerCase()]; - } - while (typeof url == "function") { - url = url(); - } - if (!url) { - url = "Times-Roman"; - } - return url; -} - -var FONT_MAPPINGS = { - "serif" : "Times-Roman", - "serif|bold" : "Times-Bold", - "serif|italic" : "Times-Italic", - "serif|bold|italic" : "Times-BoldItalic", - "sans-serif" : "Helvetica", - "sans-serif|bold" : "Helvetica-Bold", - "sans-serif|italic" : "Helvetica-Oblique", - "sans-serif|bold|italic" : "Helvetica-BoldOblique", - "monospace" : "Courier", - "monospace|bold" : "Courier-Bold", - "monospace|italic" : "Courier-Oblique", - "monospace|bold|italic" : "Courier-BoldOblique", - "zapfdingbats" : "ZapfDingbats", - "zapfdingbats|bold" : "ZapfDingbats", - "zapfdingbats|italic" : "ZapfDingbats", - "zapfdingbats|bold|italic" : "ZapfDingbats" -}; - -function fontAlias(alias, name) { - alias = alias.toLowerCase(); - FONT_MAPPINGS[alias] = function() { - return FONT_MAPPINGS[name]; - }; - FONT_MAPPINGS[alias + "|bold"] = function() { - return FONT_MAPPINGS[name + "|bold"]; - }; - FONT_MAPPINGS[alias + "|italic"] = function() { - return FONT_MAPPINGS[name + "|italic"]; - }; - FONT_MAPPINGS[alias + "|bold|italic"] = function() { - return FONT_MAPPINGS[name + "|bold|italic"]; - }; -} - -// Let's define some common names to an appropriate replacement. -// These are overridable via pdf.defineFont, should the user want to -// include the proper versions. - -fontAlias("Times New Roman" , "serif"); -fontAlias("Courier New" , "monospace"); -fontAlias("Arial" , "sans-serif"); -fontAlias("Helvetica" , "sans-serif"); -fontAlias("Verdana" , "sans-serif"); -fontAlias("Tahoma" , "sans-serif"); -fontAlias("Georgia" , "sans-serif"); -fontAlias("Monaco" , "monospace"); -fontAlias("Andale Mono" , "monospace"); - -function defineFont(name, url) { - if (arguments.length == 1) { - for (var i in name) { - if (hasOwnProperty(name, i)) { - defineFont(i, name[i]); - } - } - } else { - name = name.toLowerCase(); - FONT_MAPPINGS[name] = url; - - // special handling for DejaVu fonts: if they get defined, - // let them also replace the default families, for good - // Unicode support out of the box. - switch (name) { - case "dejavu sans" : FONT_MAPPINGS["sans-serif"] = url; break; - case "dejavu sans|bold" : FONT_MAPPINGS["sans-serif|bold"] = url; break; - case "dejavu sans|italic" : FONT_MAPPINGS["sans-serif|italic"] = url; break; - case "dejavu sans|bold|italic" : FONT_MAPPINGS["sans-serif|bold|italic"] = url; break; - case "dejavu serif" : FONT_MAPPINGS["serif"] = url; break; - case "dejavu serif|bold" : FONT_MAPPINGS["serif|bold"] = url; break; - case "dejavu serif|italic" : FONT_MAPPINGS["serif|italic"] = url; break; - case "dejavu serif|bold|italic" : FONT_MAPPINGS["serif|bold|italic"] = url; break; - case "dejavu mono" : FONT_MAPPINGS["monospace"] = url; break; - case "dejavu mono|bold" : FONT_MAPPINGS["monospace|bold"] = url; break; - case "dejavu mono|italic" : FONT_MAPPINGS["monospace|italic"] = url; break; - case "dejavu mono|bold|italic" : FONT_MAPPINGS["monospace|bold|italic"] = url; break; - } - } -} - -function mmul(a, b) { - var a1 = a[0], b1 = a[1], c1 = a[2], d1 = a[3], e1 = a[4], f1 = a[5]; - var a2 = b[0], b2 = b[1], c2 = b[2], d2 = b[3], e2 = b[4], f2 = b[5]; - return [ - a1*a2 + b1*c2, a1*b2 + b1*d2, - c1*a2 + d1*c2, c1*b2 + d1*d2, - e1*a2 + f1*c2 + e2, e1*b2 + f1*d2 + f2 - ]; -} - -function isIdentityMatrix(m) { - return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1 && m[4] === 0 && m[5] === 0; -} - -var TEXT_RENDERING_MODE = { - fill : 0, - stroke : 1, - fillAndStroke : 2, - invisible : 3, - fillAndClip : 4, - strokeAndClip : 5, - fillStrokeClip : 6, - clip : 7 -}; - - - -//# sourceMappingURL=core.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/pdf/deflate.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return deflate; }); -/* harmony export (immutable) */ __webpack_exports__["b"] = supportsDeflate; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_pako_dist_pako_deflate__ = __webpack_require__("../../../../pako/dist/pako_deflate.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_pako_dist_pako_deflate___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_pako_dist_pako_deflate__); - - -var deflate = __WEBPACK_IMPORTED_MODULE_0_pako_dist_pako_deflate__["deflate"]; - -function supportsDeflate() { - return true; -} - - -//# sourceMappingURL=deflate.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/pdf/drawing.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return exportPDF; }); -/* unused harmony export saveAs */ -/* unused harmony export toDataURL */ -/* unused harmony export toBlob */ -/* unused harmony export render */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/pdf/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__drawing__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/drawing.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__geometry__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry.js"); -/* eslint-disable no-multi-spaces, key-spacing, indent, camelcase, space-before-blocks, eqeqeq, brace-style */ -/* eslint-disable space-infix-ops, space-before-function-paren, array-bracket-spacing, object-curly-spacing */ -/* eslint-disable no-nested-ternary, max-params, default-case, no-else-return, no-empty */ -/* eslint-disable no-param-reassign, no-var, block-scoped-var */ - - - - - - - -var TEXT_RENDERING_MODE = __WEBPACK_IMPORTED_MODULE_2__core__["b" /* TEXT_RENDERING_MODE */]; - -var DASH_PATTERNS = { - dash : [ 4 ], - dashDot : [ 4, 2, 1, 2 ], - dot : [ 1, 2 ], - longDash : [ 8, 2 ], - longDashDot : [ 8, 2, 1, 2 ], - longDashDotDot : [ 8, 2, 1, 2, 1, 2 ], - solid : [] -}; - -var LINE_CAP = { - butt : 0, - round : 1, - square : 2 -}; - -var LINE_JOIN = { - miter : 0, - round : 1, - bevel : 2 -}; - -function render(group, callback) { - var fonts = [], images = {}, options = group.options; - - function getOption(name, defval, hash) { - if (!hash) { - hash = options; - } - if (hash.pdf && hash.pdf[name] != null) { - return hash.pdf[name]; - } - return defval; - } - - var multiPage = getOption("multiPage"); - var imgDPI = getOption("imgDPI"); - - if (imgDPI) { - __WEBPACK_IMPORTED_MODULE_2__core__["c" /* clearImageCache */](); - } - - group.traverse(function(element){ - dispatch({ - Image: function(element) { - var url = element.src(); - if (imgDPI) { - var box = element.bbox().size; - var prev = images[url]; - box = { - width: Math.ceil(box.width * imgDPI / 72), - height: Math.ceil(box.height * imgDPI / 72) - }; - if (prev) { - box.width = Math.max(prev.width, box.width); - box.height = Math.max(prev.height, box.height); - } - images[url] = box; - } else { - images[url] = null; - } - }, - Text: function(element) { - var style = __WEBPACK_IMPORTED_MODULE_2__core__["i" /* parseFontDef */](element.options.font); - var url = __WEBPACK_IMPORTED_MODULE_2__core__["e" /* getFontURL */](style); - if (fonts.indexOf(url) < 0) { - fonts.push(url); - } - } - }, element); - }); - - function doIt() { - if (--count > 0) { - return; - } - - var pdf = new (__WEBPACK_IMPORTED_MODULE_2__core__["a" /* Document */])({ - producer : getOption("producer"), - title : getOption("title"), - author : getOption("author"), - subject : getOption("subject"), - keywords : getOption("keywords"), - creator : getOption("creator"), - date : getOption("date") - }); - - function drawPage(group) { - var options = group.options; - - var tmp = optimize(group); - var bbox = tmp.bbox; - group = tmp.root; - // var tmp, bbox; - - var paperSize = getOption("paperSize", getOption("paperSize", "auto"), options), addMargin = false; - if (paperSize == "auto") { - if (bbox) { - var size = bbox.getSize(); - paperSize = [ size.width, size.height ]; - addMargin = true; - var origin = bbox.getOrigin(); - tmp = new __WEBPACK_IMPORTED_MODULE_3__drawing__["Group"](); - tmp.transform(new __WEBPACK_IMPORTED_MODULE_4__geometry__["Matrix"](1, 0, 0, 1, -origin.x, -origin.y)); - tmp.append(group); - group = tmp; - } - else { - paperSize = "A4"; - } - } - - var page; - page = pdf.addPage({ - paperSize : paperSize, - margin : getOption("margin", getOption("margin"), options), - addMargin : addMargin, - landscape : getOption("landscape", getOption("landscape", false), options) - }); - drawElement(group, page, pdf); - } - - if (multiPage) { - group.children.forEach(drawPage); - } else { - drawPage(group); - } - - callback(pdf.render(), pdf); - } - - var count = 2; - __WEBPACK_IMPORTED_MODULE_2__core__["g" /* loadFonts */](fonts, doIt); - __WEBPACK_IMPORTED_MODULE_2__core__["h" /* loadImages */](images, doIt); -} - -function toDataURL(group, callback) { - render(group, function(data){ - callback("data:application/pdf;base64," + data.base64()); - }); -} - -function toBlob(group, callback) { - render(group, function(data){ - callback(new window.Blob([ data.get() ], { type: "application/pdf" })); - }); -} - -function saveAs(group, filename, proxy, callback) { - // XXX: Safari has Blob, but does not support the download attribute - // so we'd end up converting to dataURL and using the proxy anyway. - if (window.Blob && !__WEBPACK_IMPORTED_MODULE_1__common__["i" /* support */].browser.safari) { - toBlob(group, function(blob){ - Object(__WEBPACK_IMPORTED_MODULE_1__common__["h" /* saveAs */])({ dataURI: blob, fileName: filename }); - if (callback) { - callback(blob); - } - }); - } else { - toDataURL(group, function(dataURL){ - Object(__WEBPACK_IMPORTED_MODULE_1__common__["h" /* saveAs */])({ dataURI: dataURL, fileName: filename, proxyURL: proxy }); - if (callback) { - callback(dataURL); - } - }); - } -} - -function dispatch(handlers, element) { - var handler = handlers[element.nodeType]; - if (handler) { - return handler.call.apply(handler, arguments); - } - return element; -} - -function drawElement(element, page, pdf) { - if (element.options._pdfDebug) { - page.comment("BEGIN: " + element.options._pdfDebug); - } - - var transform = element.transform(); - var opacity = element.opacity(); - - page.save(); - - if (opacity != null && opacity < 1) { - page.setOpacity(opacity); - } - - setStrokeOptions(element, page, pdf); - setFillOptions(element, page, pdf); - - if (transform) { - var m = transform.matrix(); - page.transform(m.a, m.b, m.c, m.d, m.e, m.f); - } - - setClipping(element, page, pdf); - - dispatch({ - Path : drawPath, - MultiPath : drawMultiPath, - Circle : drawCircle, - Arc : drawArc, - Text : drawText, - Image : drawImage, - Group : drawGroup, - Rect : drawRect - }, element, page, pdf); - - page.restore(); - - if (element.options._pdfDebug) { - page.comment("END: " + element.options._pdfDebug); - } -} - -function setStrokeOptions(element, page) { - var stroke = element.stroke && element.stroke(); - if (!stroke) { - return; - } - - var color = stroke.color; - if (color) { - color = parseColor(color); - if (color == null) { - return; // no stroke - } - page.setStrokeColor(color.r, color.g, color.b); - if (color.a != 1) { - page.setStrokeOpacity(color.a); - } - } - - var width = stroke.width; - if (width != null) { - if (width === 0) { - return; // no stroke - } - page.setLineWidth(width); - } - - var dashType = stroke.dashType; - if (dashType) { - page.setDashPattern(DASH_PATTERNS[dashType], 0); - } - - var lineCap = stroke.lineCap; - if (lineCap) { - page.setLineCap(LINE_CAP[lineCap]); - } - - var lineJoin = stroke.lineJoin; - if (lineJoin) { - page.setLineJoin(LINE_JOIN[lineJoin]); - } - - var opacity = stroke.opacity; - if (opacity != null) { - page.setStrokeOpacity(opacity); - } -} - -function setFillOptions(element, page) { - var fill = element.fill && element.fill(); - if (!fill) { - return; - } - - if (fill instanceof __WEBPACK_IMPORTED_MODULE_3__drawing__["Gradient"]) { - return; - } - - var color = fill.color; - if (color) { - color = parseColor(color); - if (color == null) { - return; // no fill - } - page.setFillColor(color.r, color.g, color.b); - if (color.a != 1) { - page.setFillOpacity(color.a); - } - } - - var opacity = fill.opacity; - if (opacity != null) { - page.setFillOpacity(opacity); - } -} - -function setClipping(element, page, pdf) { - // XXX: only Path supported at the moment. - var clip = element.clip(); - if (clip) { - _drawPath(clip, page, pdf); - page.clip(); - // page.setStrokeColor(Math.random(), Math.random(), Math.random()); - // page.setLineWidth(1); - // page.stroke(); - } -} - -function shouldDraw(thing) { - return (thing && - (thing instanceof __WEBPACK_IMPORTED_MODULE_3__drawing__["Gradient"] || - (thing.color && !/^(none|transparent)$/i.test(thing.color) && - (thing.width == null || thing.width > 0) && - (thing.opacity == null || thing.opacity > 0)))); -} - -function maybeGradient(element, page, pdf, stroke) { - var fill = element.fill(); - if (fill instanceof __WEBPACK_IMPORTED_MODULE_3__drawing__["Gradient"]) { - if (stroke) { - page.clipStroke(); - } else { - page.clip(); - } - var isRadial = fill instanceof __WEBPACK_IMPORTED_MODULE_3__drawing__["RadialGradient"]; - var start, end; - if (isRadial) { - start = { x: fill.center().x , y: fill.center().y , r: 0 }; - end = { x: fill.center().x , y: fill.center().y , r: fill.radius() }; - } else { - start = { x: fill.start().x , y: fill.start().y }; - end = { x: fill.end().x , y: fill.end().y }; - } - - var stops = fill.stops.elements().map(function(stop){ - var offset = stop.offset(); - if (/%$/.test(offset)) { - offset = parseFloat(offset) / 100; - } else { - offset = parseFloat(offset); - } - var color = parseColor(stop.color()); - color.a *= stop.opacity(); - return { - offset: offset, - color: color - }; - }); - - // Duplicats first and last stop to fix - // https://github.com/telerik/kendo-ui-core/issues/1782 - stops.unshift(stops[0]); - stops.push(stops[stops.length - 1]); - - var gradient = { - userSpace : fill.userSpace(), - type : isRadial ? "radial" : "linear", - start : start, - end : end, - stops : stops - }; - var box = element.rawBBox(); - var tl = box.topLeft(), size = box.getSize(); - box = { - left : tl.x, - top : tl.y, - width : size.width, - height : size.height - }; - page.gradient(gradient, box); - return true; - } -} - -function maybeFillStroke(element, page, pdf) { - if (shouldDraw(element.fill()) && shouldDraw(element.stroke())) { - if (!maybeGradient(element, page, pdf, true)) { - page.fillStroke(); - } - } else if (shouldDraw(element.fill())) { - if (!maybeGradient(element, page, pdf, false)) { - page.fill(); - } - } else if (shouldDraw(element.stroke())) { - page.stroke(); - } else { - // we should not get here; the path should have been - // optimized away. but let's be prepared. - page.nop(); - } -} - -function maybeDrawRect(path, page) { - var segments = path.segments; - if (segments.length == 4 && path.options.closed) { - // detect if this path looks like a rectangle parallel to the axis - var a = []; - for (var i = 0; i < segments.length; ++i) { - if (segments[i].controlIn()) { // has curve? - return false; - } - a[i] = segments[i].anchor(); - } - // it's a rectangle if the y/x/y/x or x/y/x/y coords of - // consecutive points are the same. - var isRect = ( - a[0].y == a[1].y && a[1].x == a[2].x && a[2].y == a[3].y && a[3].x == a[0].x - ) || ( - a[0].x == a[1].x && a[1].y == a[2].y && a[2].x == a[3].x && a[3].y == a[0].y - ); - if (isRect) { - // this saves a bunch of instructions in PDF: - // moveTo, lineTo, lineTo, lineTo, close -> rect. - page.rect(a[0].x, a[0].y, - a[2].x - a[0].x /*width*/, - a[2].y - a[0].y /*height*/); - return true; - } - } -} - -function _drawPath(element, page, pdf) { - var segments = element.segments; - if (segments.length === 0) { - return; - } - if (!maybeDrawRect(element, page, pdf)) { - for (var prev, i = 0; i < segments.length; ++i) { - var seg = segments[i]; - var anchor = seg.anchor(); - if (!prev) { - page.moveTo(anchor.x, anchor.y); - } else { - var prevOut = prev.controlOut(); - var controlIn = seg.controlIn(); - if (prevOut && controlIn) { - page.bezier( - prevOut.x , prevOut.y, - controlIn.x , controlIn.y, - anchor.x , anchor.y - ); - } else { - page.lineTo(anchor.x, anchor.y); - } - } - prev = seg; - } - if (element.options.closed) { - page.close(); - } - } -} - -function drawPath(element, page, pdf) { - _drawPath(element, page, pdf); - maybeFillStroke(element, page, pdf); -} - -function drawMultiPath(element, page, pdf) { - var paths = element.paths; - for (var i = 0; i < paths.length; ++i) { - _drawPath(paths[i], page, pdf); - } - maybeFillStroke(element, page, pdf); -} - -function drawCircle(element, page, pdf) { - var g = element.geometry(); - page.circle(g.center.x, g.center.y, g.radius); - maybeFillStroke(element, page, pdf); -} - -function drawArc(element, page, pdf) { - var points = element.geometry().curvePoints(); - page.moveTo(points[0].x, points[0].y); - for (var i = 1; i < points.length;) { - page.bezier( - points[i].x, points[i++].y, - points[i].x, points[i++].y, - points[i].x, points[i++].y - ); - } - maybeFillStroke(element, page, pdf); -} - -function drawText(element, page) { - var style = __WEBPACK_IMPORTED_MODULE_2__core__["i" /* parseFontDef */](element.options.font); - var pos = element._position; - var mode; - if (element.fill() && element.stroke()) { - mode = TEXT_RENDERING_MODE.fillAndStroke; - } else if (element.fill()) { - mode = TEXT_RENDERING_MODE.fill; - } else if (element.stroke()) { - mode = TEXT_RENDERING_MODE.stroke; - } - - page.transform(1, 0, 0, -1, pos.x, pos.y + style.fontSize); - page.beginText(); - page.setFont(__WEBPACK_IMPORTED_MODULE_2__core__["e" /* getFontURL */](style), style.fontSize); - page.setTextRenderingMode(mode); - page.showText(element.content(), element._pdfRect ? element._pdfRect.width() : null); - page.endText(); -} - -function drawGroup(element, page, pdf) { - if (element._pdfLink) { - page.addLink(element._pdfLink.url, element._pdfLink); - } - var children = element.children; - for (var i = 0; i < children.length; ++i) { - drawElement(children[i], page, pdf); - } -} - -function drawImage(element, page) { - var url = element.src(); - if (!url) { - return; - } - - var rect = element.rect(); - var tl = rect.getOrigin(); - var sz = rect.getSize(); - page.transform(sz.width, 0, 0, -sz.height, tl.x, tl.y + sz.height); - page.drawImage(url); -} - -function drawRect(element, page, pdf) { - var geometry = element.geometry(); - page.rect(geometry.origin.x, geometry.origin.y, geometry.size.width, geometry.size.height); - maybeFillStroke(element, page, pdf); -} - -function parseColor(value) { - var color = Object(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* parseColor */])(value, true); - return color ? color.toRGB() : null; -} - -function optimize(root) { - var clipbox = false; - var matrix = __WEBPACK_IMPORTED_MODULE_4__geometry__["Matrix"].unit(); - var currentBox = null; - var changed; - do { - changed = false; - root = opt(root); - } while (root && changed); - return { root: root, bbox: currentBox }; - - function change(newShape) { - changed = true; - return newShape; - } - - function visible(shape) { - return (shape.visible() && shape.opacity() > 0 && - ( shouldDraw(shape.fill()) || - shouldDraw(shape.stroke()) )); - } - - function optArray(a) { - var b = []; - for (var i = 0; i < a.length; ++i) { - var el = opt(a[i]); - if (el != null) { - b.push(el); - } - } - return b; - } - - function withClipping(shape, f) { - var saveclipbox = clipbox; - var savematrix = matrix; - - if (shape.transform()) { - matrix = matrix.multiplyCopy(shape.transform().matrix()); - } - - var clip = shape.clip(); - if (clip) { - clip = clip.bbox(); - if (clip) { - clip = clip.bbox(matrix); - clipbox = clipbox ? __WEBPACK_IMPORTED_MODULE_4__geometry__["Rect"].intersect(clipbox, clip) : clip; - } - } - - try { - return f(); - } - finally { - clipbox = saveclipbox; - matrix = savematrix; - } - } - - function inClipbox(shape) { - if (clipbox == null) { - return false; - } - var box = shape.rawBBox().bbox(matrix); - if (clipbox && box) { - box = __WEBPACK_IMPORTED_MODULE_4__geometry__["Rect"].intersect(box, clipbox); - } - return box; - } - - function opt(shape) { - return withClipping(shape, function(){ - if (!(shape instanceof __WEBPACK_IMPORTED_MODULE_3__drawing__["Group"] || shape instanceof __WEBPACK_IMPORTED_MODULE_3__drawing__["MultiPath"])) { - var box = inClipbox(shape); - if (!box) { - return change(null); - } - currentBox = currentBox ? __WEBPACK_IMPORTED_MODULE_4__geometry__["Rect"].union(currentBox, box) : box; - } - return dispatch({ - Path: function(shape) { - if (shape.segments.length === 0 || !visible(shape)) { - return change(null); - } - return shape; - }, - MultiPath: function(shape) { - if (!visible(shape)) { - return change(null); - } - var el = new __WEBPACK_IMPORTED_MODULE_3__drawing__["MultiPath"](shape.options); - el.paths = optArray(shape.paths); - if (el.paths.length === 0) { - return change(null); - } - return el; - }, - Circle: function(shape) { - if (!visible(shape)) { - return change(null); - } - return shape; - }, - Arc: function(shape) { - if (!visible(shape)) { - return change(null); - } - return shape; - }, - Text: function(shape) { - if (!/\S/.test(shape.content()) || !visible(shape)) { - return change(null); - } - return shape; - }, - Image: function(shape) { - if (!(shape.visible() && shape.opacity() > 0)) { - return change(null); - } - return shape; - }, - Group: function(shape) { - var el = new __WEBPACK_IMPORTED_MODULE_3__drawing__["Group"](shape.options); - el.children = optArray(shape.children); - el._pdfLink = shape._pdfLink; - if (shape !== root && el.children.length === 0 && !shape._pdfLink) { - return change(null); - } - return el; - }, - Rect: function(shape) { - if (!visible(shape)) { - return change(null); - } - return shape; - } - }, shape); - }); - } -} - -function exportPDF(group, options) { - var promise = Object(__WEBPACK_IMPORTED_MODULE_0__util__["createPromise"])(); - - for (var i in options) { - if (i == "margin" && group.options.pdf && group.options.pdf._ignoreMargin) { - // This hackish option is set by the page breaking code in drawDOM. The idea is - // that margin is already taken into account there (that's required to do proper - // page breaking) and we don't want to set it again here, as it would double the - // top-left margin, and truncate the content on bottom/right. - continue; - } - group.options.set("pdf." + i, options[i]); - } - - toDataURL(group, promise.resolve); - - return promise; -} - - - -//# sourceMappingURL=drawing.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/pdf/ttf.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TTFFont; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/pdf/utils.js"); -/* eslint-disable no-multi-spaces, key-spacing, indent, camelcase, space-before-blocks, eqeqeq, brace-style */ -/* eslint-disable space-infix-ops, space-before-function-paren, array-bracket-spacing, object-curly-spacing */ -/* eslint-disable no-nested-ternary, max-params, default-case, no-else-return, no-empty */ -/* eslint-disable no-param-reassign, no-var, block-scoped-var */ - -/*****************************************************************************\ - * - * The code in this file, although written from scratch, is influenced by the - * TrueType parser/encoder in PDFKit -- http://pdfkit.org/ (a CoffeeScript - * library for producing PDF files). - * - * PDFKit is (c) Devon Govett 2014 and released under the MIT License. - * -\*****************************************************************************/ - - - -function hasOwnProperty(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - -function sortedKeys(obj) { - return Object.keys(obj).sort(function(a, b){ return a - b; }).map(parseFloat); -} - -/// - -function Directory(data) { - this.raw = data; - this.scalerType = data.readLong(); - this.tableCount = data.readShort(); - this.searchRange = data.readShort(); - this.entrySelector = data.readShort(); - this.rangeShift = data.readShort(); - - var tables = this.tables = {}; - for (var i = 0; i < this.tableCount; ++i) { - var entry = { - tag : data.readString(4), - checksum : data.readLong(), - offset : data.readLong(), - length : data.readLong() - }; - tables[entry.tag] = entry; - } -} - -Directory.prototype = { - - readTable: function(name, Ctor) { - var def = this.tables[name]; - if (!def) { - throw new Error("Table " + name + " not found in directory"); - } - return (this[name] = def.table = new Ctor(this, def)); - }, - - render: function(tables) { - var this$1 = this; - - var tableCount = Object.keys(tables).length; - - var maxpow2 = Math.pow(2, Math.floor(Math.log(tableCount) / Math.LN2)); - var searchRange = maxpow2 * 16; - var entrySelector = Math.floor(Math.log(maxpow2) / Math.LN2); - var rangeShift = tableCount * 16 - searchRange; - - var out = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - out.writeLong(this.scalerType); - out.writeShort(tableCount); - out.writeShort(searchRange); - out.writeShort(entrySelector); - out.writeShort(rangeShift); - - var directoryLength = tableCount * 16; - var offset = out.offset() + directoryLength; - var headOffset = null; - var tableData = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - - for (var tag in tables) { - if (hasOwnProperty(tables, tag)) { - var table = tables[tag]; - - out.writeString(tag); - out.writeLong(this$1.checksum(table)); - out.writeLong(offset); - out.writeLong(table.length); - - tableData.write(table); - if (tag == "head") { - headOffset = offset; - } - offset += table.length; - - while (offset % 4) { - tableData.writeByte(0); - offset++; - } - } - } - - out.write(tableData.get()); - var sum = this.checksum(out.get()); - var adjustment = 0xB1B0AFBA - sum; - - out.offset(headOffset + 8); - out.writeLong(adjustment); - return out.get(); - }, - - checksum: function(data) { - data = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(data); - var sum = 0; - while (!data.eof()) { - sum += data.readLong(); - } - return sum & 0xFFFFFFFF; - } -}; - -function deftable(methods) { - function Ctor(file, def) { - this.definition = def; - this.length = def.length; - this.offset = def.offset; - this.file = file; - this.rawData = file.raw; - this.parse(file.raw); - } - Ctor.prototype.raw = function() { - return this.rawData.slice(this.offset, this.length); - }; - for (var i in methods) { - if (hasOwnProperty(methods, i)) { - Ctor[i] = Ctor.prototype[i] = methods[i]; - } - } - return Ctor; -} - -var HeadTable = deftable({ - parse: function(data) { - data.offset(this.offset); - this.version = data.readLong(); - this.revision = data.readLong(); - this.checkSumAdjustment = data.readLong(); - this.magicNumber = data.readLong(); - this.flags = data.readShort(); - this.unitsPerEm = data.readShort(); - this.created = data.read(8); - this.modified = data.read(8); - - this.xMin = data.readShort_(); - this.yMin = data.readShort_(); - this.xMax = data.readShort_(); - this.yMax = data.readShort_(); - - this.macStyle = data.readShort(); - this.lowestRecPPEM = data.readShort(); - this.fontDirectionHint = data.readShort_(); - this.indexToLocFormat = data.readShort_(); - this.glyphDataFormat = data.readShort_(); - }, - render: function(indexToLocFormat) { - var out = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - out.writeLong(this.version); - out.writeLong(this.revision); - out.writeLong(0); // checksum adjustment; shall be computed later - out.writeLong(this.magicNumber); - out.writeShort(this.flags); - out.writeShort(this.unitsPerEm); - out.write(this.created); - out.write(this.modified); - out.writeShort_(this.xMin); - out.writeShort_(this.yMin); - out.writeShort_(this.xMax); - out.writeShort_(this.yMax); - out.writeShort(this.macStyle); - out.writeShort(this.lowestRecPPEM); - out.writeShort_(this.fontDirectionHint); - out.writeShort_(indexToLocFormat); // this will depend on the `loca` table - out.writeShort_(this.glyphDataFormat); - return out.get(); - } -}); - -var LocaTable = deftable({ - parse: function(data) { - data.offset(this.offset); - var format = this.file.head.indexToLocFormat; - if (format === 0) { - this.offsets = data.times(this.length / 2, function(){ - return 2 * data.readShort(); - }); - } else { - this.offsets = data.times(this.length / 4, data.readLong); - } - }, - offsetOf: function(id) { - return this.offsets[id]; - }, - lengthOf: function(id) { - return this.offsets[id + 1] - this.offsets[id]; - }, - render: function(offsets) { - var out = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - var needsLongFormat = offsets[offsets.length - 1] > 0xFFFF; - for (var i = 0; i < offsets.length; ++i) { - if (needsLongFormat) { - out.writeLong(offsets[i]); - } else { - out.writeShort(offsets[i] / 2); - } - } - return { - format: needsLongFormat ? 1 : 0, - table: out.get() - }; - } -}); - -var HheaTable = deftable({ - parse: function(data) { - data.offset(this.offset); - - this.version = data.readLong(); - this.ascent = data.readShort_(); - this.descent = data.readShort_(); - this.lineGap = data.readShort_(); - this.advanceWidthMax = data.readShort(); - this.minLeftSideBearing = data.readShort_(); - this.minRightSideBearing = data.readShort_(); - this.xMaxExtent = data.readShort_(); - this.caretSlopeRise = data.readShort_(); - this.caretSlopeRun = data.readShort_(); - this.caretOffset = data.readShort_(); - - data.skip(4 * 2); // reserved - - this.metricDataFormat = data.readShort_(); - this.numOfLongHorMetrics = data.readShort(); - }, - render: function(ids) { - var out = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - out.writeLong(this.version); - out.writeShort_(this.ascent); - out.writeShort_(this.descent); - out.writeShort_(this.lineGap); - out.writeShort(this.advanceWidthMax); - out.writeShort_(this.minLeftSideBearing); - out.writeShort_(this.minRightSideBearing); - out.writeShort_(this.xMaxExtent); - out.writeShort_(this.caretSlopeRise); - out.writeShort_(this.caretSlopeRun); - out.writeShort_(this.caretOffset); - - out.write([ 0, 0, 0, 0, 0, 0, 0, 0 ]); // reserved bytes - - out.writeShort_(this.metricDataFormat); - out.writeShort(ids.length); - return out.get(); - } -}); - -var MaxpTable = deftable({ - parse: function(data) { - data.offset(this.offset); - this.version = data.readLong(); - this.numGlyphs = data.readShort(); - this.maxPoints = data.readShort(); - this.maxContours = data.readShort(); - this.maxComponentPoints = data.readShort(); - this.maxComponentContours = data.readShort(); - this.maxZones = data.readShort(); - this.maxTwilightPoints = data.readShort(); - this.maxStorage = data.readShort(); - this.maxFunctionDefs = data.readShort(); - this.maxInstructionDefs = data.readShort(); - this.maxStackElements = data.readShort(); - this.maxSizeOfInstructions = data.readShort(); - this.maxComponentElements = data.readShort(); - this.maxComponentDepth = data.readShort(); - }, - render: function(glyphIds) { - var out = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - out.writeLong(this.version); - out.writeShort(glyphIds.length); - out.writeShort(this.maxPoints); - out.writeShort(this.maxContours); - out.writeShort(this.maxComponentPoints); - out.writeShort(this.maxComponentContours); - out.writeShort(this.maxZones); - out.writeShort(this.maxTwilightPoints); - out.writeShort(this.maxStorage); - out.writeShort(this.maxFunctionDefs); - out.writeShort(this.maxInstructionDefs); - out.writeShort(this.maxStackElements); - out.writeShort(this.maxSizeOfInstructions); - out.writeShort(this.maxComponentElements); - out.writeShort(this.maxComponentDepth); - return out.get(); - } -}); - -var HmtxTable = deftable({ - parse: function(data) { - data.offset(this.offset); - var dir = this.file, hhea = dir.hhea; - this.metrics = data.times(hhea.numOfLongHorMetrics, function(){ - return { - advance: data.readShort(), - lsb: data.readShort_() - }; - }); - var lsbCount = dir.maxp.numGlyphs - dir.hhea.numOfLongHorMetrics; - this.leftSideBearings = data.times(lsbCount, data.readShort_); - }, - forGlyph: function(id) { - var metrics = this.metrics; - var n = metrics.length; - if (id < n) { - return metrics[id]; - } - return { - advance: metrics[n - 1].advance, - lsb: this.leftSideBearings[id - n] - }; - }, - render: function(glyphIds) { - var this$1 = this; - - var out = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - for (var i = 0; i < glyphIds.length; ++i) { - var m = this$1.forGlyph(glyphIds[i]); - out.writeShort(m.advance); - out.writeShort_(m.lsb); - } - return out.get(); - } -}); - -var GlyfTable = (function(){ - - function SimpleGlyph(raw) { - this.raw = raw; - } - SimpleGlyph.prototype = { - compound: false, - render: function() { - return this.raw.get(); - } - }; - - var ARG_1_AND_2_ARE_WORDS = 0x0001; - var WE_HAVE_A_SCALE = 0x0008; - var MORE_COMPONENTS = 0x0020; - var WE_HAVE_AN_X_AND_Y_SCALE = 0x0040; - var WE_HAVE_A_TWO_BY_TWO = 0x0080; - //var WE_HAVE_INSTRUCTIONS = 0x0100; - - function CompoundGlyph(data) { - this.raw = data; - var ids = this.glyphIds = []; - var offsets = this.idOffsets = []; - while (true) { // eslint-disable-line no-constant-condition - var flags = data.readShort(); - offsets.push(data.offset()); - ids.push(data.readShort()); - - if (!(flags & MORE_COMPONENTS)) { - break; - } - - data.skip(flags & ARG_1_AND_2_ARE_WORDS ? 4 : 2); - - if (flags & WE_HAVE_A_TWO_BY_TWO) { - data.skip(8); - } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) { - data.skip(4); - } else if (flags & WE_HAVE_A_SCALE) { - data.skip(2); - } - } - } - - CompoundGlyph.prototype = { - compound: true, - render: function(old2new) { - var this$1 = this; - - var out = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(this.raw.get()); - for (var i = 0; i < this.glyphIds.length; ++i) { - var id = this$1.glyphIds[i]; - out.offset(this$1.idOffsets[i]); - out.writeShort(old2new[id]); - } - return out.get(); - } - }; - - return deftable({ - parse: function() { - this.cache = {}; - }, - glyphFor: function(id) { - var cache = this.cache; - if (hasOwnProperty(cache, id)) { - return cache[id]; - } - - var loca = this.file.loca; - var length = loca.lengthOf(id); - - if (length === 0) { - return (cache[id] = null); - } - - var data = this.rawData; - var offset = this.offset + loca.offsetOf(id); - var raw = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(data.slice(offset, length)); - - var numberOfContours = raw.readShort_(); - var xMin = raw.readShort_(); - var yMin = raw.readShort_(); - var xMax = raw.readShort_(); - var yMax = raw.readShort_(); - - var glyph = cache[id] = numberOfContours == -1 ? new CompoundGlyph(raw) : new SimpleGlyph(raw); - - glyph.numberOfContours = numberOfContours; - glyph.xMin = xMin; - glyph.yMin = yMin; - glyph.xMax = xMax; - glyph.yMax = yMax; - - return glyph; - }, - render: function(glyphs, oldIds, old2new) { - var out = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(), offsets = []; - for (var i = 0; i < oldIds.length; ++i) { - var id = oldIds[i]; - var glyph = glyphs[id]; - offsets.push(out.offset()); - if (glyph) { - out.write(glyph.render(old2new)); - } - } - offsets.push(out.offset()); - return { - table: out.get(), - offsets: offsets - }; - } - }); - -}()); - -var NameTable = (function(){ - - function NameEntry(text, entry) { - this.text = text; - this.length = text.length; - this.platformID = entry.platformID; - this.platformSpecificID = entry.platformSpecificID; - this.languageID = entry.languageID; - this.nameID = entry.nameID; - } - - return deftable({ - parse: function(data) { - data.offset(this.offset); - data.readShort(); // format - var count = data.readShort(); - var stringOffset = this.offset + data.readShort(); - var nameRecords = data.times(count, function(){ - return { - platformID : data.readShort(), - platformSpecificID : data.readShort(), - languageID : data.readShort(), - nameID : data.readShort(), - length : data.readShort(), - offset : data.readShort() + stringOffset - }; - }); - var strings = this.strings = {}; - for (var i = 0; i < nameRecords.length; ++i) { - var rec = nameRecords[i]; - data.offset(rec.offset); - var text = data.readString(rec.length); - if (!strings[rec.nameID]) { - strings[rec.nameID] = []; - } - strings[rec.nameID].push(new NameEntry(text, rec)); - } - this.postscriptEntry = strings[6][0]; - this.postscriptName = this.postscriptEntry.text.replace(/[^\x20-\x7F]/g, ""); - }, - - render: function(psName) { - var this$1 = this; - - var strings = this.strings; - var strCount = 0; - for (var i in strings) { - if (hasOwnProperty(strings, i)) { - strCount += strings[i].length; - } - } - var out = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - var strTable = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - - out.writeShort(0); // format - out.writeShort(strCount); - out.writeShort(6 + 12 * strCount); // stringOffset - - for (i in strings) { - if (hasOwnProperty(strings, i)) { - var list = i == 6 ? [ - new NameEntry(psName, this$1.postscriptEntry) - ] : strings[i]; - for (var j = 0; j < list.length; ++j) { - var str = list[j]; - out.writeShort(str.platformID); - out.writeShort(str.platformSpecificID); - out.writeShort(str.languageID); - out.writeShort(str.nameID); - out.writeShort(str.length); - out.writeShort(strTable.offset()); - - strTable.writeString(str.text); - } - } - } - - out.write(strTable.get()); - - return out.get(); - } - }); - -})(); - -var PostTable = (function(){ - - var POSTSCRIPT_GLYPHS = ".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent ampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore grave a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis Udieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave ecircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve ocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent sterling section bullet paragraph germandbls registered copyright trademark acute dieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu partialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash questiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft guillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash quotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis fraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered quotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis Egrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute Ucircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla hungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth eth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior onehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla Cacute cacute Ccaron ccaron dcroat".split(/\s+/g); - - return deftable({ - parse: function(data) { - var this$1 = this; - - data.offset(this.offset); - - this.format = data.readLong(); - this.italicAngle = data.readFixed_(); - this.underlinePosition = data.readShort_(); - this.underlineThickness = data.readShort_(); - this.isFixedPitch = data.readLong(); - this.minMemType42 = data.readLong(); - this.maxMemType42 = data.readLong(); - this.minMemType1 = data.readLong(); - this.maxMemType1 = data.readLong(); - - var numberOfGlyphs; - - switch (this.format) { - case 0x00010000: - case 0x00030000: - break; - - case 0x00020000: - numberOfGlyphs = data.readShort(); - this.glyphNameIndex = data.times(numberOfGlyphs, data.readShort); - this.names = []; - var limit = this.offset + this.length; - while (data.offset() < limit) { - this$1.names.push(data.readString(data.readByte())); - } - break; - - case 0x00025000: - numberOfGlyphs = data.readShort(); - this.offsets = data.read(numberOfGlyphs); - break; - - case 0x00040000: - this.map = data.times(this.file.maxp.numGlyphs, data.readShort); - break; - } - }, - glyphFor: function(code) { - switch (this.format) { - case 0x00010000: - return POSTSCRIPT_GLYPHS[code] || ".notdef"; - - case 0x00020000: - var index = this.glyphNameIndex[code]; - if (index < POSTSCRIPT_GLYPHS.length) { - return POSTSCRIPT_GLYPHS[index]; - } - return this.names[index - POSTSCRIPT_GLYPHS.length] || ".notdef"; - - case 0x00025000: - - case 0x00030000: - return ".notdef"; - - case 0x00040000: - return this.map[code] || 0xFFFF; - } - }, - render: function(mapping) { - var this$1 = this; - - if (this.format == 0x00030000) { - return this.raw(); - } - - // keep original header, but set format to 2.0 - var out = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(this.rawData.slice(this.offset, 32)); - out.writeLong(0x00020000); - out.offset(32); - - var indexes = []; - var strings = []; - - for (var i = 0; i < mapping.length; ++i) { - var id = mapping[i]; - var post = this$1.glyphFor(id); - var index = POSTSCRIPT_GLYPHS.indexOf(post); - if (index >= 0) { - indexes.push(index); - } else { - indexes.push(POSTSCRIPT_GLYPHS.length + strings.length); - strings.push(post); - } - } - - out.writeShort(mapping.length); - - for (i = 0; i < indexes.length; ++i) { - out.writeShort(indexes[i]); - } - - for (i = 0; i < strings.length; ++i) { - out.writeByte(strings[i].length); - out.writeString(strings[i]); - } - - return out.get(); - } - }); -})(); - -var CmapTable = (function(){ - - function CmapEntry(data, offset, codeMap) { - var self = this; - self.platformID = data.readShort(); - self.platformSpecificID = data.readShort(); - self.offset = offset + data.readLong(); - - data.saveExcursion(function(){ - var code; - data.offset(self.offset); - self.format = data.readShort(); - - switch (self.format) { - case 0: - self.length = data.readShort(); - self.language = data.readShort(); - for (var i = 0; i < 256; ++i) { - codeMap[i] = data.readByte(); - } - break; - - case 4: - self.length = data.readShort(); - self.language = data.readShort(); - var segCount = data.readShort() / 2; - - data.skip(6); // searchRange, entrySelector, rangeShift - var endCode = data.times(segCount, data.readShort); - data.skip(2); // reserved pad - var startCode = data.times(segCount, data.readShort); - var idDelta = data.times(segCount, data.readShort_); - var idRangeOffset = data.times(segCount, data.readShort); - - var count = (self.length + self.offset - data.offset()) / 2; - var glyphIds = data.times(count, data.readShort); - - for (i = 0; i < segCount; ++i) { - var start = startCode[i], end = endCode[i]; - for (code = start; code <= end; ++code) { - var glyphId; - if (idRangeOffset[i] === 0) { - glyphId = code + idDelta[i]; - } else { - /// - // When non-zero, idRangeOffset contains for each segment the byte offset of the Glyph ID - // into the glyphIds table, from the *current* `i` cell of idRangeOffset. In other words, - // this offset spans from the first into the second array. This works, because the arrays - // are consecutive in the TTF file: - // - // [ ...idRangeOffset... ][ ...glyphIds... ] - // ...... 48 ...... .... ID .... - // ^----- 48 bytes -----^ - // - // (but I can't stop wondering why is it not just a plain index, possibly incremented by 1 - // so that we can have that special `zero` value.) - // - // The elements of idRangeOffset are even numbers, because both arrays contain 16-bit words, - // yet the offset is in bytes. That is why we divide it by 2. Then we subtract the - // remaining segments (segCount-i), and add the code-start offset, to which we need to add - // the corresponding delta to get the actual glyph ID. - /// - var index = idRangeOffset[i] / 2 - (segCount - i) + (code - start); - glyphId = glyphIds[index] || 0; - if (glyphId !== 0) { - glyphId += idDelta[i]; - } - } - codeMap[code] = glyphId & 0xFFFF; - } - } - break; - - case 6: - self.length = data.readShort(); - self.language = data.readShort(); - code = data.readShort(); - var length = data.readShort(); - while (length-- > 0) { - codeMap[code++] = data.readShort(); - } - break; - - case 12: - data.readShort(); // reserved - self.length = data.readLong(); - self.language = data.readLong(); - var ngroups = data.readLong(); - while (ngroups-- > 0) { - code = data.readLong(); - var endCharCode = data.readLong(); - var glyphCode = data.readLong(); - while (code <= endCharCode) { - codeMap[code++] = glyphCode++; - } - } - break; - - default: - if (window.console) { - window.console.error("Unhandled CMAP format: " + self.format); - } - } - }); - } - - function renderCharmap(ncid2ogid, ogid2ngid) { - var codes = sortedKeys(ncid2ogid); - var startCodes = []; - var endCodes = []; - var last = null; - var diff = null; - - function new_gid(charcode) { - return ogid2ngid[ncid2ogid[charcode]]; - } - - for (var i = 0; i < codes.length; ++i) { - var code = codes[i]; - var gid = new_gid(code); - var delta = gid - code; - if (last == null || delta !== diff) { - if (last) { - endCodes.push(last); - } - startCodes.push(code); - diff = delta; - } - last = code; - } - - if (last) { - endCodes.push(last); - } - endCodes.push(0xFFFF); - startCodes.push(0xFFFF); - - var segCount = startCodes.length; - var segCountX2 = segCount * 2; - var searchRange = 2 * Math.pow(2, Math.floor(Math.log(segCount) / Math.LN2)); - var entrySelector = Math.log(searchRange / 2) / Math.LN2; - var rangeShift = segCountX2 - searchRange; - - var deltas = []; - var rangeOffsets = []; - var glyphIds = []; - - for (i = 0; i < segCount; ++i) { - var startCode = startCodes[i]; - var endCode = endCodes[i]; - if (startCode == 0xFFFF) { - deltas.push(0); - rangeOffsets.push(0); - break; - } - var startGlyph = new_gid(startCode); - if (startCode - startGlyph >= 0x8000) { - deltas.push(0); - rangeOffsets.push(2 * (glyphIds.length + segCount - i)); - for (var j = startCode; j <= endCode; ++j) { - glyphIds.push(new_gid(j)); - } - } else { - deltas.push(startGlyph - startCode); - rangeOffsets.push(0); - } - } - - var out = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - - out.writeShort(3); // platformID - out.writeShort(1); // platformSpecificID - out.writeLong(12); // offset - out.writeShort(4); // format - out.writeShort(16 + segCount * 8 + glyphIds.length * 2); // length - out.writeShort(0); // language - out.writeShort(segCountX2); - out.writeShort(searchRange); - out.writeShort(entrySelector); - out.writeShort(rangeShift); - - endCodes.forEach(out.writeShort); - out.writeShort(0); // reserved pad - startCodes.forEach(out.writeShort); - deltas.forEach(out.writeShort_); - rangeOffsets.forEach(out.writeShort); - glyphIds.forEach(out.writeShort); - - return out.get(); - } - - return deftable({ - parse: function(data) { - var self = this; - var offset = self.offset; - data.offset(offset); - self.codeMap = {}; - self.version = data.readShort(); - var tableCount = data.readShort(); - self.tables = data.times(tableCount, function(){ - return new CmapEntry(data, offset, self.codeMap); - }); - }, - render: function(ncid2ogid, ogid2ngid) { - var out = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(); - out.writeShort(0); // version - out.writeShort(1); // tableCount - out.write(renderCharmap(ncid2ogid, ogid2ngid)); - return out.get(); - } - }); - -})(); - -var OS2Table = deftable({ - parse: function(data) { - data.offset(this.offset); - this.version = data.readShort(); - this.averageCharWidth = data.readShort_(); - this.weightClass = data.readShort(); - this.widthClass = data.readShort(); - this.type = data.readShort(); - this.ySubscriptXSize = data.readShort_(); - this.ySubscriptYSize = data.readShort_(); - this.ySubscriptXOffset = data.readShort_(); - this.ySubscriptYOffset = data.readShort_(); - this.ySuperscriptXSize = data.readShort_(); - this.ySuperscriptYSize = data.readShort_(); - this.ySuperscriptXOffset = data.readShort_(); - this.ySuperscriptYOffset = data.readShort_(); - this.yStrikeoutSize = data.readShort_(); - this.yStrikeoutPosition = data.readShort_(); - this.familyClass = data.readShort_(); - - this.panose = data.times(10, data.readByte); - this.charRange = data.times(4, data.readLong); - - this.vendorID = data.readString(4); - this.selection = data.readShort(); - this.firstCharIndex = data.readShort(); - this.lastCharIndex = data.readShort(); - - if (this.version > 0) { - this.ascent = data.readShort_(); - this.descent = data.readShort_(); - this.lineGap = data.readShort_(); - this.winAscent = data.readShort(); - this.winDescent = data.readShort(); - this.codePageRange = data.times(2, data.readLong); - - if (this.version > 1) { - this.xHeight = data.readShort(); - this.capHeight = data.readShort(); - this.defaultChar = data.readShort(); - this.breakChar = data.readShort(); - this.maxContext = data.readShort(); - } - } - }, - render: function() { - return this.raw(); - } -}); - -var subsetTag = 100000; - -function nextSubsetTag() { - var ret = "", n = String(subsetTag); - for (var i = 0; i < n.length; ++i) { - ret += String.fromCharCode(n.charCodeAt(i) - 48 + 65); - } - ++subsetTag; - return ret; -} - -function Subfont(font) { - this.font = font; - this.subset = {}; - this.unicodes = {}; - this.ogid2ngid = { 0: 0 }; - this.ngid2ogid = { 0: 0 }; - this.ncid2ogid = {}; - this.next = this.firstChar = 1; - this.nextGid = 1; - this.psName = nextSubsetTag() + "+" + this.font.psName; -} - -Subfont.prototype = { - use: function(ch) { - var self = this; - if (typeof ch == "string") { - return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["b" /* ucs2decode */])(ch).reduce(function(ret, code){ - return ret + String.fromCharCode(self.use(code)); - }, ""); - } - var code = self.unicodes[ch]; - if (!code) { - code = self.next++; - self.subset[code] = ch; - self.unicodes[ch] = code; - - // generate new GID (glyph ID) and maintain newGID -> - // oldGID and back mappings - var old_gid = self.font.cmap.codeMap[ch]; - if (old_gid) { - self.ncid2ogid[code] = old_gid; - if (self.ogid2ngid[old_gid] == null) { - var new_gid = self.nextGid++; - self.ogid2ngid[old_gid] = new_gid; - self.ngid2ogid[new_gid] = old_gid; - } - } - } - return code; - }, - encodeText: function(text) { - return this.use(text); - }, - glyphIds: function() { - return sortedKeys(this.ogid2ngid); - }, - glyphsFor: function(glyphIds, result) { - var this$1 = this; - - if (!result) { - result = {}; - } - for (var i = 0; i < glyphIds.length; ++i) { - var id = glyphIds[i]; - if (!result[id]) { - var glyph = result[id] = this$1.font.glyf.glyphFor(id); - if (glyph && glyph.compound) { - this$1.glyphsFor(glyph.glyphIds, result); - } - } - } - return result; - }, - render: function() { - var this$1 = this; - - var glyphs = this.glyphsFor(this.glyphIds()); - - // add missing sub-glyphs - for (var old_gid in glyphs) { - if (hasOwnProperty(glyphs, old_gid)) { - old_gid = parseInt(old_gid, 10); - if (this$1.ogid2ngid[old_gid] == null) { - var new_gid = this$1.nextGid++; - this$1.ogid2ngid[old_gid] = new_gid; - this$1.ngid2ogid[new_gid] = old_gid; - } - } - } - - // must obtain old_gid_ids in an order matching sorted - // new_gid_ids - var new_gid_ids = sortedKeys(this.ngid2ogid); - var old_gid_ids = new_gid_ids.map(function(id){ - return this.ngid2ogid[id]; - }, this); - - var font = this.font; - var glyf = font.glyf.render(glyphs, old_gid_ids, this.ogid2ngid); - var loca = font.loca.render(glyf.offsets); - - this.lastChar = this.next - 1; - - var tables = { - "cmap" : CmapTable.render(this.ncid2ogid, this.ogid2ngid), - "glyf" : glyf.table, - "loca" : loca.table, - "hmtx" : font.hmtx.render(old_gid_ids), - "hhea" : font.hhea.render(old_gid_ids), - "maxp" : font.maxp.render(old_gid_ids), - "post" : font.post.render(old_gid_ids), - "name" : font.name.render(this.psName), - "head" : font.head.render(loca.format), - "OS/2" : font.os2.render() - }; - - return this.font.directory.render(tables); - }, - cidToGidMap: function() { - var this$1 = this; - - var out = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(), len = 0; - for (var cid = this.firstChar; cid < this.next; ++cid) { - while (len < cid) { - out.writeShort(0); - len++; - } - var old_gid = this$1.ncid2ogid[cid]; - if (old_gid) { - var new_gid = this$1.ogid2ngid[old_gid]; - out.writeShort(new_gid); - } else { - out.writeShort(0); - } - len++; - } - return out.get(); - } -}; - -function TTFFont(rawData, name) { - var self = this; - var data = self.contents = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* BinaryStream */])(rawData); - if (data.readString(4) == "ttcf") { - var offset; - var parse = function() { - data.offset(offset); - self.parse(); - }; - if (!name) { - throw new Error("Must specify a name for TTC files"); - } - data.readLong(); // version - var numFonts = data.readLong(); - for (var i = 0; i < numFonts; ++i) { - offset = data.readLong(); - data.saveExcursion(parse); - if (self.psName == name) { - return; - } - } - throw new Error("Font " + name + " not found in collection"); - } else { - data.offset(0); - self.parse(); - } -} - -TTFFont.prototype = { - parse: function() { - var dir = this.directory = new Directory(this.contents); - - this.head = dir.readTable("head", HeadTable); - this.loca = dir.readTable("loca", LocaTable); - this.hhea = dir.readTable("hhea", HheaTable); - this.maxp = dir.readTable("maxp", MaxpTable); - this.hmtx = dir.readTable("hmtx", HmtxTable); - this.glyf = dir.readTable("glyf", GlyfTable); - this.name = dir.readTable("name", NameTable); - this.post = dir.readTable("post", PostTable); - this.cmap = dir.readTable("cmap", CmapTable); - this.os2 = dir.readTable("OS/2", OS2Table); - - this.psName = this.name.postscriptName; - this.ascent = this.os2.ascent || this.hhea.ascent; - this.descent = this.os2.descent || this.hhea.descent; - this.lineGap = this.os2.lineGap || this.hhea.lineGap; - this.scale = 1000 / this.head.unitsPerEm; - }, - widthOfGlyph: function(glyph) { - return this.hmtx.forGlyph(glyph).advance * this.scale; - }, - makeSubset: function() { - return new Subfont(this); - } -}; - - - -//# sourceMappingURL=ttf.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/pdf/utils.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export BASE64 */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BinaryStream; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ucs2decode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ucs2encode; }); -/* eslint-disable no-multi-spaces, key-spacing, indent, camelcase, space-before-blocks, eqeqeq, brace-style */ -/* eslint-disable space-infix-ops, space-before-function-paren, array-bracket-spacing, object-curly-spacing */ -/* eslint-disable no-nested-ternary, max-params, default-case, no-else-return, no-empty */ -/* eslint-disable no-param-reassign, no-var, block-scoped-var */ - -// XXX: remove this junk (assume `true`) when we no longer have to support IE < 10 -var HAS_TYPED_ARRAYS = typeof Uint8Array !== 'undefined'; - -var BASE64 = (function(){ - var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - return { - decode: function(str) { - var input = str.replace(/[^A-Za-z0-9\+\/\=]/g, ""), i = 0, n = input.length, output = []; - - while (i < n) { - var enc1 = keyStr.indexOf(input.charAt(i++)); - var enc2 = keyStr.indexOf(input.charAt(i++)); - var enc3 = keyStr.indexOf(input.charAt(i++)); - var enc4 = keyStr.indexOf(input.charAt(i++)); - - var chr1 = (enc1 << 2) | (enc2 >>> 4); - var chr2 = ((enc2 & 15) << 4) | (enc3 >>> 2); - var chr3 = ((enc3 & 3) << 6) | enc4; - - output.push(chr1); - if (enc3 != 64) { - output.push(chr2); - } - if (enc4 != 64) { - output.push(chr3); - } - } - - return output; - }, - encode: function(bytes) { - var i = 0, n = bytes.length; - var output = ""; - - while (i < n) { - var chr1 = bytes[i++]; - var chr2 = bytes[i++]; - var chr3 = bytes[i++]; - - var enc1 = chr1 >>> 2; - var enc2 = ((chr1 & 3) << 4) | (chr2 >>> 4); - var enc3 = ((chr2 & 15) << 2) | (chr3 >>> 6); - var enc4 = chr3 & 63; - - if (i - n == 2) { - enc3 = enc4 = 64; - } else if (i - n == 1) { - enc4 = 64; - } - - output += keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4); - } - return output; - } - }; -}()); - -function BinaryStream(data) { - var offset = 0, length = 0; - if (data == null) { - data = HAS_TYPED_ARRAYS ? new Uint8Array(256) : []; - } else { - length = data.length; - } - - var ensure = HAS_TYPED_ARRAYS ? function(len) { - if (len >= data.length) { - var tmp = new Uint8Array(Math.max(len + 256, data.length * 2)); - tmp.set(data, 0); - data = tmp; - } - } : function() {}; - - var get = HAS_TYPED_ARRAYS ? function() { - return new Uint8Array(data.buffer, 0, length); - } : function() { - return data; - }; - - var write = HAS_TYPED_ARRAYS ? function(bytes) { - if (typeof bytes == "string") { - return writeString(bytes); - } - var len = bytes.length; - ensure(offset + len); - data.set(bytes, offset); - offset += len; - if (offset > length) { - length = offset; - } - } : function(bytes) { - if (typeof bytes == "string") { - return writeString(bytes); - } - for (var i = 0; i < bytes.length; ++i) { - writeByte(bytes[i]); - } - }; - - var slice = HAS_TYPED_ARRAYS ? function(start, length) { - if (data.buffer.slice) { - return new Uint8Array(data.buffer.slice(start, start + length)); - } else { - // IE10 - var x = new Uint8Array(length); - x.set(new Uint8Array(data.buffer, start, length)); - return x; - } - } : function(start, length) { - return data.slice(start, start + length); - }; - - function eof() { - return offset >= length; - } - function readByte() { - return offset < length ? data[offset++] : 0; - } - function writeByte(b) { - ensure(offset); - data[offset++] = b & 0xFF; - if (offset > length) { - length = offset; - } - } - function readShort() { - return (readByte() << 8) | readByte(); - } - function writeShort(w) { - writeByte(w >> 8); - writeByte(w); - } - function readShort_() { - var w = readShort(); - return w >= 0x8000 ? w - 0x10000 : w; - } - function writeShort_(w) { - writeShort(w < 0 ? w + 0x10000 : w); - } - function readLong() { - return (readShort() * 0x10000) + readShort(); - } - function writeLong(w) { - writeShort((w >>> 16) & 0xFFFF); - writeShort(w & 0xFFFF); - } - function readLong_() { - var w = readLong(); - return w >= 0x80000000 ? w - 0x100000000 : w; - } - function writeLong_(w) { - writeLong(w < 0 ? w + 0x100000000 : w); - } - function readFixed() { - return readLong() / 0x10000; - } - function writeFixed(f) { - writeLong(Math.round(f * 0x10000)); - } - function readFixed_() { - return readLong_() / 0x10000; - } - function writeFixed_(f) { - writeLong_(Math.round(f * 0x10000)); - } - function read(len) { - return times(len, readByte); - } - function readString(len) { - return String.fromCharCode.apply(String, read(len)); - } - function writeString(str) { - for (var i = 0; i < str.length; ++i) { - writeByte(str.charCodeAt(i)); - } - } - function times(n, reader) { - for (var ret = new Array(n), i = 0; i < n; ++i) { - ret[i] = reader(); - } - return ret; - } - - var stream = { - eof : eof, - readByte : readByte, - writeByte : writeByte, - readShort : readShort, - writeShort : writeShort, - readLong : readLong, - writeLong : writeLong, - readFixed : readFixed, - writeFixed : writeFixed, - - // signed numbers. - readShort_ : readShort_, - writeShort_ : writeShort_, - readLong_ : readLong_, - writeLong_ : writeLong_, - readFixed_ : readFixed_, - writeFixed_ : writeFixed_, - - read : read, - write : write, - readString : readString, - writeString : writeString, - - times : times, - get : get, - slice : slice, - - offset: function(pos) { - if (pos != null) { - offset = pos; - return stream; - } - return offset; - }, - - skip: function(nbytes) { - offset += nbytes; - }, - - toString: function() { - throw new Error("FIX CALLER. BinaryStream is no longer convertible to string!"); - }, - - length: function() { return length; }, - - saveExcursion: function(f) { - var pos = offset; - try { - return f(); - } finally { - offset = pos; - } - }, - - writeBase64: function(base64) { - if (window.atob) { - writeString(window.atob(base64)); - } else { - write(BASE64.decode(base64)); - } - }, - base64: function() { - return BASE64.encode(get()); - } - }; - - return stream; -} - -function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -function ucs2encode(array) { - return array.map(function(value){ - var output = ""; - if (value > 0xFFFF) { - value -= 0x10000; - output += String.fromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += String.fromCharCode(value); - return output; - }).join(""); -} - - - -//# sourceMappingURL=utils.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/search/quad-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__quad_root__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/search/quad-root.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - -var QuadNode = (function (QuadRoot) { - function QuadNode(rect) { - QuadRoot.call(this); - this.children = []; - this.rect = rect; - } - - if ( QuadRoot ) QuadNode.__proto__ = QuadRoot; - QuadNode.prototype = Object.create( QuadRoot && QuadRoot.prototype ); - QuadNode.prototype.constructor = QuadNode; - - QuadNode.prototype.inBounds = function inBounds (rect) { - var nodeRect = this.rect; - var nodeBottomRight = nodeRect.bottomRight(); - var bottomRight = rect.bottomRight(); - var inBounds = nodeRect.origin.x <= rect.origin.x && nodeRect.origin.y <= rect.origin.y && bottomRight.x <= nodeBottomRight.x && - bottomRight.y <= nodeBottomRight.y; - return inBounds; - }; - - QuadNode.prototype.pointShapes = function pointShapes (point) { - var children = this.children; - var length = children.length; - var result = QuadRoot.prototype.pointShapes.call(this, point); - for (var idx = 0; idx < length; idx++) { - Object(__WEBPACK_IMPORTED_MODULE_2__util__["append"])(result, children[idx].pointShapes(point)); - } - return result; - }; - - QuadNode.prototype.insert = function insert (shape, bbox) { - var children = this.children; - var inserted = false; - - if (this.inBounds(bbox)) { - if (this.shapes.length < 4) { - this._add(shape, bbox); - } else { - if (!children.length) { - this._initChildren(); - } - - for (var idx = 0; idx < children.length; idx++) { - if (children[idx].insert(shape, bbox)) { - inserted = true; - break; - } - } - - if (!inserted) { - this._add(shape, bbox); - } - } - inserted = true; - } - - return inserted; - }; - - QuadNode.prototype._initChildren = function _initChildren () { - var ref = this; - var rect = ref.rect; - var children = ref.children; - var center = rect.center(); - var halfWidth = rect.width() / 2; - var halfHeight = rect.height() / 2; - - children.push( - new QuadNode(new __WEBPACK_IMPORTED_MODULE_1__geometry__["Rect"]([ rect.origin.x, rect.origin.y ], [ halfWidth, halfHeight ])), - new QuadNode(new __WEBPACK_IMPORTED_MODULE_1__geometry__["Rect"]([ center.x, rect.origin.y ], [ halfWidth, halfHeight ])), - new QuadNode(new __WEBPACK_IMPORTED_MODULE_1__geometry__["Rect"]([ rect.origin.x, center.y ], [ halfWidth, halfHeight ])), - new QuadNode(new __WEBPACK_IMPORTED_MODULE_1__geometry__["Rect"]([ center.x, center.y ], [ halfWidth, halfHeight ])) - ); - }; - - return QuadNode; -}(__WEBPACK_IMPORTED_MODULE_0__quad_root__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (QuadNode); -//# sourceMappingURL=quad-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/search/quad-root.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); - - -var QuadRoot = (function (Class) { - function QuadRoot() { - Class.call(this); - - this.shapes = []; - } - - if ( Class ) QuadRoot.__proto__ = Class; - QuadRoot.prototype = Object.create( Class && Class.prototype ); - QuadRoot.prototype.constructor = QuadRoot; - - QuadRoot.prototype._add = function _add (shape, bbox) { - this.shapes.push({ - bbox: bbox, - shape: shape - }); - shape._quadNode = this; - }; - - QuadRoot.prototype.pointShapes = function pointShapes (point) { - var shapes = this.shapes; - var length = shapes.length; - var result = []; - for (var idx = 0; idx < length; idx++) { - if (shapes[idx].bbox.containsPoint(point)) { - result.push(shapes[idx].shape); - } - } - return result; - }; - - QuadRoot.prototype.insert = function insert (shape, bbox) { - this._add(shape, bbox); - }; - - QuadRoot.prototype.remove = function remove (shape) { - var shapes = this.shapes; - var length = shapes.length; - - for (var idx = 0; idx < length; idx++) { - if (shapes[idx].shape === shape) { - shapes.splice(idx, 1); - break; - } - } - }; - - return QuadRoot; -}(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* Class */])); - -/* harmony default export */ __webpack_exports__["a"] = (QuadRoot); -//# sourceMappingURL=quad-root.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/search/shapes-quad-tree.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__quad_root__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/search/quad-root.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__quad_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/search/quad-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__geometry__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - -var ROOT_SIZE = 3000; -var LEVEL_STEP = 10000; -var MAX_LEVEL = 75; - -var ShapesQuadTree = (function (Class) { - function ShapesQuadTree() { - Class.call(this); - - this.initRoots(); - } - - if ( Class ) ShapesQuadTree.__proto__ = Class; - ShapesQuadTree.prototype = Object.create( Class && Class.prototype ); - ShapesQuadTree.prototype.constructor = ShapesQuadTree; - - ShapesQuadTree.prototype.initRoots = function initRoots () { - this.rootMap = {}; - this.root = new __WEBPACK_IMPORTED_MODULE_0__quad_root__["a" /* default */](); - this.rootElements = []; - }; - - ShapesQuadTree.prototype.clear = function clear () { - var this$1 = this; - - var rootElements = this.rootElements; - for (var idx = 0; idx < rootElements.length; idx++) { - this$1.remove(rootElements[idx]); - } - this.initRoots(); - }; - - ShapesQuadTree.prototype.pointShape = function pointShape (point) { - var sectorRoot = ( this.rootMap[ Math.floor( point.x / ROOT_SIZE ) ] || {} )[ Math.floor( point.y / ROOT_SIZE ) ]; - var result = this.root.pointShapes(point); - - if (sectorRoot) { - result = result.concat(sectorRoot.pointShapes(point)); - } - - this.assignZindex(result); - - result.sort(zIndexComparer); - for (var idx = 0; idx < result.length; idx++) { - if (result[idx].containsPoint(point)) { - return result[idx]; - } - } - }; - - ShapesQuadTree.prototype.assignZindex = function assignZindex (elements) { - var this$1 = this; - - for (var idx = 0; idx < elements.length; idx++) { - var element = elements[idx]; - var zIndex = 0; - var levelWeight = Math.pow(LEVEL_STEP, MAX_LEVEL); - var parents = []; - - while (element) { - parents.push(element); - element = element.parent; - } - - while (parents.length) { - element = parents.pop(); - zIndex += ((element.parent ? element.parent.children : this$1.rootElements).indexOf(element) + 1) * levelWeight; - levelWeight /= LEVEL_STEP; - } - - elements[idx]._zIndex = zIndex; - } - }; - - ShapesQuadTree.prototype.optionsChange = function optionsChange (e) { - if (e.field === "transform" || e.field === "stroke.width") { - this.bboxChange(e.element); - } - }; - - ShapesQuadTree.prototype.geometryChange = function geometryChange (e) { - this.bboxChange(e.element); - }; - - ShapesQuadTree.prototype.bboxChange = function bboxChange (element) { - var this$1 = this; - - if (element.nodeType === "Group") { - for (var idx = 0; idx < element.children.length; idx++) { - this$1.bboxChange(element.children[idx]); - } - } else { - if (element._quadNode) { - element._quadNode.remove(element); - } - this._insertShape(element); - } - }; - - ShapesQuadTree.prototype.add = function add (elements) { - var elementsArray = Array.isArray(elements) ? elements.slice(0) : [ elements ]; - - Object(__WEBPACK_IMPORTED_MODULE_4__util__["append"])(this.rootElements, elementsArray); - this._insert(elementsArray); - }; - - ShapesQuadTree.prototype.childrenChange = function childrenChange (e) { - var this$1 = this; - - if (e.action === "remove") { - for (var idx = 0; idx < e.items.length; idx++) { - this$1.remove(e.items[idx]); - } - } else { - this._insert(Array.prototype.slice.call(e.items, 0)); - } - }; - - ShapesQuadTree.prototype._insert = function _insert (elements) { - var this$1 = this; - - var element; - - while (elements.length > 0) { - element = elements.pop(); - element.addObserver(this$1); - if (element.nodeType === "Group") { - Object(__WEBPACK_IMPORTED_MODULE_4__util__["append"])(elements, element.children); - } else { - this$1._insertShape(element); - } - } - }; - - ShapesQuadTree.prototype._insertShape = function _insertShape (shape) { - var bbox = shape.bbox(); - if (bbox) { - var sectors = this.getSectors(bbox); - var x = sectors[0][0]; - var y = sectors[1][0]; - - if (this.inRoot(sectors)) { - this.root.insert(shape, bbox); - } else { - var rootMap = this.rootMap; - if (!rootMap[x]) { - rootMap[x] = {}; - } - - if (!rootMap[x][y]) { - rootMap[x][y] = new __WEBPACK_IMPORTED_MODULE_1__quad_node__["a" /* default */]( - new __WEBPACK_IMPORTED_MODULE_2__geometry__["Rect"]([ x * ROOT_SIZE, y * ROOT_SIZE ], [ ROOT_SIZE, ROOT_SIZE ]) - ); - } - - rootMap[x][y].insert(shape, bbox); - } - } - }; - - ShapesQuadTree.prototype.remove = function remove (element) { - var this$1 = this; - - element.removeObserver(this); - - if (element.nodeType === "Group") { - var children = element.children; - for (var idx = 0; idx < children.length; idx++) { - this$1.remove(children[idx]); - } - } else if (element._quadNode) { - element._quadNode.remove(element); - delete element._quadNode; - } - }; - - ShapesQuadTree.prototype.inRoot = function inRoot (sectors) { - return sectors[0].length > 1 || sectors[1].length > 1; - }; - - ShapesQuadTree.prototype.getSectors = function getSectors (rect) { - var bottomRight = rect.bottomRight(); - var bottomX = Math.floor(bottomRight.x / ROOT_SIZE); - var bottomY = Math.floor(bottomRight.y / ROOT_SIZE); - var sectors = [ [], [] ]; - for (var x = Math.floor(rect.origin.x / ROOT_SIZE); x <= bottomX; x++) { - sectors[0].push(x); - } - for (var y = Math.floor(rect.origin.y / ROOT_SIZE); y <= bottomY; y++) { - sectors[1].push(y); - } - return sectors; - }; - - return ShapesQuadTree; -}(__WEBPACK_IMPORTED_MODULE_3__common__["a" /* Class */])); - -function zIndexComparer(x1, x2) { - if (x1._zIndex < x2._zIndex) { - return 1; - } - if (x1._zIndex > x2._zIndex) { - return -1; - } - - return 0; -} - -/* harmony default export */ __webpack_exports__["a"] = (ShapesQuadTree); -//# sourceMappingURL=shapes-quad-tree.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shapes_element__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/element.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__shapes_element__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shapes_circle__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/circle.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__shapes_circle__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__shapes_arc__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/arc.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__shapes_arc__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__shapes_path__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/path.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_3__shapes_path__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__shapes_multi_path__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/multi-path.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_4__shapes_multi_path__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__shapes_text__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/text.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_5__shapes_text__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__shapes_image__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/image.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_6__shapes_image__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__shapes_group__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/group.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_7__shapes_group__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__shapes_layout__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/layout.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_8__shapes_layout__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__shapes_rect__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/rect.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_9__shapes_rect__["a"]; }); - - - - - - - - - - -//# sourceMappingURL=shapes.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/arc.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry_arc__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/arc.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__element__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__path__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/path.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mixins_paintable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/paintable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mixins_measurable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/measurable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__accessors_define_geometry_accessors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/accessors/define-geometry-accessors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - - - -var DEFAULT_STROKE = "#000"; - -var Arc = (function (Element) { - function Arc(geometry, options) { - if ( geometry === void 0 ) geometry = new __WEBPACK_IMPORTED_MODULE_0__geometry_arc__["a" /* default */](); - if ( options === void 0 ) options = {}; - - Element.call(this, options); - - this.geometry(geometry); - - if (!Object(__WEBPACK_IMPORTED_MODULE_6__util__["defined"])(this.options.stroke)) { - this.stroke(DEFAULT_STROKE); - } - } - - if ( Element ) Arc.__proto__ = Element; - Arc.prototype = Object.create( Element && Element.prototype ); - Arc.prototype.constructor = Arc; - - Arc.prototype._bbox = function _bbox (matrix) { - return this._geometry.bbox(matrix); - }; - - Arc.prototype.rawBBox = function rawBBox () { - return this.geometry().bbox(); - }; - - Arc.prototype.toPath = function toPath () { - var path = new __WEBPACK_IMPORTED_MODULE_2__path__["a" /* default */](); - var curvePoints = this.geometry().curvePoints(); - - if (curvePoints.length > 0) { - path.moveTo(curvePoints[0].x, curvePoints[0].y); - - for (var i = 1; i < curvePoints.length; i += 3) { - path.curveTo(curvePoints[i], curvePoints[i + 1], curvePoints[i + 2]); - } - } - - return path; - }; - - Arc.prototype._containsPoint = function _containsPoint (point) { - return this.geometry().containsPoint(point); - }; - - Arc.prototype._isOnPath = function _isOnPath (point) { - return this.geometry()._isOnPath(point, this.options.stroke.width / 2); - }; - - return Arc; -}(__WEBPACK_IMPORTED_MODULE_1__element__["a" /* default */])); - -Arc.prototype.nodeType = "Arc"; - -__WEBPACK_IMPORTED_MODULE_3__mixins_paintable__["a" /* default */].extend(Arc.prototype); -__WEBPACK_IMPORTED_MODULE_4__mixins_measurable__["a" /* default */].extend(Arc.prototype); -Object(__WEBPACK_IMPORTED_MODULE_5__accessors_define_geometry_accessors__["a" /* default */])(Arc.prototype, [ "geometry" ]); - -/* harmony default export */ __webpack_exports__["a"] = (Arc); -//# sourceMappingURL=arc.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/circle.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry_circle__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/circle.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_paintable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/paintable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_measurable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/measurable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__accessors_define_geometry_accessors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/accessors/define-geometry-accessors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__element__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - - -var DEFAULT_STROKE = "#000"; - -var Circle = (function (Element) { - function Circle(geometry, options) { - if ( geometry === void 0 ) geometry = new __WEBPACK_IMPORTED_MODULE_0__geometry_circle__["a" /* default */](); - if ( options === void 0 ) options = {}; - - Element.call(this, options); - this.geometry(geometry); - - if (!Object(__WEBPACK_IMPORTED_MODULE_5__util__["defined"])(this.options.stroke)) { - this.stroke(DEFAULT_STROKE); - } - } - - if ( Element ) Circle.__proto__ = Element; - Circle.prototype = Object.create( Element && Element.prototype ); - Circle.prototype.constructor = Circle; - - Circle.prototype.rawBBox = function rawBBox () { - return this._geometry.bbox(); - }; - - Circle.prototype._bbox = function _bbox (matrix) { - return this._geometry.bbox(matrix); - }; - - Circle.prototype._containsPoint = function _containsPoint (point) { - return this.geometry().containsPoint(point); - }; - - Circle.prototype._isOnPath = function _isOnPath (point) { - return this.geometry()._isOnPath(point, this.options.stroke.width / 2); - }; - - return Circle; -}(__WEBPACK_IMPORTED_MODULE_4__element__["a" /* default */])); - -Circle.prototype.nodeType = "Circle"; - -__WEBPACK_IMPORTED_MODULE_1__mixins_paintable__["a" /* default */].extend(Circle.prototype); -__WEBPACK_IMPORTED_MODULE_2__mixins_measurable__["a" /* default */].extend(Circle.prototype); -Object(__WEBPACK_IMPORTED_MODULE_3__accessors_define_geometry_accessors__["a" /* default */])(Circle.prototype, [ "geometry" ]); - -/* harmony default export */ __webpack_exports__["a"] = (Circle); -//# sourceMappingURL=circle.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/element.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_options_store__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/options-store.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_observers_mixin__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__geometry_rect__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/rect.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__geometry_matrix__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/matrix.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__geometry_transform__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/transform.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__geometry_to_matrix__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/to-matrix.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - - - - -var Element = (function (Class) { - function Element(options) { - Class.call(this); - - this._initOptions(options); - } - - if ( Class ) Element.__proto__ = Class; - Element.prototype = Object.create( Class && Class.prototype ); - Element.prototype.constructor = Element; - - Element.prototype._initOptions = function _initOptions (options) { - if ( options === void 0 ) options = {}; - - var clip = options.clip; - var transform = options.transform; - - if (transform) { - options.transform = Object(__WEBPACK_IMPORTED_MODULE_4__geometry_transform__["a" /* default */])(transform); - } - - if (clip && !clip.id) { - clip.id = Object(__WEBPACK_IMPORTED_MODULE_7__util__["definitionId"])(); - } - - this.options = new __WEBPACK_IMPORTED_MODULE_0__core_options_store__["a" /* default */](options); - this.options.addObserver(this); - }; - - Element.prototype.transform = function transform (value) { - if (Object(__WEBPACK_IMPORTED_MODULE_7__util__["defined"])(value)) { - this.options.set("transform", Object(__WEBPACK_IMPORTED_MODULE_4__geometry_transform__["a" /* default */])(value)); - } else { - return this.options.get("transform"); - } - }; - - Element.prototype.parentTransform = function parentTransform () { - var element = this; - var parentMatrix; - - while (element.parent) { - element = element.parent; - var transformation = element.transform(); - if (transformation) { - parentMatrix = transformation.matrix().multiplyCopy(parentMatrix || __WEBPACK_IMPORTED_MODULE_3__geometry_matrix__["a" /* default */].unit()); - } - } - - if (parentMatrix) { - return Object(__WEBPACK_IMPORTED_MODULE_4__geometry_transform__["a" /* default */])(parentMatrix); - } - }; - - Element.prototype.currentTransform = function currentTransform (parentTransform) { - if ( parentTransform === void 0 ) parentTransform = this.parentTransform(); - - var elementTransform = this.transform(); - var elementMatrix = Object(__WEBPACK_IMPORTED_MODULE_5__geometry_to_matrix__["a" /* default */])(elementTransform); - - var parentMatrix = Object(__WEBPACK_IMPORTED_MODULE_5__geometry_to_matrix__["a" /* default */])(parentTransform); - var combinedMatrix; - - if (elementMatrix && parentMatrix) { - combinedMatrix = parentMatrix.multiplyCopy(elementMatrix); - } else { - combinedMatrix = elementMatrix || parentMatrix; - } - - if (combinedMatrix) { - return Object(__WEBPACK_IMPORTED_MODULE_4__geometry_transform__["a" /* default */])(combinedMatrix); - } - }; - - Element.prototype.visible = function visible (value) { - if (Object(__WEBPACK_IMPORTED_MODULE_7__util__["defined"])(value)) { - this.options.set("visible", value); - return this; - } - - return this.options.get("visible") !== false; - }; - - Element.prototype.clip = function clip (value) { - var options = this.options; - if (Object(__WEBPACK_IMPORTED_MODULE_7__util__["defined"])(value)) { - if (value && !value.id) { - value.id = Object(__WEBPACK_IMPORTED_MODULE_7__util__["definitionId"])(); - } - options.set("clip", value); - return this; - } - - return options.get("clip"); - }; - - Element.prototype.opacity = function opacity (value) { - if (Object(__WEBPACK_IMPORTED_MODULE_7__util__["defined"])(value)) { - this.options.set("opacity", value); - return this; - } - - return Object(__WEBPACK_IMPORTED_MODULE_7__util__["valueOrDefault"])(this.options.get("opacity"), 1); - }; - - Element.prototype.clippedBBox = function clippedBBox (transformation) { - var bbox = this._clippedBBox(transformation); - if (bbox) { - var clip = this.clip(); - return clip ? __WEBPACK_IMPORTED_MODULE_2__geometry_rect__["a" /* default */].intersect(bbox, clip.bbox(transformation)) : bbox; - } - }; - - Element.prototype.containsPoint = function containsPoint (point, parentTransform) { - if (this.visible()) { - var transform = this.currentTransform(parentTransform); - var transformedPoint = point; - if (transform) { - transformedPoint = point.transformCopy(transform.matrix().invert()); - } - return (this._hasFill() && this._containsPoint(transformedPoint)) || (this._isOnPath && this._hasStroke() && this._isOnPath(transformedPoint)); - } - return false; - }; - - Element.prototype._hasFill = function _hasFill () { - var fill = this.options.fill; - return fill && !Object(__WEBPACK_IMPORTED_MODULE_7__util__["isTransparent"])(fill.color); - }; - - Element.prototype._hasStroke = function _hasStroke () { - var stroke = this.options.stroke; - return stroke && stroke.width > 0 && !Object(__WEBPACK_IMPORTED_MODULE_7__util__["isTransparent"])(stroke.color); - }; - - Element.prototype._clippedBBox = function _clippedBBox (transformation) { - return this.bbox(transformation); - }; - - return Element; -}(__WEBPACK_IMPORTED_MODULE_6__common__["a" /* Class */])); - -Element.prototype.nodeType = "Element"; - -__WEBPACK_IMPORTED_MODULE_1__mixins_observers_mixin__["a" /* default */].extend(Element.prototype); - -/* harmony default export */ __webpack_exports__["a"] = (Element); - -//# sourceMappingURL=element.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/elements-array.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mixins_observers_mixin__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/observers-mixin.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); - - - -var push = [].push; -var pop = [].pop; -var splice = [].splice; -var shift = [].shift; -var slice = [].slice; -var unshift = [].unshift; - -var ElementsArray = (function (Class) { - function ElementsArray(array) { - if ( array === void 0 ) array = []; - - Class.call(this); - - this.length = 0; - this._splice(0, array.length, array); - } - - if ( Class ) ElementsArray.__proto__ = Class; - ElementsArray.prototype = Object.create( Class && Class.prototype ); - ElementsArray.prototype.constructor = ElementsArray; - - ElementsArray.prototype.elements = function elements (value) { - if (value) { - this._splice(0, this.length, value); - - this._change(); - return this; - } - - return this.slice(0); - }; - - ElementsArray.prototype.push = function push$1 () { - var elements = arguments; - var result = push.apply(this, elements); - - this._add(elements); - - return result; - }; - - ElementsArray.prototype.slice = function slice$1 () { - return slice.call(this); - }; - - ElementsArray.prototype.pop = function pop$1 () { - var length = this.length; - var result = pop.apply(this); - - if (length) { - this._remove([ result ]); - } - - return result; - }; - - ElementsArray.prototype.splice = function splice$1 (index, howMany) { - var elements = slice.call(arguments, 2); - var result = this._splice(index, howMany, elements); - - this._change(); - - return result; - }; - - ElementsArray.prototype.shift = function shift$1 () { - var length = this.length; - var result = shift.apply(this); - - if (length) { - this._remove([ result ]); - } - - return result; - }; - - ElementsArray.prototype.unshift = function unshift$1 () { - var elements = arguments; - var result = unshift.apply(this, elements); - - this._add(elements); - - return result; - }; - - ElementsArray.prototype.indexOf = function indexOf (element) { - var this$1 = this; - - var length = this.length; - - for (var idx = 0; idx < length; idx++) { - if (this$1[idx] === element) { - return idx; - } - } - return -1; - }; - - ElementsArray.prototype._splice = function _splice (index, howMany, elements) { - var result = splice.apply(this, [ index, howMany ].concat(elements)); - - this._clearObserver(result); - this._setObserver(elements); - - return result; - }; - - ElementsArray.prototype._add = function _add (elements) { - this._setObserver(elements); - this._change(); - }; - - ElementsArray.prototype._remove = function _remove (elements) { - this._clearObserver(elements); - this._change(); - }; - - ElementsArray.prototype._setObserver = function _setObserver (elements) { - var this$1 = this; - - for (var idx = 0; idx < elements.length; idx++) { - elements[idx].addObserver(this$1); - } - }; - - ElementsArray.prototype._clearObserver = function _clearObserver (elements) { - var this$1 = this; - - for (var idx = 0; idx < elements.length; idx++) { - elements[idx].removeObserver(this$1); - } - }; - - ElementsArray.prototype._change = function _change () {}; - - return ElementsArray; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -__WEBPACK_IMPORTED_MODULE_0__mixins_observers_mixin__["a" /* default */].extend(ElementsArray.prototype); - -/* harmony default export */ __webpack_exports__["a"] = (ElementsArray); - -//# sourceMappingURL=elements-array.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/geometry-elements-array.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__elements_array__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/elements-array.js"); - - -var GeometryElementsArray = (function (ElementsArray) { - function GeometryElementsArray () { - ElementsArray.apply(this, arguments); - } - - if ( ElementsArray ) GeometryElementsArray.__proto__ = ElementsArray; - GeometryElementsArray.prototype = Object.create( ElementsArray && ElementsArray.prototype ); - GeometryElementsArray.prototype.constructor = GeometryElementsArray; - - GeometryElementsArray.prototype._change = function _change () { - this.geometryChange(); - }; - - return GeometryElementsArray; -}(__WEBPACK_IMPORTED_MODULE_0__elements_array__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (GeometryElementsArray); -//# sourceMappingURL=geometry-elements-array.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/group.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__element__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_traversable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/traversable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_elements_bounding_box__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/utils/elements-bounding-box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_elements_clippend_bounding_box__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/utils/elements-clippend-bounding-box.js"); - - - - - - -var Group = (function (Element) { - function Group(options) { - Element.call(this, options); - this.children = []; - } - - if ( Element ) Group.__proto__ = Element; - Group.prototype = Object.create( Element && Element.prototype ); - Group.prototype.constructor = Group; - - Group.prototype.childrenChange = function childrenChange (action, items, index) { - this.trigger("childrenChange",{ - action: action, - items: items, - index: index - }); - }; - - Group.prototype.append = function append$1 () { - Object(__WEBPACK_IMPORTED_MODULE_2__util__["append"])(this.children, arguments); - this._reparent(arguments, this); - - this.childrenChange("add", arguments); - - return this; - }; - - Group.prototype.insert = function insert (index, element) { - this.children.splice(index, 0, element); - element.parent = this; - - this.childrenChange("add", [ element ], index); - - return this; - }; - - Group.prototype.insertAt = function insertAt (element, index) { - return this.insert(index, element); - }; - - Group.prototype.remove = function remove (element) { - var index = this.children.indexOf(element); - if (index >= 0) { - this.children.splice(index, 1); - element.parent = null; - this.childrenChange("remove", [ element ], index); - } - - return this; - }; - - Group.prototype.removeAt = function removeAt (index) { - if (0 <= index && index < this.children.length) { - var element = this.children[index]; - this.children.splice(index, 1); - element.parent = null; - this.childrenChange("remove", [ element ], index); - } - - return this; - }; - - Group.prototype.clear = function clear () { - var items = this.children; - this.children = []; - this._reparent(items, null); - - this.childrenChange("remove", items, 0); - - return this; - }; - - Group.prototype.bbox = function bbox (transformation) { - return Object(__WEBPACK_IMPORTED_MODULE_3__utils_elements_bounding_box__["a" /* default */])(this.children, true, this.currentTransform(transformation)); - }; - - Group.prototype.rawBBox = function rawBBox () { - return Object(__WEBPACK_IMPORTED_MODULE_3__utils_elements_bounding_box__["a" /* default */])(this.children, false); - }; - - Group.prototype._clippedBBox = function _clippedBBox (transformation) { - return Object(__WEBPACK_IMPORTED_MODULE_4__utils_elements_clippend_bounding_box__["a" /* default */])(this.children, this.currentTransform(transformation)); - }; - - Group.prototype.currentTransform = function currentTransform (transformation) { - return Element.prototype.currentTransform.call(this, transformation) || null; - }; - - Group.prototype.containsPoint = function containsPoint (point, parentTransform) { - if (this.visible()) { - var children = this.children; - var transform = this.currentTransform(parentTransform); - for (var idx = 0; idx < children.length; idx++) { - if (children[idx].containsPoint(point, transform)) { - return true; - } - } - } - return false; - }; - - Group.prototype._reparent = function _reparent (elements, newParent) { - var this$1 = this; - - for (var i = 0; i < elements.length; i++) { - var child = elements[i]; - var parent = child.parent; - if (parent && parent !== this$1 && parent.remove) { - parent.remove(child); - } - - child.parent = newParent; - } - }; - - return Group; -}(__WEBPACK_IMPORTED_MODULE_0__element__["a" /* default */])); - -Group.prototype.nodeType = "Group"; - -__WEBPACK_IMPORTED_MODULE_1__mixins_traversable__["a" /* default */].extend(Group.prototype, "children"); - -/* harmony default export */ __webpack_exports__["a"] = (Group); -//# sourceMappingURL=group.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/image.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__accessors_define_geometry_accessors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/accessors/define-geometry-accessors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__element__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__geometry_rect__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/rect.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__geometry_to_matrix__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/to-matrix.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - -var Image = (function (Element) { - function Image(src, rect, options) { - if ( rect === void 0 ) rect = new __WEBPACK_IMPORTED_MODULE_2__geometry_rect__["a" /* default */](); - if ( options === void 0 ) options = {}; - - Element.call(this, options); - - this.src(src); - this.rect(rect); - } - - if ( Element ) Image.__proto__ = Element; - Image.prototype = Object.create( Element && Element.prototype ); - Image.prototype.constructor = Image; - - Image.prototype.src = function src (value) { - if (Object(__WEBPACK_IMPORTED_MODULE_4__util__["defined"])(value)) { - this.options.set("src", value); - return this; - } - - return this.options.get("src"); - }; - - Image.prototype.bbox = function bbox (transformation) { - var combinedMatrix = Object(__WEBPACK_IMPORTED_MODULE_3__geometry_to_matrix__["a" /* default */])(this.currentTransform(transformation)); - return this._rect.bbox(combinedMatrix); - }; - - Image.prototype.rawBBox = function rawBBox () { - return this._rect.bbox(); - }; - - Image.prototype._containsPoint = function _containsPoint (point) { - return this._rect.containsPoint(point); - }; - - Image.prototype._hasFill = function _hasFill () { - return this.src(); - }; - - return Image; -}(__WEBPACK_IMPORTED_MODULE_1__element__["a" /* default */])); - -Image.prototype.nodeType = "Image"; - -Object(__WEBPACK_IMPORTED_MODULE_0__accessors_define_geometry_accessors__["a" /* default */])(Image.prototype, [ "rect" ]); - -/* harmony default export */ __webpack_exports__["a"] = (Image); -//# sourceMappingURL=image.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/layout.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__group__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/group.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry_size__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/size.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__geometry_rect__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/rect.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__geometry_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__geometry_transform__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/transform.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__alignment_translate_to_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/translate-to-point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__alignment_align_start__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/align-start.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__alignment_align_start_reverse__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/alignment/align-start-reverse.js"); - - - - - - - - - -var DEFAULT_OPTIONS = { - alignContent: "start", - justifyContent: "start", - alignItems: "start", - spacing: 0, - orientation: "horizontal", - lineSpacing: 0, - wrap: true, - revers: false -}; - -var forEach = function (elements, callback) { - elements.forEach(callback); -}; - -var forEachReverse = function (elements, callback) { - var length = elements.length; - - for (var idx = length - 1; idx >= 0; idx--) { - callback(elements[idx], idx); - } -}; - -var Layout = (function (Group) { - function Layout(rect, options) { - Group.call(this, Object.assign({}, DEFAULT_OPTIONS, options)); - this._rect = rect; - this._fieldMap = {}; - } - - if ( Group ) Layout.__proto__ = Group; - Layout.prototype = Object.create( Group && Group.prototype ); - Layout.prototype.constructor = Layout; - - Layout.prototype.rect = function rect (value) { - if (value) { - this._rect = value; - return this; - } - - return this._rect; - }; - - Layout.prototype._initMap = function _initMap () { - var options = this.options; - var fieldMap = this._fieldMap; - if (options.orientation === "horizontal") { - fieldMap.sizeField = "width"; - fieldMap.groupsSizeField = "height"; - fieldMap.groupAxis = "x"; - fieldMap.groupsAxis = "y"; - } else { - fieldMap.sizeField = "height"; - fieldMap.groupsSizeField = "width"; - fieldMap.groupAxis = "y"; - fieldMap.groupsAxis = "x"; - } - - if (options.reverse) { - this.forEach = forEachReverse; - this.justifyAlign = __WEBPACK_IMPORTED_MODULE_7__alignment_align_start_reverse__["a" /* default */]; - } else { - this.forEach = forEach; - this.justifyAlign = __WEBPACK_IMPORTED_MODULE_6__alignment_align_start__["a" /* default */]; - } - }; - - Layout.prototype.reflow = function reflow () { - var this$1 = this; - - if (!this._rect || this.children.length === 0) { - return; - } - this._initMap(); - - if (this.options.transform) { - this.transform(null); - } - - var options = this.options; - var rect = this._rect; - var ref = this._initGroups(); - var groups = ref.groups; - var groupsSize = ref.groupsSize; - var ref$1 = this._fieldMap; - var sizeField = ref$1.sizeField; - var groupsSizeField = ref$1.groupsSizeField; - var groupAxis = ref$1.groupAxis; - var groupsAxis = ref$1.groupsAxis; - var groupOrigin = new __WEBPACK_IMPORTED_MODULE_3__geometry_point__["a" /* default */](); - var elementOrigin = new __WEBPACK_IMPORTED_MODULE_3__geometry_point__["a" /* default */](); - var size = new __WEBPACK_IMPORTED_MODULE_1__geometry_size__["a" /* default */](); - var groupStart = Object(__WEBPACK_IMPORTED_MODULE_6__alignment_align_start__["a" /* default */])(groupsSize, rect, options.alignContent, groupsAxis, groupsSizeField); - var elementStart, group, groupBox; - - var arrangeElements = function (bbox, idx) { - var element = group.elements[idx]; - - elementOrigin[groupAxis] = elementStart; - elementOrigin[groupsAxis] = Object(__WEBPACK_IMPORTED_MODULE_6__alignment_align_start__["a" /* default */])(bbox.size[groupsSizeField], groupBox, options.alignItems, groupsAxis, groupsSizeField); - Object(__WEBPACK_IMPORTED_MODULE_5__alignment_translate_to_point__["a" /* default */])(elementOrigin, bbox, element); - elementStart += bbox.size[sizeField] + options.spacing; - }; - - for (var groupIdx = 0; groupIdx < groups.length; groupIdx++) { - group = groups[groupIdx]; - groupOrigin[groupAxis] = elementStart = this$1.justifyAlign(group.size, rect, options.justifyContent, groupAxis, sizeField); - groupOrigin[groupsAxis] = groupStart; - size[sizeField] = group.size; - size[groupsSizeField] = group.lineSize; - groupBox = new __WEBPACK_IMPORTED_MODULE_2__geometry_rect__["a" /* default */](groupOrigin, size); - this$1.forEach(group.bboxes, arrangeElements); - - groupStart += group.lineSize + options.lineSpacing; - } - - if (!options.wrap && group.size > rect.size[sizeField]) { - var scale = rect.size[sizeField] / groupBox.size[sizeField]; - var scaledStart = groupBox.topLeft().scale(scale, scale); - var scaledSize = groupBox.size[groupsSizeField] * scale; - var newStart = Object(__WEBPACK_IMPORTED_MODULE_6__alignment_align_start__["a" /* default */])(scaledSize, rect, options.alignContent, groupsAxis, groupsSizeField); - var transform = Object(__WEBPACK_IMPORTED_MODULE_4__geometry_transform__["a" /* default */])(); - if (groupAxis === "x") { - transform.translate(rect.origin.x - scaledStart.x, newStart - scaledStart.y); - } else { - transform.translate(newStart - scaledStart.x, rect.origin.y - scaledStart.y); - } - transform.scale(scale, scale); - - this.transform(transform); - } - }; - - Layout.prototype._initGroups = function _initGroups () { - var this$1 = this; - - var ref = this; - var options = ref.options; - var children = ref.children; - var lineSpacing = options.lineSpacing; - var wrap = options.wrap; - var spacing = options.spacing; - var sizeField = this._fieldMap.sizeField; - var group = this._newGroup(); - var groups = []; - var addGroup = function() { - groups.push(group); - groupsSize += group.lineSize + lineSpacing; - }; - var groupsSize = -lineSpacing; - - for (var idx = 0; idx < children.length; idx++) { - var element = children[idx]; - var bbox = children[idx].clippedBBox(); - if (element.visible() && bbox) { - if (wrap && group.size + bbox.size[sizeField] + spacing > this$1._rect.size[sizeField]) { - if (group.bboxes.length === 0) { - this$1._addToGroup(group, bbox, element); - addGroup(); - group = this$1._newGroup(); - } else { - addGroup(); - group = this$1._newGroup(); - this$1._addToGroup(group, bbox, element); - } - } else { - this$1._addToGroup(group, bbox, element); - } - } - } - - if (group.bboxes.length) { - addGroup(); - } - - return { - groups: groups, - groupsSize: groupsSize - }; - }; - - Layout.prototype._addToGroup = function _addToGroup (group, bbox, element) { - group.size += bbox.size[this._fieldMap.sizeField] + this.options.spacing; - group.lineSize = Math.max(bbox.size[this._fieldMap.groupsSizeField], group.lineSize); - group.bboxes.push(bbox); - group.elements.push(element); - }; - - Layout.prototype._newGroup = function _newGroup () { - return { - lineSize: 0, - size: -this.options.spacing, - bboxes: [], - elements: [] - }; - }; - - return Layout; -}(__WEBPACK_IMPORTED_MODULE_0__group__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (Layout); -//# sourceMappingURL=layout.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/multi-path.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry_elements_array__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/geometry-elements-array.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__element__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__path__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/path.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mixins_paintable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/paintable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mixins_measurable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/measurable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_elements_bounding_box__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/utils/elements-bounding-box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_elements_clippend_bounding_box__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/utils/elements-clippend-bounding-box.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - - - - -var MultiPath = (function (Element) { - function MultiPath(options) { - Element.call(this, options); - this.paths = new __WEBPACK_IMPORTED_MODULE_0__geometry_elements_array__["a" /* default */](); - this.paths.addObserver(this); - - if (!Object(__WEBPACK_IMPORTED_MODULE_7__util__["defined"])(this.options.stroke)) { - this.stroke("#000"); - } - } - - if ( Element ) MultiPath.__proto__ = Element; - MultiPath.prototype = Object.create( Element && Element.prototype ); - MultiPath.prototype.constructor = MultiPath; - - MultiPath.prototype.moveTo = function moveTo (x, y) { - var path = new __WEBPACK_IMPORTED_MODULE_2__path__["a" /* default */](); - path.moveTo(x, y); - - this.paths.push(path); - - return this; - }; - - MultiPath.prototype.lineTo = function lineTo (x, y) { - if (this.paths.length > 0) { - Object(__WEBPACK_IMPORTED_MODULE_7__util__["last"])(this.paths).lineTo(x, y); - } - - return this; - }; - - MultiPath.prototype.curveTo = function curveTo (controlOut, controlIn, point) { - if (this.paths.length > 0) { - Object(__WEBPACK_IMPORTED_MODULE_7__util__["last"])(this.paths).curveTo(controlOut, controlIn, point); - } - - return this; - }; - - MultiPath.prototype.arc = function arc (startAngle, endAngle, radiusX, radiusY, anticlockwise) { - if (this.paths.length > 0) { - Object(__WEBPACK_IMPORTED_MODULE_7__util__["last"])(this.paths).arc(startAngle, endAngle, radiusX, radiusY, anticlockwise); - } - - return this; - }; - - MultiPath.prototype.arcTo = function arcTo (end, rx, ry, largeArc, swipe, rotation) { - if (this.paths.length > 0) { - Object(__WEBPACK_IMPORTED_MODULE_7__util__["last"])(this.paths).arcTo(end, rx, ry, largeArc, swipe, rotation); - } - - return this; - }; - - MultiPath.prototype.close = function close () { - if (this.paths.length > 0) { - Object(__WEBPACK_IMPORTED_MODULE_7__util__["last"])(this.paths).close(); - } - - return this; - }; - - MultiPath.prototype._bbox = function _bbox (matrix) { - return Object(__WEBPACK_IMPORTED_MODULE_5__utils_elements_bounding_box__["a" /* default */])(this.paths, true, matrix); - }; - - MultiPath.prototype.rawBBox = function rawBBox () { - return Object(__WEBPACK_IMPORTED_MODULE_5__utils_elements_bounding_box__["a" /* default */])(this.paths, false); - }; - - MultiPath.prototype._containsPoint = function _containsPoint (point) { - var paths = this.paths; - - for (var idx = 0; idx < paths.length; idx++) { - if (paths[idx]._containsPoint(point)) { - return true; - } - } - return false; - }; - - MultiPath.prototype._isOnPath = function _isOnPath (point) { - var paths = this.paths; - var width = this.options.stroke.width; - - for (var idx = 0; idx < paths.length; idx++) { - if (paths[idx]._isOnPath(point, width)) { - return true; - } - } - return false; - }; - - MultiPath.prototype._clippedBBox = function _clippedBBox (transformation) { - return Object(__WEBPACK_IMPORTED_MODULE_6__utils_elements_clippend_bounding_box__["a" /* default */])(this.paths, this.currentTransform(transformation)); - }; - - return MultiPath; -}(__WEBPACK_IMPORTED_MODULE_1__element__["a" /* default */])); - -MultiPath.prototype.nodeType = "MultiPath"; - -__WEBPACK_IMPORTED_MODULE_3__mixins_paintable__["a" /* default */].extend(MultiPath.prototype); -__WEBPACK_IMPORTED_MODULE_4__mixins_measurable__["a" /* default */].extend(MultiPath.prototype); - -/* harmony default export */ __webpack_exports__["a"] = (MultiPath); -//# sourceMappingURL=multi-path.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/path.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry_elements_array__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/geometry-elements-array.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__element__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_paintable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/paintable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mixins_measurable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/measurable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__geometry_arc__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/arc.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__geometry_rect__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/rect.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__geometry_segment__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/segment.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__geometry_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__geometry_size__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/size.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__geometry_math_line_intersections_count__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/math/line-intersections-count.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - - - - - - - -var Path = (function (Element) { - function Path(options) { - Element.call(this, options); - this.segments = new __WEBPACK_IMPORTED_MODULE_0__geometry_elements_array__["a" /* default */](); - this.segments.addObserver(this); - - if (!Object(__WEBPACK_IMPORTED_MODULE_10__util__["defined"])(this.options.stroke)) { - this.stroke("#000"); - - if (!Object(__WEBPACK_IMPORTED_MODULE_10__util__["defined"])(this.options.stroke.lineJoin)) { - this.options.set("stroke.lineJoin", "miter"); - } - } - } - - if ( Element ) Path.__proto__ = Element; - Path.prototype = Object.create( Element && Element.prototype ); - Path.prototype.constructor = Path; - - Path.prototype.moveTo = function moveTo (x, y) { - this.suspend(); - this.segments.elements([]); - this.resume(); - - this.lineTo(x, y); - - return this; - }; - - Path.prototype.lineTo = function lineTo (x, y) { - var point = Object(__WEBPACK_IMPORTED_MODULE_10__util__["defined"])(y) ? new __WEBPACK_IMPORTED_MODULE_7__geometry_point__["a" /* default */](x, y) : x; - var segment = new __WEBPACK_IMPORTED_MODULE_6__geometry_segment__["a" /* default */](point); - - this.segments.push(segment); - - return this; - }; - - Path.prototype.curveTo = function curveTo (controlOut, controlIn, point) { - if (this.segments.length > 0) { - var lastSegment = Object(__WEBPACK_IMPORTED_MODULE_10__util__["last"])(this.segments); - var segment = new __WEBPACK_IMPORTED_MODULE_6__geometry_segment__["a" /* default */](point, controlIn); - this.suspend(); - lastSegment.controlOut(controlOut); - this.resume(); - - this.segments.push(segment); - } - - return this; - }; - - Path.prototype.arc = function arc (startAngle, endAngle, radiusX, radiusY, anticlockwise) { - if (this.segments.length > 0) { - var lastSegment = Object(__WEBPACK_IMPORTED_MODULE_10__util__["last"])(this.segments); - var anchor = lastSegment.anchor(); - var start = Object(__WEBPACK_IMPORTED_MODULE_10__util__["rad"])(startAngle); - var center = new __WEBPACK_IMPORTED_MODULE_7__geometry_point__["a" /* default */](anchor.x - radiusX * Math.cos(start), - anchor.y - radiusY * Math.sin(start)); - var arc = new __WEBPACK_IMPORTED_MODULE_4__geometry_arc__["a" /* default */](center, { - startAngle: startAngle, - endAngle: endAngle, - radiusX: radiusX, - radiusY: radiusY, - anticlockwise: anticlockwise - }); - - this._addArcSegments(arc); - } - - return this; - }; - - Path.prototype.arcTo = function arcTo (end, rx, ry, largeArc, swipe, rotation) { - if (this.segments.length > 0) { - var lastSegment = Object(__WEBPACK_IMPORTED_MODULE_10__util__["last"])(this.segments); - var anchor = lastSegment.anchor(); - var arc = __WEBPACK_IMPORTED_MODULE_4__geometry_arc__["a" /* default */].fromPoints(anchor, end, rx, ry, largeArc, swipe, rotation); - - this._addArcSegments(arc); - } - return this; - }; - - Path.prototype._addArcSegments = function _addArcSegments (arc) { - var this$1 = this; - - this.suspend(); - - var curvePoints = arc.curvePoints(); - - for (var i = 1; i < curvePoints.length; i += 3) { - this$1.curveTo(curvePoints[i], curvePoints[i + 1], curvePoints[i + 2]); - } - - this.resume(); - this.geometryChange(); - }; - - Path.prototype.close = function close () { - this.options.closed = true; - this.geometryChange(); - - return this; - }; - - Path.prototype.rawBBox = function rawBBox () { - return this._bbox(); - }; - - Path.prototype._containsPoint = function _containsPoint (point) { - var segments = this.segments; - var length = segments.length; - var intersectionsCount = 0; - var previous, current; - - for (var idx = 1; idx < length; idx++) { - previous = segments[idx - 1]; - current = segments[idx]; - intersectionsCount += previous._intersectionsTo(current, point); - } - - if (this.options.closed || !segments[0].anchor().equals(segments[length - 1].anchor())) { - intersectionsCount += Object(__WEBPACK_IMPORTED_MODULE_9__geometry_math_line_intersections_count__["a" /* default */])(segments[0].anchor(), segments[length - 1].anchor(), point); - } - - return intersectionsCount % 2 !== 0; - }; - - Path.prototype._isOnPath = function _isOnPath (point, width) { - var segments = this.segments; - var length = segments.length; - var pathWidth = width || this.options.stroke.width; - - if (length > 1) { - if (segments[0]._isOnPathTo(segments[1], point, pathWidth, "start")) { - return true; - } - - for (var idx = 2; idx <= length - 2; idx++) { - if (segments[idx - 1]._isOnPathTo(segments[idx], point, pathWidth)) { - return true; - } - } - - if (segments[length - 2]._isOnPathTo(segments[length - 1], point, pathWidth, "end")) { - return true; - } - } - return false; - }; - - Path.prototype._bbox = function _bbox (matrix) { - var segments = this.segments; - var length = segments.length; - var boundingBox; - - if (length === 1) { - var anchor = segments[0].anchor().transformCopy(matrix); - boundingBox = new __WEBPACK_IMPORTED_MODULE_5__geometry_rect__["a" /* default */](anchor, __WEBPACK_IMPORTED_MODULE_8__geometry_size__["a" /* default */].ZERO); - } else if (length > 0) { - for (var i = 1; i < length; i++) { - var segmentBox = segments[i - 1].bboxTo(segments[i], matrix); - if (boundingBox) { - boundingBox = __WEBPACK_IMPORTED_MODULE_5__geometry_rect__["a" /* default */].union(boundingBox, segmentBox); - } else { - boundingBox = segmentBox; - } - } - } - - return boundingBox; - }; - - Path.fromRect = function fromRect (rect, options) { - return new Path(options) - .moveTo(rect.topLeft()) - .lineTo(rect.topRight()) - .lineTo(rect.bottomRight()) - .lineTo(rect.bottomLeft()) - .close(); - }; - - Path.fromPoints = function fromPoints (points, options) { - if (points) { - var path = new Path(options); - - for (var i = 0; i < points.length; i++) { - var point = __WEBPACK_IMPORTED_MODULE_7__geometry_point__["a" /* default */].create(points[i]); - if (point) { - if (i === 0) { - path.moveTo(point); - } else { - path.lineTo(point); - } - } - } - - return path; - } - }; - - Path.fromArc = function fromArc (arc, options) { - var path = new Path(options); - var startAngle = arc.startAngle; - var start = arc.pointAt(startAngle); - path.moveTo(start.x, start.y); - path.arc(startAngle, arc.endAngle, arc.radiusX, arc.radiusY, arc.anticlockwise); - return path; - }; - - return Path; -}(__WEBPACK_IMPORTED_MODULE_1__element__["a" /* default */])); - -Path.prototype.nodeType = "Path"; - -__WEBPACK_IMPORTED_MODULE_2__mixins_paintable__["a" /* default */].extend(Path.prototype); -__WEBPACK_IMPORTED_MODULE_3__mixins_measurable__["a" /* default */].extend(Path.prototype); - -/* harmony default export */ __webpack_exports__["a"] = (Path); -//# sourceMappingURL=path.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/rect.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__accessors_define_geometry_accessors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/accessors/define-geometry-accessors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__element__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_paintable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/paintable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mixins_measurable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/measurable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__geometry_rect__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/rect.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - - -var Rect = (function (Element) { - function Rect(geometry, options) { - if ( geometry === void 0 ) geometry = new __WEBPACK_IMPORTED_MODULE_4__geometry_rect__["a" /* default */](); - if ( options === void 0 ) options = {}; - - Element.call(this, options); - this.geometry(geometry); - - if (!Object(__WEBPACK_IMPORTED_MODULE_5__util__["defined"])(this.options.stroke)) { - this.stroke("#000"); - } - } - - if ( Element ) Rect.__proto__ = Element; - Rect.prototype = Object.create( Element && Element.prototype ); - Rect.prototype.constructor = Rect; - - Rect.prototype._bbox = function _bbox (matrix) { - return this._geometry.bbox(matrix); - }; - - Rect.prototype.rawBBox = function rawBBox () { - return this._geometry.bbox(); - }; - - Rect.prototype._containsPoint = function _containsPoint (point) { - return this._geometry.containsPoint(point); - }; - - Rect.prototype._isOnPath = function _isOnPath (point) { - return this.geometry()._isOnPath(point, this.options.stroke.width / 2); - }; - - return Rect; -}(__WEBPACK_IMPORTED_MODULE_1__element__["a" /* default */])); - -Rect.prototype.nodeType = "Rect"; - -__WEBPACK_IMPORTED_MODULE_2__mixins_paintable__["a" /* default */].extend(Rect.prototype); -__WEBPACK_IMPORTED_MODULE_3__mixins_measurable__["a" /* default */].extend(Rect.prototype); -Object(__WEBPACK_IMPORTED_MODULE_0__accessors_define_geometry_accessors__["a" /* default */])(Rect.prototype, [ "geometry" ]); - -/* harmony default export */ __webpack_exports__["a"] = (Rect); - - -//# sourceMappingURL=rect.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/text.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__element__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/element.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry_point__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__geometry_rect__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/rect.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__geometry_to_matrix__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/to-matrix.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mixins_paintable__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/mixins/paintable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__accessors_define_point_accessors__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/accessors/define-point-accessors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - - - -var DEFAULT_FONT = "12px sans-serif"; -var DEFAULT_FILL = "#000"; - -var Text = (function (Element) { - function Text(content, position, options) { - if ( position === void 0 ) position = new __WEBPACK_IMPORTED_MODULE_1__geometry_point__["a" /* default */](); - if ( options === void 0 ) options = {}; - - Element.call(this, options); - - this.content(content); - this.position(position); - - if (!this.options.font) { - this.options.font = DEFAULT_FONT; - } - - if (!Object(__WEBPACK_IMPORTED_MODULE_6__util__["defined"])(this.options.fill)) { - this.fill(DEFAULT_FILL); - } - } - - if ( Element ) Text.__proto__ = Element; - Text.prototype = Object.create( Element && Element.prototype ); - Text.prototype.constructor = Text; - - Text.prototype.content = function content (value) { - if (Object(__WEBPACK_IMPORTED_MODULE_6__util__["defined"])(value)) { - this.options.set("content", value); - return this; - } - - return this.options.get("content"); - }; - - Text.prototype.measure = function measure () { - var metrics = Object(__WEBPACK_IMPORTED_MODULE_6__util__["measureText"])(this.content(), { - font: this.options.get("font") - }); - - return metrics; - }; - - Text.prototype.rect = function rect () { - var size = this.measure(); - var pos = this.position().clone(); - return new __WEBPACK_IMPORTED_MODULE_2__geometry_rect__["a" /* default */](pos, [ size.width, size.height ]); - }; - - Text.prototype.bbox = function bbox (transformation) { - var combinedMatrix = Object(__WEBPACK_IMPORTED_MODULE_3__geometry_to_matrix__["a" /* default */])(this.currentTransform(transformation)); - return this.rect().bbox(combinedMatrix); - }; - - Text.prototype.rawBBox = function rawBBox () { - return this.rect().bbox(); - }; - - Text.prototype._containsPoint = function _containsPoint (point) { - return this.rect().containsPoint(point); - }; - - return Text; -}(__WEBPACK_IMPORTED_MODULE_0__element__["a" /* default */])); - -Text.prototype.nodeType = "Text"; - -__WEBPACK_IMPORTED_MODULE_4__mixins_paintable__["a" /* default */].extend(Text.prototype); - -Object(__WEBPACK_IMPORTED_MODULE_5__accessors_define_point_accessors__["a" /* default */])(Text.prototype, [ "position" ]); - -/* harmony default export */ __webpack_exports__["a"] = (Text); -//# sourceMappingURL=text.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/utils/elements-bounding-box.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = elementsBoundingBox; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry_rect__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/rect.js"); - - -function elementsBoundingBox(elements, applyTransform, transformation) { - var boundingBox; - - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - if (element.visible()) { - var elementBoundingBox = applyTransform ? element.bbox(transformation) : element.rawBBox(); - if (elementBoundingBox) { - if (boundingBox) { - boundingBox = __WEBPACK_IMPORTED_MODULE_0__geometry_rect__["a" /* default */].union(boundingBox, elementBoundingBox); - } else { - boundingBox = elementBoundingBox; - } - } - } - } - - return boundingBox; -} - - -//# sourceMappingURL=elements-bounding-box.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/shapes/utils/elements-clippend-bounding-box.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = elementsClippedBoundingBox; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry_rect__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/rect.js"); - - -function elementsClippedBoundingBox(elements, transformation) { - var boundingBox; - - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - if (element.visible()) { - var elementBoundingBox = element.clippedBBox(transformation); - if (elementBoundingBox) { - if (boundingBox) { - boundingBox = __WEBPACK_IMPORTED_MODULE_0__geometry_rect__["a" /* default */].union(boundingBox, elementBoundingBox); - } else { - boundingBox = elementBoundingBox; - } - } - } - } - - return boundingBox; -} -//# sourceMappingURL=elements-clippend-bounding-box.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__svg_surface__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/surface.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Surface", function() { return __WEBPACK_IMPORTED_MODULE_0__svg_surface__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__svg_root_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/root-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "RootNode", function() { return __WEBPACK_IMPORTED_MODULE_1__svg_root_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__svg_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Node", function() { return __WEBPACK_IMPORTED_MODULE_2__svg_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__svg_group_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/group-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "GroupNode", function() { return __WEBPACK_IMPORTED_MODULE_3__svg_group_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__svg_arc_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/arc-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ArcNode", function() { return __WEBPACK_IMPORTED_MODULE_4__svg_arc_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__svg_circle_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/circle-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "CircleNode", function() { return __WEBPACK_IMPORTED_MODULE_5__svg_circle_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__svg_rect_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/rect-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "RectNode", function() { return __WEBPACK_IMPORTED_MODULE_6__svg_rect_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__svg_image_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/image-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ImageNode", function() { return __WEBPACK_IMPORTED_MODULE_7__svg_image_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__svg_text_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/text-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TextNode", function() { return __WEBPACK_IMPORTED_MODULE_8__svg_text_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__svg_path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/path-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "PathNode", function() { return __WEBPACK_IMPORTED_MODULE_9__svg_path_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__svg_multi_path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/multi-path-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MultiPathNode", function() { return __WEBPACK_IMPORTED_MODULE_10__svg_multi_path_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__svg_definition_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/definition-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "DefinitionNode", function() { return __WEBPACK_IMPORTED_MODULE_11__svg_definition_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__svg_clip_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/clip-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ClipNode", function() { return __WEBPACK_IMPORTED_MODULE_12__svg_clip_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__svg_gradient_stop_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/gradient-stop-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "GradientStopNode", function() { return __WEBPACK_IMPORTED_MODULE_13__svg_gradient_stop_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__svg_linear_gradient_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/linear-gradient-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "LinearGradientNode", function() { return __WEBPACK_IMPORTED_MODULE_14__svg_linear_gradient_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__svg_radial_gradient_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/radial-gradient-node.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "RadialGradientNode", function() { return __WEBPACK_IMPORTED_MODULE_15__svg_radial_gradient_node__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__svg_export_group__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/export-group.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "exportGroup", function() { return __WEBPACK_IMPORTED_MODULE_16__svg_export_group__["a"]; }); - - - - - - - - - - - - - - - - - - - - -//# sourceMappingURL=svg.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/arc-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/path-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node-map.js"); - - - -var ArcNode = (function (PathNode) { - function ArcNode () { - PathNode.apply(this, arguments); - } - - if ( PathNode ) ArcNode.__proto__ = PathNode; - ArcNode.prototype = Object.create( PathNode && PathNode.prototype ); - ArcNode.prototype.constructor = ArcNode; - - ArcNode.prototype.renderData = function renderData () { - return this.printPath(this.srcElement.toPath()); - }; - - return ArcNode; -}(__WEBPACK_IMPORTED_MODULE_0__path_node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_1__node_map__["a" /* default */].Arc = ArcNode; - -/* harmony default export */ __webpack_exports__["a"] = (ArcNode); -//# sourceMappingURL=arc-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/circle-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/path-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node-map.js"); - - - -var CircleNode = (function (PathNode) { - function CircleNode () { - PathNode.apply(this, arguments); - } - - if ( PathNode ) CircleNode.__proto__ = PathNode; - CircleNode.prototype = Object.create( PathNode && PathNode.prototype ); - CircleNode.prototype.constructor = CircleNode; - - CircleNode.prototype.geometryChange = function geometryChange () { - var center = this.center(); - this.attr("cx", center.x); - this.attr("cy", center.y); - this.attr("r", this.radius()); - this.invalidate(); - }; - - CircleNode.prototype.center = function center () { - return this.srcElement.geometry().center; - }; - - CircleNode.prototype.radius = function radius () { - return this.srcElement.geometry().radius; - }; - - CircleNode.prototype.template = function template () { - return ""; - }; - - return CircleNode; -}(__WEBPACK_IMPORTED_MODULE_0__path_node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_1__node_map__["a" /* default */].Circle = CircleNode; - -/* harmony default export */ __webpack_exports__["a"] = (CircleNode); -//# sourceMappingURL=circle-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/clip-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node.js"); - - -var ClipNode = (function (Node) { - function ClipNode(srcElement) { - Node.call(this); - - this.srcElement = srcElement; - this.id = srcElement.id; - - this.load([ srcElement ]); - } - - if ( Node ) ClipNode.__proto__ = Node; - ClipNode.prototype = Object.create( Node && Node.prototype ); - ClipNode.prototype.constructor = ClipNode; - - ClipNode.prototype.template = function template () { - return ("" + (this.renderChildren()) + ""); - }; - - return ClipNode; -}(__WEBPACK_IMPORTED_MODULE_0__node__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (ClipNode); -//# sourceMappingURL=clip-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/constants.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SVG_NS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NONE; }); -var SVG_NS = "http://www.w3.org/2000/svg"; -var NONE = "none"; - - -//# sourceMappingURL=constants.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/definition-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gradients_linear_gradient__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/gradients/linear-gradient.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__gradients_radial_gradient__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/gradients/radial-gradient.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__linear_gradient_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/linear-gradient-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__radial_gradient_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/radial-gradient-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__clip_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/clip-node.js"); - - - - - - - -var DefinitionNode = (function (Node) { - function DefinitionNode() { - Node.call(this); - this.definitionMap = {}; - } - - if ( Node ) DefinitionNode.__proto__ = Node; - DefinitionNode.prototype = Object.create( Node && Node.prototype ); - DefinitionNode.prototype.constructor = DefinitionNode; - - DefinitionNode.prototype.attachTo = function attachTo (domElement) { - this.element = domElement; - }; - - DefinitionNode.prototype.template = function template () { - return ("" + (this.renderChildren()) + ""); - }; - - DefinitionNode.prototype.definitionChange = function definitionChange (e) { - var definitions = e.definitions; - var action = e.action; - - if (action === "add") { - this.addDefinitions(definitions); - } else if (action === "remove") { - this.removeDefinitions(definitions); - } - }; - - DefinitionNode.prototype.createDefinition = function createDefinition (type, item) { - var nodeType; - if (type === "clip") { - nodeType = __WEBPACK_IMPORTED_MODULE_5__clip_node__["a" /* default */]; - } else if (type === "fill") { - if (item instanceof __WEBPACK_IMPORTED_MODULE_0__gradients_linear_gradient__["a" /* default */]) { - nodeType = __WEBPACK_IMPORTED_MODULE_2__linear_gradient_node__["a" /* default */]; - } else if (item instanceof __WEBPACK_IMPORTED_MODULE_1__gradients_radial_gradient__["a" /* default */]) { - nodeType = __WEBPACK_IMPORTED_MODULE_3__radial_gradient_node__["a" /* default */]; - } - } - return new nodeType(item); - }; - - DefinitionNode.prototype.addDefinitions = function addDefinitions (definitions) { - var this$1 = this; - - for (var field in definitions) { - this$1.addDefinition(field, definitions[field]); - } - }; - - DefinitionNode.prototype.addDefinition = function addDefinition (type, srcElement) { - var ref = this; - var element = ref.element; - var definitionMap = ref.definitionMap; - var id = srcElement.id; - var mapItem = definitionMap[id]; - if (!mapItem) { - var node = this.createDefinition(type, srcElement); - definitionMap[id] = { - element: node, - count: 1 - }; - this.append(node); - if (element) { - node.attachTo(this.element); - } - } else { - mapItem.count++; - } - }; - - DefinitionNode.prototype.removeDefinitions = function removeDefinitions (definitions) { - var this$1 = this; - - for (var field in definitions) { - this$1.removeDefinition(definitions[field]); - } - }; - - DefinitionNode.prototype.removeDefinition = function removeDefinition (srcElement) { - var definitionMap = this.definitionMap; - var id = srcElement.id; - var mapItem = definitionMap[id]; - - if (mapItem) { - mapItem.count--; - if (mapItem.count === 0) { - this.remove(this.childNodes.indexOf(mapItem.element), 1); - delete definitionMap[id]; - } - } - }; - - return DefinitionNode; -}(__WEBPACK_IMPORTED_MODULE_4__node__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (DefinitionNode); -//# sourceMappingURL=definition-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/export-group.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = exportGroup; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/root-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shapes__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__geometry__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/constants.js"); - - - - - -function exportGroup(group) { - var root = new __WEBPACK_IMPORTED_MODULE_0__root_node__["a" /* default */]({ - skipBaseHref: true - }); - var bbox = group.clippedBBox(); - var rootGroup = group; - - if (bbox) { - var origin = bbox.getOrigin(); - var exportRoot = new __WEBPACK_IMPORTED_MODULE_1__shapes__["d" /* Group */](); - exportRoot.transform(Object(__WEBPACK_IMPORTED_MODULE_2__geometry__["transform"])().translate(-origin.x, -origin.y)); - exportRoot.children.push(group); - rootGroup = exportRoot; - } - - root.load([ rootGroup ]); - - var svg = "" + (root.render()) + ""; - - root.destroy(); - - return svg; -} -//# sourceMappingURL=export-group.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/export-svg.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = exportSVG; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__export_group__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/export-group.js"); - - - -function exportSVG(group, options) { - var svg = Object(__WEBPACK_IMPORTED_MODULE_1__export_group__["a" /* default */])(group); - - if (!options || !options.raw) { - svg = "data:image/svg+xml;base64," + Object(__WEBPACK_IMPORTED_MODULE_0__util__["encodeBase64"])(svg); - } - - return Object(__WEBPACK_IMPORTED_MODULE_0__util__["createPromise"])().resolve(svg); -} - -//# sourceMappingURL=export-svg.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/gradient-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gradient_stop_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/gradient-stop-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_base_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/base-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_render_all_attributes__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/utils/render-all-attributes.js"); - - - - - -var GradientNode = (function (Node) { - function GradientNode(srcElement) { - Node.call(this, srcElement); - - this.id = srcElement.id; - - this.loadStops(); - } - - if ( Node ) GradientNode.__proto__ = Node; - GradientNode.prototype = Object.create( Node && Node.prototype ); - GradientNode.prototype.constructor = GradientNode; - - GradientNode.prototype.loadStops = function loadStops () { - var this$1 = this; - - var stops = this.srcElement.stops; - var element = this.element; - - for (var idx = 0; idx < stops.length; idx++) { - var stopNode = new __WEBPACK_IMPORTED_MODULE_0__gradient_stop_node__["a" /* default */](stops[idx]); - this$1.append(stopNode); - if (element) { - stopNode.attachTo(element); - } - } - }; - - GradientNode.prototype.optionsChange = function optionsChange (e) { - if (e.field === "gradient.stops") { - __WEBPACK_IMPORTED_MODULE_1__core_base_node__["a" /* default */].prototype.clear.call(this); - this.loadStops(); - } else if (e.field === "gradient") { - this.allAttr(this.mapCoordinates()); - } - }; - - GradientNode.prototype.renderCoordinates = function renderCoordinates () { - return Object(__WEBPACK_IMPORTED_MODULE_3__utils_render_all_attributes__["a" /* default */])(this.mapCoordinates()); - }; - - GradientNode.prototype.mapSpace = function mapSpace () { - return [ "gradientUnits", this.srcElement.userSpace() ? "userSpaceOnUse" : "objectBoundingBox" ]; - }; - - return GradientNode; -}(__WEBPACK_IMPORTED_MODULE_2__node__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (GradientNode); -//# sourceMappingURL=gradient-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/gradient-stop-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_render_attribute__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/utils/render-attribute.js"); - - - -var GradientStopNode = (function (Node) { - function GradientStopNode () { - Node.apply(this, arguments); - } - - if ( Node ) GradientStopNode.__proto__ = Node; - GradientStopNode.prototype = Object.create( Node && Node.prototype ); - GradientStopNode.prototype.constructor = GradientStopNode; - - GradientStopNode.prototype.template = function template () { - return (""); - }; - - GradientStopNode.prototype.renderOffset = function renderOffset () { - return Object(__WEBPACK_IMPORTED_MODULE_1__utils_render_attribute__["a" /* default */])("offset", this.srcElement.offset()); - }; - - GradientStopNode.prototype.mapStyle = function mapStyle () { - var srcElement = this.srcElement; - return [ - [ "stop-color", srcElement.color() ], - [ "stop-opacity", srcElement.opacity() ] - ]; - }; - - GradientStopNode.prototype.optionsChange = function optionsChange (e) { - if (e.field === "offset") { - this.attr(e.field, e.value); - } else if (e.field === "color" || e.field === "opacity") { - this.css("stop-" + e.field, e.value); - } - }; - - return GradientStopNode; -}(__WEBPACK_IMPORTED_MODULE_0__node__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (GradientStopNode); -//# sourceMappingURL=gradient-stop-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/group-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node-map.js"); - - - -var GroupNode = (function (Node) { - function GroupNode () { - Node.apply(this, arguments); - } - - if ( Node ) GroupNode.__proto__ = Node; - GroupNode.prototype = Object.create( Node && Node.prototype ); - GroupNode.prototype.constructor = GroupNode; - - GroupNode.prototype.template = function template () { - return ("" + (this.renderChildren()) + ""); - }; - - GroupNode.prototype.optionsChange = function optionsChange (e) { - if (e.field === "transform") { - this.transformChange(e.value); - } - - Node.prototype.optionsChange.call(this, e); - }; - - return GroupNode; -}(__WEBPACK_IMPORTED_MODULE_0__node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_1__node_map__["a" /* default */].Group = GroupNode; - -/* harmony default export */ __webpack_exports__["a"] = (GroupNode); -//# sourceMappingURL=group-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/image-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/path-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node-map.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_render_all_attributes__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/utils/render-all-attributes.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); - - - - - -var ImageNode = (function (PathNode) { - function ImageNode () { - PathNode.apply(this, arguments); - } - - if ( PathNode ) ImageNode.__proto__ = PathNode; - ImageNode.prototype = Object.create( PathNode && PathNode.prototype ); - ImageNode.prototype.constructor = ImageNode; - - ImageNode.prototype.geometryChange = function geometryChange () { - this.allAttr(this.mapPosition()); - this.invalidate(); - }; - - ImageNode.prototype.optionsChange = function optionsChange (e) { - if (e.field === "src") { - this.allAttr(this.mapSource()); - } - - PathNode.prototype.optionsChange.call(this, e); - }; - - ImageNode.prototype.mapPosition = function mapPosition () { - var rect = this.srcElement.rect(); - var tl = rect.topLeft(); - - return [ - [ "x", tl.x ], - [ "y", tl.y ], - [ "width", rect.width() + "px" ], - [ "height", rect.height() + "px" ] - ]; - }; - - ImageNode.prototype.renderPosition = function renderPosition () { - return Object(__WEBPACK_IMPORTED_MODULE_2__utils_render_all_attributes__["a" /* default */])(this.mapPosition()); - }; - - ImageNode.prototype.mapSource = function mapSource (encode) { - var src = this.srcElement.src(); - - if (encode) { - src = Object(__WEBPACK_IMPORTED_MODULE_3__common__["e" /* htmlEncode */])(src); - } - - return [ [ "xlink:href", src ] ]; - }; - - ImageNode.prototype.renderSource = function renderSource () { - return Object(__WEBPACK_IMPORTED_MODULE_2__utils_render_all_attributes__["a" /* default */])(this.mapSource(true)); - }; - - ImageNode.prototype.template = function template () { - return "" + - ""; - }; - - return ImageNode; -}(__WEBPACK_IMPORTED_MODULE_0__path_node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_1__node_map__["a" /* default */].Image = ImageNode; - -/* harmony default export */ __webpack_exports__["a"] = (ImageNode); -//# sourceMappingURL=image-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/linear-gradient-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gradient_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/gradient-node.js"); - - -var LinearGradientNode = (function (GradientNode) { - function LinearGradientNode () { - GradientNode.apply(this, arguments); - } - - if ( GradientNode ) LinearGradientNode.__proto__ = GradientNode; - LinearGradientNode.prototype = Object.create( GradientNode && GradientNode.prototype ); - LinearGradientNode.prototype.constructor = LinearGradientNode; - - LinearGradientNode.prototype.template = function template () { - return ("" + (this.renderChildren()) + ""); - }; - - LinearGradientNode.prototype.mapCoordinates = function mapCoordinates () { - var srcElement = this.srcElement; - var start = srcElement.start(); - var end = srcElement.end(); - var attrs = [ - [ "x1", start.x ], - [ "y1", start.y ], - [ "x2", end.x ], - [ "y2", end.y ], - this.mapSpace() - ]; - - return attrs; - }; - - return LinearGradientNode; -}(__WEBPACK_IMPORTED_MODULE_0__gradient_node__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (LinearGradientNode); -//# sourceMappingURL=linear-gradient-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/multi-path-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/path-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node-map.js"); - - - -var MultiPathNode = (function (PathNode) { - function MultiPathNode () { - PathNode.apply(this, arguments); - } - - if ( PathNode ) MultiPathNode.__proto__ = PathNode; - MultiPathNode.prototype = Object.create( PathNode && PathNode.prototype ); - MultiPathNode.prototype.constructor = MultiPathNode; - - MultiPathNode.prototype.renderData = function renderData () { - var this$1 = this; - - var paths = this.srcElement.paths; - - if (paths.length > 0) { - var result = []; - - for (var i = 0; i < paths.length; i++) { - result.push(this$1.printPath(paths[i])); - } - - return result.join(" "); - } - }; - - return MultiPathNode; -}(__WEBPACK_IMPORTED_MODULE_0__path_node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_1__node_map__["a" /* default */].MultiPath = MultiPathNode; - -/* harmony default export */ __webpack_exports__["a"] = (MultiPathNode); -//# sourceMappingURL=multi-path-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/node-map.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var NODE_MAP = {}; - -/* harmony default export */ __webpack_exports__["a"] = (NODE_MAP); -//# sourceMappingURL=node-map.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_base_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/base-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_render_all_attributes__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/utils/render-all-attributes.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_render_attribute__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/utils/render-attribute.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_render_style__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/utils/render-style.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node-map.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_render_svg__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/utils/render-svg.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - - - - - -var TRANSFORM = "transform"; -var DefinitionMap = { - clip: "clip-path", - fill: "fill" -}; - -function isDefinition(type, value) { - return type === "clip" || (type === "fill" && (!value || value.nodeType === "Gradient")); -} - -function baseUrl() { - var base = document.getElementsByTagName("base")[0]; - var href = document.location.href; - var hashIndex = href.indexOf("#"); - var url = ""; - - if (base && !__WEBPACK_IMPORTED_MODULE_7__common__["i" /* support */].browser.msie) { - if (hashIndex !== -1) { - href = href.substring(0, hashIndex); - } - - url = href; - } - - return url; -} - -function refUrl(id, skipBaseHref) { - var base = skipBaseHref ? '' : baseUrl(); - return ("url(" + base + "#" + id + ")"); -} - -var Node = (function (BaseNode) { - function Node(srcElement, options) { - BaseNode.call(this, srcElement); - this.definitions = {}; - - this.options = options; - } - - if ( BaseNode ) Node.__proto__ = BaseNode; - Node.prototype = Object.create( BaseNode && BaseNode.prototype ); - Node.prototype.constructor = Node; - - Node.prototype.destroy = function destroy () { - if (this.element) { - this.element._kendoNode = null; - this.element = null; - } - - this.clearDefinitions(); - BaseNode.prototype.destroy.call(this); - }; - - Node.prototype.load = function load (elements, pos) { - var this$1 = this; - - for (var i = 0; i < elements.length; i++) { - var srcElement = elements[i]; - var children = srcElement.children; - - var childNode = new __WEBPACK_IMPORTED_MODULE_4__node_map__["a" /* default */][srcElement.nodeType](srcElement, this$1.options); - - if (Object(__WEBPACK_IMPORTED_MODULE_8__util__["defined"])(pos)) { - this$1.insertAt(childNode, pos); - } else { - this$1.append(childNode); - } - - childNode.createDefinitions(); - - if (children && children.length > 0) { - childNode.load(children); - } - - var element = this$1.element; - if (element) { - childNode.attachTo(element, pos); - } - } - }; - - Node.prototype.root = function root () { - var root = this; - - while (root.parent) { - root = root.parent; - } - - return root; - }; - - Node.prototype.attachTo = function attachTo (domElement, pos) { - var container = document.createElement("div"); - Object(__WEBPACK_IMPORTED_MODULE_5__utils_render_svg__["a" /* default */])(container, - "" + - this.render() + - "" - ); - - var element = container.firstChild.firstChild; - if (element) { - if (Object(__WEBPACK_IMPORTED_MODULE_8__util__["defined"])(pos)) { - domElement.insertBefore(element, domElement.childNodes[pos] || null); - } else { - domElement.appendChild(element); - } - this.setElement(element); - } - }; - - Node.prototype.setElement = function setElement (element) { - if (this.element) { - this.element._kendoNode = null; - } - - this.element = element; - this.element._kendoNode = this; - - var nodes = this.childNodes; - for (var i = 0; i < nodes.length; i++) { - var childElement = element.childNodes[i]; - nodes[i].setElement(childElement); - } - }; - - Node.prototype.clear = function clear () { - this.clearDefinitions(); - - if (this.element) { - this.element.innerHTML = ""; - } - - var children = this.childNodes; - for (var i = 0; i < children.length; i++) { - children[i].destroy(); - } - - this.childNodes = []; - }; - - Node.prototype.removeSelf = function removeSelf () { - if (this.element) { - var parentNode = this.element.parentNode; - if (parentNode) { - parentNode.removeChild(this.element); - } - this.element = null; - } - - BaseNode.prototype.removeSelf.call(this); - }; - - Node.prototype.template = function template () { - return this.renderChildren(); - }; - - Node.prototype.render = function render () { - return this.template(); - }; - - Node.prototype.renderChildren = function renderChildren () { - var nodes = this.childNodes; - var output = ""; - - for (var i = 0; i < nodes.length; i++) { - output += nodes[i].render(); - } - - return output; - }; - - Node.prototype.optionsChange = function optionsChange (e) { - var field = e.field; - var value = e.value; - - if (field === "visible") { - this.css("display", value ? "" : __WEBPACK_IMPORTED_MODULE_6__constants__["a" /* NONE */]); - } else if (DefinitionMap[field] && isDefinition(field, value)) { - this.updateDefinition(field, value); - } else if (field === "opacity") { - this.attr("opacity", value); - } else if (field === "cursor") { - this.css("cursor", value); - } else if (field === "id") { - if (value) { - this.attr("id", value); - } else { - this.removeAttr("id"); - } - } - - BaseNode.prototype.optionsChange.call(this, e); - }; - - Node.prototype.attr = function attr (name, value) { - if (this.element) { - this.element.setAttribute(name, value); - } - }; - - Node.prototype.allAttr = function allAttr (attrs) { - var this$1 = this; - - for (var i = 0; i < attrs.length; i++) { - this$1.attr(attrs[i][0], attrs[i][1]); - } - }; - - Node.prototype.css = function css (name, value) { - if (this.element) { - this.element.style[name] = value; - } - }; - - Node.prototype.allCss = function allCss (styles) { - var this$1 = this; - - for (var i = 0; i < styles.length; i++) { - this$1.css(styles[i][0], styles[i][1]); - } - }; - - Node.prototype.removeAttr = function removeAttr (name) { - if (this.element) { - this.element.removeAttribute(name); - } - }; - - Node.prototype.mapTransform = function mapTransform (transform) { - var attrs = []; - if (transform) { - attrs.push([ - TRANSFORM, - "matrix(" + transform.matrix().toString(6) + ")" - ]); - } - - return attrs; - }; - - Node.prototype.renderTransform = function renderTransform () { - return Object(__WEBPACK_IMPORTED_MODULE_1__utils_render_all_attributes__["a" /* default */])( - this.mapTransform(this.srcElement.transform()) - ); - }; - - Node.prototype.transformChange = function transformChange (value) { - if (value) { - this.allAttr(this.mapTransform(value)); - } else { - this.removeAttr(TRANSFORM); - } - }; - - Node.prototype.mapStyle = function mapStyle () { - var options = this.srcElement.options; - var style = [ [ "cursor", options.cursor ] ]; - - if (options.visible === false) { - style.push([ "display", __WEBPACK_IMPORTED_MODULE_6__constants__["a" /* NONE */] ]); - } - - return style; - }; - - Node.prototype.renderStyle = function renderStyle$1 () { - return Object(__WEBPACK_IMPORTED_MODULE_2__utils_render_attribute__["a" /* default */])("style", Object(__WEBPACK_IMPORTED_MODULE_3__utils_render_style__["a" /* default */])(this.mapStyle(true))); - }; - - Node.prototype.renderOpacity = function renderOpacity () { - return Object(__WEBPACK_IMPORTED_MODULE_2__utils_render_attribute__["a" /* default */])("opacity", this.srcElement.options.opacity); - }; - - Node.prototype.renderId = function renderId () { - return Object(__WEBPACK_IMPORTED_MODULE_2__utils_render_attribute__["a" /* default */])("id", this.srcElement.options.id); - }; - - Node.prototype.createDefinitions = function createDefinitions () { - var srcElement = this.srcElement; - var definitions = this.definitions; - if (srcElement) { - var options = srcElement.options; - var hasDefinitions; - - for (var field in DefinitionMap) { - var definition = options.get(field); - if (definition && isDefinition(field, definition)) { - definitions[field] = definition; - hasDefinitions = true; - } - } - if (hasDefinitions) { - this.definitionChange({ - action: "add", - definitions: definitions - }); - } - } - }; - - Node.prototype.definitionChange = function definitionChange (e) { - if (this.parent) { - this.parent.definitionChange(e); - } - }; - - Node.prototype.updateDefinition = function updateDefinition (type, value) { - var definitions = this.definitions; - var current = definitions[type]; - var attr = DefinitionMap[type]; - var definition = {}; - if (current) { - definition[type] = current; - this.definitionChange({ - action: "remove", - definitions: definition - }); - delete definitions[type]; - } - - if (!value) { - if (current) { - this.removeAttr(attr); - } - } else { - definition[type] = value; - this.definitionChange({ - action: "add", - definitions: definition - }); - definitions[type] = value; - this.attr(attr, this.refUrl(value.id)); - } - }; - - Node.prototype.clearDefinitions = function clearDefinitions () { - var definitions = this.definitions; - - this.definitionChange({ - action: "remove", - definitions: definitions - }); - this.definitions = {}; - }; - - Node.prototype.renderDefinitions = function renderDefinitions () { - return Object(__WEBPACK_IMPORTED_MODULE_1__utils_render_all_attributes__["a" /* default */])(this.mapDefinitions()); - }; - - Node.prototype.mapDefinitions = function mapDefinitions () { - var this$1 = this; - - var definitions = this.definitions; - var attrs = []; - - for (var field in definitions) { - attrs.push([ DefinitionMap[field], this$1.refUrl(definitions[field].id) ]); - } - - return attrs; - }; - - Node.prototype.refUrl = function refUrl$1 (id) { - var skipBaseHref = (this.options || {}).skipBaseHref; - return refUrl(id, skipBaseHref); - }; - - return Node; -}(__WEBPACK_IMPORTED_MODULE_0__core_base_node__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (Node); -//# sourceMappingURL=node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/path-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__core_constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_render_all_attributes__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/utils/render-all-attributes.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_render_attribute__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/utils/render-attribute.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node-map.js"); - - - - - - - - -var ATTRIBUTE_MAP = { - "fill.opacity": "fill-opacity", - "stroke.color": "stroke", - "stroke.width": "stroke-width", - "stroke.opacity": "stroke-opacity" -}; -var SPACE = " "; - -var PathNode = (function (Node) { - function PathNode () { - Node.apply(this, arguments); - } - - if ( Node ) PathNode.__proto__ = Node; - PathNode.prototype = Object.create( Node && Node.prototype ); - PathNode.prototype.constructor = PathNode; - - PathNode.prototype.geometryChange = function geometryChange () { - this.attr("d", this.renderData()); - this.invalidate(); - }; - - PathNode.prototype.optionsChange = function optionsChange (e) { - switch (e.field) { - case "fill": - if (e.value) { - this.allAttr(this.mapFill(e.value)); - } else { - this.removeAttr("fill"); - } - break; - - case "fill.color": - this.allAttr(this.mapFill({ color: e.value })); - break; - - case "stroke": - if (e.value) { - this.allAttr(this.mapStroke(e.value)); - } else { - this.removeAttr("stroke"); - } - break; - - case "transform": - this.transformChange(e.value); - break; - - default: - var name = ATTRIBUTE_MAP[e.field]; - if (name) { - this.attr(name, e.value); - } - break; - } - - Node.prototype.optionsChange.call(this, e); - }; - - PathNode.prototype.content = function content () { - if (this.element) { - this.element.textContent = this.srcElement.content(); - } - }; - - PathNode.prototype.renderData = function renderData () { - return this.printPath(this.srcElement); - }; - - PathNode.prototype.printPath = function printPath (path) { - var this$1 = this; - - var segments = path.segments; - var length = segments.length; - if (length > 0) { - var parts = []; - var output, currentType; - - for (var i = 1; i < length; i++) { - var segmentType = this$1.segmentType(segments[i - 1], segments[i]); - if (segmentType !== currentType) { - currentType = segmentType; - parts.push(segmentType); - } - - if (segmentType === "L") { - parts.push(this$1.printPoints(segments[i].anchor())); - } else { - parts.push(this$1.printPoints(segments[i - 1].controlOut(), segments[i].controlIn(), segments[i].anchor())); - } - } - - output = "M" + this.printPoints(segments[0].anchor()) + SPACE + parts.join(SPACE); - if (path.options.closed) { - output += "Z"; - } - - return output; - } - }; - - PathNode.prototype.printPoints = function printPoints () { - var points = arguments; - var length = points.length; - var result = []; - - for (var i = 0; i < length; i++) { - result.push(points[i].toString(3)); - } - - return result.join(" "); - }; - - PathNode.prototype.segmentType = function segmentType (segmentStart, segmentEnd) { - return segmentStart.controlOut() && segmentEnd.controlIn() ? "C" : "L"; - }; - - PathNode.prototype.mapStroke = function mapStroke (stroke) { - var attrs = []; - - if (stroke && !Object(__WEBPACK_IMPORTED_MODULE_1__util__["isTransparent"])(stroke.color)) { - attrs.push([ "stroke", stroke.color ]); - attrs.push([ "stroke-width", stroke.width ]); - attrs.push([ "stroke-linecap", this.renderLinecap(stroke) ]); - attrs.push([ "stroke-linejoin", stroke.lineJoin ]); - - if (Object(__WEBPACK_IMPORTED_MODULE_1__util__["defined"])(stroke.opacity)) { - attrs.push([ "stroke-opacity", stroke.opacity ]); - } - - if (Object(__WEBPACK_IMPORTED_MODULE_1__util__["defined"])(stroke.dashType)) { - attrs.push([ "stroke-dasharray", this.renderDashType(stroke) ]); - } - } else { - attrs.push([ "stroke", __WEBPACK_IMPORTED_MODULE_3__constants__["a" /* NONE */] ]); - } - - return attrs; - }; - - PathNode.prototype.renderStroke = function renderStroke () { - return Object(__WEBPACK_IMPORTED_MODULE_4__utils_render_all_attributes__["a" /* default */])( - this.mapStroke(this.srcElement.options.stroke) - ); - }; - - PathNode.prototype.renderDashType = function renderDashType (stroke) { - var dashType = stroke.dashType; - var width = stroke.width; if ( width === void 0 ) width = 1; - - if (dashType && dashType !== __WEBPACK_IMPORTED_MODULE_2__core_constants__["c" /* SOLID */]) { - var dashArray = __WEBPACK_IMPORTED_MODULE_2__core_constants__["b" /* DASH_ARRAYS */][dashType.toLowerCase()]; - var result = []; - - for (var i = 0; i < dashArray.length; i++) { - result.push(dashArray[i] * width); - } - - return result.join(" "); - } - }; - - PathNode.prototype.renderLinecap = function renderLinecap (stroke) { - var dashType = stroke.dashType; - var lineCap = stroke.lineCap; - - return (dashType && dashType !== "solid") ? __WEBPACK_IMPORTED_MODULE_2__core_constants__["a" /* BUTT */] : lineCap; - }; - - PathNode.prototype.mapFill = function mapFill (fill) { - var attrs = []; - if (!(fill && fill.nodeType === "Gradient")) { - if (fill && !Object(__WEBPACK_IMPORTED_MODULE_1__util__["isTransparent"])(fill.color)) { - attrs.push([ "fill", fill.color ]); - - if (Object(__WEBPACK_IMPORTED_MODULE_1__util__["defined"])(fill.opacity)) { - attrs.push([ "fill-opacity", fill.opacity ]); - } - } else { - attrs.push([ "fill", __WEBPACK_IMPORTED_MODULE_3__constants__["a" /* NONE */] ]); - } - } - - return attrs; - }; - - PathNode.prototype.renderFill = function renderFill () { - return Object(__WEBPACK_IMPORTED_MODULE_4__utils_render_all_attributes__["a" /* default */])( - this.mapFill(this.srcElement.options.fill) - ); - }; - - PathNode.prototype.template = function template () { - return ""; - }; - - return PathNode; -}(__WEBPACK_IMPORTED_MODULE_0__node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_6__node_map__["a" /* default */].Path = PathNode; - -/* harmony default export */ __webpack_exports__["a"] = (PathNode); -//# sourceMappingURL=path-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/radial-gradient-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gradient_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/gradient-node.js"); - - -var RadialGradientNode = (function (GradientNode) { - function RadialGradientNode () { - GradientNode.apply(this, arguments); - } - - if ( GradientNode ) RadialGradientNode.__proto__ = GradientNode; - RadialGradientNode.prototype = Object.create( GradientNode && GradientNode.prototype ); - RadialGradientNode.prototype.constructor = RadialGradientNode; - - RadialGradientNode.prototype.template = function template () { - return ("" + (this.renderChildren()) + ""); - }; - - RadialGradientNode.prototype.mapCoordinates = function mapCoordinates () { - var srcElement = this.srcElement; - var center = srcElement.center(); - var radius = srcElement.radius(); - var attrs = [ - [ "cx", center.x ], - [ "cy", center.y ], - [ "r", radius ], - this.mapSpace() - ]; - return attrs; - }; - - return RadialGradientNode; -}(__WEBPACK_IMPORTED_MODULE_0__gradient_node__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (RadialGradientNode); -//# sourceMappingURL=radial-gradient-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/rect-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/path-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node-map.js"); - - - -var RectNode = (function (PathNode) { - function RectNode () { - PathNode.apply(this, arguments); - } - - if ( PathNode ) RectNode.__proto__ = PathNode; - RectNode.prototype = Object.create( PathNode && PathNode.prototype ); - RectNode.prototype.constructor = RectNode; - - RectNode.prototype.geometryChange = function geometryChange () { - var geometry = this.srcElement.geometry(); - this.attr("x", geometry.origin.x); - this.attr("y", geometry.origin.y); - this.attr("width", geometry.size.width); - this.attr("height", geometry.size.height); - this.invalidate(); - }; - - RectNode.prototype.size = function size () { - return this.srcElement.geometry().size; - }; - - RectNode.prototype.origin = function origin () { - return this.srcElement.geometry().origin; - }; - - RectNode.prototype.template = function template () { - return ""; - }; - - return RectNode; -}(__WEBPACK_IMPORTED_MODULE_0__path_node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_1__node_map__["a" /* default */].Rect = RectNode; - -/* harmony default export */ __webpack_exports__["a"] = (RectNode); -//# sourceMappingURL=rect-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/root-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_base_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/base-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__definition_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/definition-node.js"); - - - - -var RootNode = (function (Node) { - function RootNode(options) { - Node.call(this); - this.options = options; - this.defs = new __WEBPACK_IMPORTED_MODULE_2__definition_node__["a" /* default */](); - } - - if ( Node ) RootNode.__proto__ = Node; - RootNode.prototype = Object.create( Node && Node.prototype ); - RootNode.prototype.constructor = RootNode; - - RootNode.prototype.attachTo = function attachTo (domElement) { - this.element = domElement; - this.defs.attachTo(domElement.firstElementChild); - }; - - RootNode.prototype.clear = function clear () { - __WEBPACK_IMPORTED_MODULE_0__core_base_node__["a" /* default */].prototype.clear.call(this); - }; - - RootNode.prototype.template = function template () { - return this.defs.render() + this.renderChildren(); - }; - - RootNode.prototype.definitionChange = function definitionChange (e) { - this.defs.definitionChange(e); - }; - - return RootNode; -}(__WEBPACK_IMPORTED_MODULE_1__node__["a" /* default */])); - -/* harmony default export */ __webpack_exports__["a"] = (RootNode); -//# sourceMappingURL=root-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/surface.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_surface__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/surface.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_surface_factory__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/core/surface-factory.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__root_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/root-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__shapes_group__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/shapes/group.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__geometry_transform__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/geometry/transform.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_render_svg__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/utils/render-svg.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - - - - - - - - -var RTL = 'rtl'; - -function alignToScreen(element) { - var ctm; - - try { - ctm = element.getScreenCTM ? element.getScreenCTM() : null; - } catch (e) { } // eslint-disable-line no-empty - - if (ctm) { - var left = - ctm.e % 1; - var top = - ctm.f % 1; - var style = element.style; - - if (left !== 0 || top !== 0) { - style.left = left + "px"; - style.top = top + "px"; - } - } -} - -var Surface = (function (BaseSurface) { - function Surface(element, options) { - BaseSurface.call(this, element, options); - - this._root = new __WEBPACK_IMPORTED_MODULE_2__root_node__["a" /* default */](Object.assign({ - rtl: Object(__WEBPACK_IMPORTED_MODULE_7__util__["elementStyles"])(element, 'direction').direction === RTL - }, this.options)); - - Object(__WEBPACK_IMPORTED_MODULE_5__utils_render_svg__["a" /* default */])(this.element, this._template()); - - this._rootElement = this.element.firstElementChild; - - alignToScreen(this._rootElement); - - this._root.attachTo(this._rootElement); - - Object(__WEBPACK_IMPORTED_MODULE_7__util__["bindEvents"])(this.element, { - click: this._click, - mouseover: this._mouseenter, - mouseout: this._mouseleave, - mousemove: this._mousemove - }); - - this.resize(); - } - - if ( BaseSurface ) Surface.__proto__ = BaseSurface; - Surface.prototype = Object.create( BaseSurface && BaseSurface.prototype ); - Surface.prototype.constructor = Surface; - - Surface.prototype.destroy = function destroy () { - if (this._root) { - this._root.destroy(); - this._root = null; - this._rootElement = null; - Object(__WEBPACK_IMPORTED_MODULE_7__util__["unbindEvents"])(this.element, { - click: this._click, - mouseover: this._mouseenter, - mouseout: this._mouseleave, - mousemove: this._mousemove - }); - } - - BaseSurface.prototype.destroy.call(this); - }; - - Surface.prototype.translate = function translate (offset) { - var viewBox = (Math.round(offset.x)) + " " + (Math.round(offset.y)) + " " + (this._size.width) + " " + (this._size.height); - - this._offset = offset; - this._rootElement.setAttribute("viewBox", viewBox); - }; - - Surface.prototype.draw = function draw (element) { - BaseSurface.prototype.draw.call(this, element); - this._root.load([ element ]); - }; - - Surface.prototype.clear = function clear () { - BaseSurface.prototype.clear.call(this); - this._root.clear(); - }; - - Surface.prototype.svg = function svg () { - return "" + this._template(); - }; - - Surface.prototype.exportVisual = function exportVisual () { - var ref = this; - var visual = ref._visual; - var offset = ref._offset; - - if (offset) { - var wrap = new __WEBPACK_IMPORTED_MODULE_3__shapes_group__["a" /* default */](); - wrap.children.push(visual); - - wrap.transform( - Object(__WEBPACK_IMPORTED_MODULE_4__geometry_transform__["a" /* default */])().translate(-offset.x, -offset.y) - ); - - visual = wrap; - } - - return visual; - }; - - Surface.prototype._resize = function _resize () { - if (this._offset) { - this.translate(this._offset); - } - }; - - Surface.prototype._template = function _template () { - return ("" + (this._root.render()) + ""); - }; - - return Surface; -}(__WEBPACK_IMPORTED_MODULE_0__core_surface__["a" /* default */])); - -Surface.prototype.type = "svg"; - -if (typeof document !== "undefined" && document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")) { - __WEBPACK_IMPORTED_MODULE_0__core_surface__["a" /* default */].support.svg = true; - __WEBPACK_IMPORTED_MODULE_1__core_surface_factory__["a" /* default */].current.register("svg", Surface, 10); -} - -/* harmony default export */ __webpack_exports__["a"] = (Surface); -//# sourceMappingURL=surface.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/text-node.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_node__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/path-node.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_render_style__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/utils/render-style.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_render_attribute__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/utils/render-attribute.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__node_map__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/node-map.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__text_metrics__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/text-metrics.js"); - - - - - - - -var ENTITY_REGEX = /&(?:[a-zA-Z]+|#\d+);/g; - -function decodeEntities(text) { - if (!text || typeof text !== "string" || !ENTITY_REGEX.test(text)) { - return text; - } - - var element = decodeEntities._element; - ENTITY_REGEX.lastIndex = 0; - - return text.replace(ENTITY_REGEX, function (match) { - element.innerHTML = match; - - return element.textContent || element.innerText; - }); -} - -if (typeof document !== "undefined") { - decodeEntities._element = document.createElement("span"); -} - -var TextNode = (function (PathNode) { - function TextNode () { - PathNode.apply(this, arguments); - } - - if ( PathNode ) TextNode.__proto__ = PathNode; - TextNode.prototype = Object.create( PathNode && PathNode.prototype ); - TextNode.prototype.constructor = TextNode; - - TextNode.prototype.geometryChange = function geometryChange () { - var pos = this.pos(); - this.attr("x", pos.x); - this.attr("y", pos.y); - this.invalidate(); - }; - - TextNode.prototype.optionsChange = function optionsChange (e) { - if (e.field === "font") { - this.attr("style", Object(__WEBPACK_IMPORTED_MODULE_1__utils_render_style__["a" /* default */])(this.mapStyle())); - this.geometryChange(); - } else if (e.field === "content") { - PathNode.prototype.content.call(this, this.srcElement.content()); - } - - PathNode.prototype.optionsChange.call(this, e); - }; - - TextNode.prototype.mapStyle = function mapStyle (encode) { - var style = PathNode.prototype.mapStyle.call(this, encode); - var font = this.srcElement.options.font; - - if (encode) { - font = Object(__WEBPACK_IMPORTED_MODULE_4__common__["e" /* htmlEncode */])(font); - } - - style.push([ "font", font ], [ "white-space", "pre" ]); - - return style; - }; - - TextNode.prototype.pos = function pos () { - var pos = this.srcElement.position(); - var size = this.srcElement.measure(); - return pos.clone().setY(pos.y + size.baseline); - }; - - TextNode.prototype.renderContent = function renderContent () { - var content = this.srcElement.content(); - content = decodeEntities(content); - content = Object(__WEBPACK_IMPORTED_MODULE_4__common__["e" /* htmlEncode */])(content); - - return Object(__WEBPACK_IMPORTED_MODULE_5__text_metrics__["e" /* normalizeText */])(content); - }; - - TextNode.prototype.renderTextAnchor = function renderTextAnchor () { - var anchor; - - if ((this.options || {}).rtl && !(__WEBPACK_IMPORTED_MODULE_4__common__["i" /* support */].browser.msie || __WEBPACK_IMPORTED_MODULE_4__common__["i" /* support */].browser.edge)) { - anchor = 'end'; - } - - return Object(__WEBPACK_IMPORTED_MODULE_2__utils_render_attribute__["a" /* default */])("text-anchor", anchor); - }; - - TextNode.prototype.template = function template () { - return "" + (this.renderContent()) + ""; - }; - - return TextNode; -}(__WEBPACK_IMPORTED_MODULE_0__path_node__["a" /* default */])); - -__WEBPACK_IMPORTED_MODULE_3__node_map__["a" /* default */].Text = TextNode; - -/* harmony default export */ __webpack_exports__["a"] = (TextNode); -//# sourceMappingURL=text-node.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/utils/render-all-attributes.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = renderAllAttr; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__render_attribute__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/utils/render-attribute.js"); - - -function renderAllAttr(attrs) { - var output = ""; - for (var i = 0; i < attrs.length; i++) { - output += Object(__WEBPACK_IMPORTED_MODULE_0__render_attribute__["a" /* default */])(attrs[i][0], attrs[i][1]); - } - - return output; -} -//# sourceMappingURL=render-all-attributes.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/utils/render-attribute.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = renderAttr; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - -function renderAttr(name, value) { - return (Object(__WEBPACK_IMPORTED_MODULE_0__util__["defined"])(value) && value !== null) ? (" " + name + "='" + value + "' ") : ""; -} -//# sourceMappingURL=render-attribute.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/utils/render-style.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = renderStyle; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util.js"); - - -function renderStyle(attrs) { - var output = ""; - for (var i = 0; i < attrs.length; i++) { - var value = attrs[i][1]; - if (Object(__WEBPACK_IMPORTED_MODULE_0__util__["defined"])(value)) { - output += attrs[i][0] + ":" + value + ";"; - } - } - - if (output !== "") { - return output; - } -} -//# sourceMappingURL=render-style.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/svg/utils/render-svg.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/svg/constants.js"); - - -var renderSVG = function(container, svg) { - container.innerHTML = svg; -}; - -if (typeof document !== "undefined") { - var testFragment = ""; - var testContainer = document.createElement("div"); - var hasParser = typeof DOMParser !== "undefined"; - - testContainer.innerHTML = testFragment; - - if (hasParser && testContainer.firstChild.namespaceURI !== __WEBPACK_IMPORTED_MODULE_0__constants__["b" /* SVG_NS */]) { - renderSVG = function(container, svg) { - var parser = new DOMParser(); - var chartDoc = parser.parseFromString(svg, "text/xml"); - var importedDoc = document.adoptNode(chartDoc.documentElement); - - container.innerHTML = ""; - container.appendChild(importedDoc); - }; - } -} - -/* harmony default export */ __webpack_exports__["a"] = (renderSVG); -//# sourceMappingURL=render-svg.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/text-metrics.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__text_metrics_lru_cache__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/text-metrics/lru-cache.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__text_metrics_lru_cache__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__text_metrics_text_metrics__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/text-metrics/text-metrics.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__text_metrics_text_metrics__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__text_metrics_measure_text__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/text-metrics/measure-text.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_2__text_metrics_measure_text__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__text_metrics_util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/text-metrics/util.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_3__text_metrics_util__["a"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_3__text_metrics_util__["b"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_3__text_metrics_util__["c"]; }); - - - - - -//# sourceMappingURL=text-metrics.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/text-metrics/lru-cache.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); - - -var LRUCache = (function (Class) { - function LRUCache(size) { - Class.call(this); - - this._size = size; - this._length = 0; - this._map = {}; - } - - if ( Class ) LRUCache.__proto__ = Class; - LRUCache.prototype = Object.create( Class && Class.prototype ); - LRUCache.prototype.constructor = LRUCache; - - LRUCache.prototype.put = function put (key, value) { - var map = this._map; - var entry = { key: key, value: value }; - - map[key] = entry; - - if (!this._head) { - this._head = this._tail = entry; - } else { - this._tail.newer = entry; - entry.older = this._tail; - this._tail = entry; - } - - if (this._length >= this._size) { - map[this._head.key] = null; - this._head = this._head.newer; - this._head.older = null; - } else { - this._length++; - } - }; - - LRUCache.prototype.get = function get (key) { - var entry = this._map[key]; - - if (entry) { - if (entry === this._head && entry !== this._tail) { - this._head = entry.newer; - this._head.older = null; - } - - if (entry !== this._tail) { - if (entry.older) { - entry.older.newer = entry.newer; - entry.newer.older = entry.older; - } - - entry.older = this._tail; - entry.newer = null; - - this._tail.newer = entry; - this._tail = entry; - } - - return entry.value; - } - }; - - return LRUCache; -}(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* Class */])); - -/* harmony default export */ __webpack_exports__["a"] = (LRUCache); -//# sourceMappingURL=lru-cache.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/text-metrics/measure-text.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = measureText; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__text_metrics__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/text-metrics/text-metrics.js"); - - -function measureText(text, style, measureBox) { - return __WEBPACK_IMPORTED_MODULE_0__text_metrics__["a" /* default */].current.measure(text, style, measureBox); -} - -//# sourceMappingURL=measure-text.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/text-metrics/text-metrics.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__lru_cache__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/text-metrics/lru-cache.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/text-metrics/util.js"); - - - - -function zeroSize() { - return { width: 0, height: 0, baseline: 0 }; -} - -var DEFAULT_OPTIONS = { - baselineMarkerSize: 1 -}; - -var defaultMeasureBox; - -if (typeof document !== "undefined") { - defaultMeasureBox = document.createElement("div"); - defaultMeasureBox.style.cssText = "position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;" + - "padding: 0 !important; margin: 0 !important; border: 0 !important;" + - "line-height: normal !important; visibility: hidden !important; white-space: pre!important;"; -} - -var TextMetrics = (function (Class) { - function TextMetrics(options) { - Class.call(this); - - this._cache = new __WEBPACK_IMPORTED_MODULE_0__lru_cache__["a" /* default */](1000); - this.options = Object.assign({}, DEFAULT_OPTIONS, options); - } - - if ( Class ) TextMetrics.__proto__ = Class; - TextMetrics.prototype = Object.create( Class && Class.prototype ); - TextMetrics.prototype.constructor = TextMetrics; - - TextMetrics.prototype.measure = function measure (text, style, options) { - if ( options === void 0 ) options = {}; - - if (!text) { - return zeroSize(); - } - - var styleKey = Object(__WEBPACK_IMPORTED_MODULE_2__util__["c" /* objectKey */])(style); - var cacheKey = Object(__WEBPACK_IMPORTED_MODULE_2__util__["a" /* hashKey */])(text + styleKey); - var cachedResult = this._cache.get(cacheKey); - - if (cachedResult) { - return cachedResult; - } - - var size = zeroSize(); - var measureBox = options.box || defaultMeasureBox; - var baselineMarker = this._baselineMarker().cloneNode(false); - - for (var key in style) { - var value = style[key]; - if (typeof value !== "undefined") { - measureBox.style[key] = value; - } - } - - var textStr = options.normalizeText !== false ? Object(__WEBPACK_IMPORTED_MODULE_2__util__["b" /* normalizeText */])(text) : String(text); - - measureBox.textContent = textStr; - measureBox.appendChild(baselineMarker); - document.body.appendChild(measureBox); - - if (textStr.length) { - size.width = measureBox.offsetWidth - this.options.baselineMarkerSize; - size.height = measureBox.offsetHeight; - size.baseline = baselineMarker.offsetTop + this.options.baselineMarkerSize; - } - - if (size.width > 0 && size.height > 0) { - this._cache.put(cacheKey, size); - } - - measureBox.parentNode.removeChild(measureBox); - - return size; - }; - - TextMetrics.prototype._baselineMarker = function _baselineMarker () { - var marker = document.createElement("div"); - marker.style.cssText = "display: inline-block; vertical-align: baseline;width: " + - this.options.baselineMarkerSize + "px; height: " + this.options.baselineMarkerSize + "px;overflow: hidden;"; - - return marker; - }; - - return TextMetrics; -}(__WEBPACK_IMPORTED_MODULE_1__common__["a" /* Class */])); - -TextMetrics.current = new TextMetrics(); - -/* harmony default export */ __webpack_exports__["a"] = (TextMetrics); -//# sourceMappingURL=text-metrics.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/text-metrics/util.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return objectKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hashKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return normalizeText; }); -var REPLACE_REGEX = /\r?\n|\r|\t/g; -var SPACE = ' '; - -function normalizeText(text) { - return String(text).replace(REPLACE_REGEX, SPACE); -} - -function objectKey(object) { - var parts = []; - for (var key in object) { - parts.push(key + object[key]); - } - - return parts.sort().join(""); -} - -// Computes FNV-1 hash -// See http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function -function hashKey(str) { - // 32-bit FNV-1 offset basis - // See http://isthe.com/chongo/tech/comp/fnv/#FNV-param - var hash = 0x811C9DC5; - - for (var i = 0; i < str.length; ++i) { - hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24); - hash ^= str.charCodeAt(i); - } - - return hash >>> 0; -} - - -//# sourceMappingURL=util.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_append__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/append.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "append", function() { return __WEBPACK_IMPORTED_MODULE_0__util_append__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_arabic_to_roman__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/arabic-to-roman.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "arabicToRoman", function() { return __WEBPACK_IMPORTED_MODULE_1__util_arabic_to_roman__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_create_promise__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/create-promise.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createPromise", function() { return __WEBPACK_IMPORTED_MODULE_2__util_create_promise__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_defined__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/defined.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defined", function() { return __WEBPACK_IMPORTED_MODULE_3__util_defined__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_definition_id__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/definition-id.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "definitionId", function() { return __WEBPACK_IMPORTED_MODULE_4__util_definition_id__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_deg__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/deg.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "deg", function() { return __WEBPACK_IMPORTED_MODULE_5__util_deg__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_encode_base64__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/encode-base64.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "encodeBase64", function() { return __WEBPACK_IMPORTED_MODULE_6__util_encode_base64__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util_event_coordinates__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/event-coordinates.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "eventCoordinates", function() { return __WEBPACK_IMPORTED_MODULE_7__util_event_coordinates__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__util_event_element__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/event-element.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "eventElement", function() { return __WEBPACK_IMPORTED_MODULE_8__util_event_element__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__util_is_transparent__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/is-transparent.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isTransparent", function() { return __WEBPACK_IMPORTED_MODULE_9__util_is_transparent__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__util_last__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/last.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return __WEBPACK_IMPORTED_MODULE_10__util_last__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__util_limit_value__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/limit-value.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "limitValue", function() { return __WEBPACK_IMPORTED_MODULE_11__util_limit_value__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__util_merge_sort__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/merge-sort.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mergeSort", function() { return __WEBPACK_IMPORTED_MODULE_12__util_merge_sort__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__util_promise_all__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/promise-all.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "promiseAll", function() { return __WEBPACK_IMPORTED_MODULE_13__util_promise_all__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__util_rad__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/rad.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "rad", function() { return __WEBPACK_IMPORTED_MODULE_14__util_rad__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__util_round__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/round.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "round", function() { return __WEBPACK_IMPORTED_MODULE_15__util_round__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__util_value_or_default__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/value-or-default.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "valueOrDefault", function() { return __WEBPACK_IMPORTED_MODULE_16__util_value_or_default__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__util_bind_events__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/bind-events.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindEvents", function() { return __WEBPACK_IMPORTED_MODULE_17__util_bind_events__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__util_element_offset__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/element-offset.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "elementOffset", function() { return __WEBPACK_IMPORTED_MODULE_18__util_element_offset__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__util_element_size__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/element-size.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "elementSize", function() { return __WEBPACK_IMPORTED_MODULE_19__util_element_size__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__util_element_styles__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/element-styles.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "elementStyles", function() { return __WEBPACK_IMPORTED_MODULE_20__util_element_styles__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__util_unbind_events__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/unbind-events.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "unbindEvents", function() { return __WEBPACK_IMPORTED_MODULE_21__util_unbind_events__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__util_constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/constants.js"); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "DEG_TO_RAD", function() { return __WEBPACK_IMPORTED_MODULE_22__util_constants__["a"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "MAX_NUM", function() { return __WEBPACK_IMPORTED_MODULE_22__util_constants__["b"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "MIN_NUM", function() { return __WEBPACK_IMPORTED_MODULE_22__util_constants__["c"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__text_metrics__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/text-metrics.js"); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "LRUCache", function() { return __WEBPACK_IMPORTED_MODULE_23__text_metrics__["a"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "TextMetrics", function() { return __WEBPACK_IMPORTED_MODULE_23__text_metrics__["b"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "measureText", function() { return __WEBPACK_IMPORTED_MODULE_23__text_metrics__["d"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "objectKey", function() { return __WEBPACK_IMPORTED_MODULE_23__text_metrics__["f"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "hashKey", function() { return __WEBPACK_IMPORTED_MODULE_23__text_metrics__["c"]; }); -/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "normalizeText", function() { return __WEBPACK_IMPORTED_MODULE_23__text_metrics__["e"]; }); - - - - - - - - - - - - - - - - - - - - - - - - - -//# sourceMappingURL=util.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/append.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = append; -function append(first, second) { - first.push.apply(first, second); - return first; -} -//# sourceMappingURL=append.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/arabic-to-roman.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = arabicToRoman; -/* eslint-disable key-spacing,no-multi-spaces,no-param-reassign */ - -var literals = { - 1 : "i", 10 : "x", 100 : "c", - 2 : "ii", 20 : "xx", 200 : "cc", - 3 : "iii", 30 : "xxx", 300 : "ccc", - 4 : "iv", 40 : "xl", 400 : "cd", - 5 : "v", 50 : "l", 500 : "d", - 6 : "vi", 60 : "lx", 600 : "dc", - 7 : "vii", 70 : "lxx", 700 : "dcc", - 8 : "viii", 80 : "lxxx", 800 : "dccc", - 9 : "ix", 90 : "xc", 900 : "cm", - 1000 : "m" -}; - -function arabicToRoman(n) { - var values = [ 1000, - 900 , 800, 700, 600, 500, 400, 300, 200, 100, - 90 , 80 , 70 , 60 , 50 , 40 , 30 , 20 , 10 , - 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 ]; - - var roman = ""; - while (n > 0) { - if (n < values[0]) { - values.shift(); - } else { - roman += literals[values[0]]; - n -= values[0]; - } - } - return roman; -} -//# sourceMappingURL=arabic-to-roman.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/bind-events.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = bindEvents; -function bindEvents(element, events) { - for (var eventName in events) { - var eventNames = eventName.trim().split(" "); - for (var idx = 0; idx < eventNames.length; idx++) { - element.addEventListener(eventNames[idx], events[eventName], false); - } - } -} -//# sourceMappingURL=bind-events.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/constants.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DEG_TO_RAD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MAX_NUM; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return MIN_NUM; }); -var DEG_TO_RAD = Math.PI / 180; -var MAX_NUM = Number.MAX_VALUE; -var MIN_NUM = -Number.MAX_VALUE; - - -//# sourceMappingURL=constants.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/create-promise.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = createPromise; -function createPromise() { - var resolveFn, rejectFn; - var promise = new Promise(function (resolve, reject) { - resolveFn = function (data) { - promise._state = "resolved"; - resolve(data); - return promise; - }; - rejectFn = function (data) { - promise._state = "rejected"; - reject(data); - - return promise; - }; - }); - promise._state = "pending"; - promise.resolve = resolveFn; - promise.reject = rejectFn; - promise.state = function () { return promise._state; }; - - return promise; -} - -//# sourceMappingURL=create-promise.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/defined.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = defined; -var UNDEFINED = "undefined"; - -function defined(value) { - return typeof value !== UNDEFINED; -} -//# sourceMappingURL=defined.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/definition-id.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = definitionId; -var defId = 1; - -function definitionId() { - return "kdef" + defId++; -} -//# sourceMappingURL=definition-id.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/deg.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = deg; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/constants.js"); - - -function deg(radians) { - return radians / __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* DEG_TO_RAD */]; -} -//# sourceMappingURL=deg.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/element-offset.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = elementOffset; -function elementOffset(element) { - var box = element.getBoundingClientRect(); - - var documentElement = document.documentElement; - - return { - top: box.top + (window.pageYOffset || documentElement.scrollTop) - (documentElement.clientTop || 0), - left: box.left + (window.pageXOffset || documentElement.scrollLeft) - (documentElement.clientLeft || 0) - }; -} -//# sourceMappingURL=element-offset.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/element-size.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = elementSize; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__element_styles__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/element-styles.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__defined__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/defined.js"); - - - -function getPixels(value) { - if (isNaN(value)) { - return value; - } - return value + "px"; -} - -function elementSize(element, size) { - if (size) { - var width = size.width; - var height = size.height; - - if (Object(__WEBPACK_IMPORTED_MODULE_1__defined__["a" /* default */])(width)) { - element.style.width = getPixels(width); - } - - if (Object(__WEBPACK_IMPORTED_MODULE_1__defined__["a" /* default */])(height)) { - element.style.height = getPixels(height); - } - - } else { - var size$1 = Object(__WEBPACK_IMPORTED_MODULE_0__element_styles__["a" /* default */])(element, [ 'width', 'height' ]); - - return { - width: parseInt(size$1.width, 10), - height: parseInt(size$1.height, 10) - }; - } -} -//# sourceMappingURL=element-size.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/element-styles.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = elementStyles; -function elementStyles(element, styles) { - var result = {}; - var style = window.getComputedStyle(element); - var stylesArray = Array.isArray(styles) ? styles : [ styles ]; - - for (var idx = 0; idx < stylesArray.length; idx++) { - var field = stylesArray[idx]; - result[field] = style[field]; - } - - return result; -} -//# sourceMappingURL=element-styles.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/encode-base64.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = encodeBase64; -var KEY_STR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; -var fromCharCode = String.fromCharCode; - -function encodeUTF8(input) { - var output = ""; - - for (var i = 0; i < input.length; i++) { - var c = input.charCodeAt(i); - - if (c < 0x80) { - // One byte - output += fromCharCode(c); - } else if (c < 0x800) { - // Two bytes - output += fromCharCode(0xC0 | (c >>> 6)); - output += fromCharCode(0x80 | (c & 0x3f)); - } else if (c < 0x10000) { - // Three bytes - output += fromCharCode(0xE0 | (c >>> 12)); - output += fromCharCode(0x80 | (c >>> 6 & 0x3f)); - output += fromCharCode(0x80 | (c & 0x3f)); - } - } - - return output; -} - -function encodeBase64(input) { - var output = ""; - var i = 0; - - var utfInput = encodeUTF8(input); - - while (i < utfInput.length) { - var chr1 = utfInput.charCodeAt(i++); - var chr2 = utfInput.charCodeAt(i++); - var chr3 = utfInput.charCodeAt(i++); - - var enc1 = chr1 >> 2; - var enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - var enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - var enc4 = chr3 & 63; - - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - - output = output + - KEY_STR.charAt(enc1) + KEY_STR.charAt(enc2) + - KEY_STR.charAt(enc3) + KEY_STR.charAt(enc4); - } - - return output; -} -//# sourceMappingURL=encode-base64.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/event-coordinates.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = eventCoordinates; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defined__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/defined.js"); - - -function eventCoordinates(e) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__defined__["a" /* default */])((e.x || {}).location)) { - return { - x: e.x.location, - y: e.y.location - }; - } - - return { - x: e.pageX || e.clientX || 0, - y: e.pageY || e.clientY || 0 - }; -} -//# sourceMappingURL=event-coordinates.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/event-element.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = eventElement; -function eventElement(e) { - if ( e === void 0 ) e = {}; - - return e.touch ? e.touch.initialTouch : e.target; -} -//# sourceMappingURL=event-element.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/is-transparent.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = isTransparent; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defined__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/defined.js"); - - -function isTransparent(color) { - return color === "" || color === null || color === "none" || color === "transparent" || !Object(__WEBPACK_IMPORTED_MODULE_0__defined__["a" /* default */])(color); -} -//# sourceMappingURL=is-transparent.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/last.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = last; -function last(array) { - if (array) { - return array[array.length - 1]; - } -} -//# sourceMappingURL=last.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/limit-value.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = limitValue; -function limitValue(value, min, max) { - return Math.max(Math.min(value, max), min); -} -//# sourceMappingURL=limit-value.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/merge-sort.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = mergeSort; -/* eslint-disable no-multi-spaces, key-spacing, indent, camelcase, space-before-blocks, eqeqeq, brace-style */ -/* eslint-disable space-infix-ops, space-before-function-paren, array-bracket-spacing, object-curly-spacing */ -/* eslint-disable no-nested-ternary, max-params, default-case, no-else-return, no-empty */ -/* eslint-disable no-param-reassign, no-var, block-scoped-var */ - -// mergeSort is stable. -function mergeSort(a, cmp) { - if (a.length < 2) { - return a.slice(); - } - function merge(a, b) { - var r = [], ai = 0, bi = 0, i = 0; - while (ai < a.length && bi < b.length) { - if (cmp(a[ai], b[bi]) <= 0) { - r[i++] = a[ai++]; - } else { - r[i++] = b[bi++]; - } - } - if (ai < a.length) { - r.push.apply(r, a.slice(ai)); - } - if (bi < b.length) { - r.push.apply(r, b.slice(bi)); - } - return r; - } - return (function sort(a) { - if (a.length <= 1) { - return a; - } - var m = Math.floor(a.length / 2); - var left = a.slice(0, m); - var right = a.slice(m); - left = sort(left); - right = sort(right); - return merge(left, right); - })(a); -} -//# sourceMappingURL=merge-sort.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/promise-all.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = promiseAll; -function promiseAll(promises) { - return Promise.all(promises); -} -//# sourceMappingURL=promise-all.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/rad.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = rad; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/constants.js"); - - -function rad(degrees) { - return degrees * __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* DEG_TO_RAD */]; -} - -//# sourceMappingURL=rad.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/round.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = round; -function pow(p) { - if (p) { - return Math.pow(10, p); - } - - return 1; -} - -function round(value, precision) { - var power = pow(precision); - return Math.round(value * power) / power; -} -//# sourceMappingURL=round.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/unbind-events.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = unbindEvents; -function unbindEvents(element, events) { - if ( events === void 0 ) events = {}; - - for (var name in events) { - var eventNames = name.trim().split(" "); - for (var idx = 0; idx < eventNames.length; idx++) { - element.removeEventListener(eventNames[idx], events[name], false); - } - } -} -//# sourceMappingURL=unbind-events.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/dist/es/util/value-or-default.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = valueOrDefault; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defined__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/util/defined.js"); - - -function valueOrDefault(value, defaultValue) { - return Object(__WEBPACK_IMPORTED_MODULE_0__defined__["a" /* default */])(value) ? value : defaultValue; -} -//# sourceMappingURL=value-or-default.js.map - - -/***/ }), - -/***/ "../../../../@progress/kendo-drawing/main.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dist_es_main__ = __webpack_require__("../../../../@progress/kendo-drawing/dist/es/main.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__dist_es_main__["a"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__dist_es_main__["b"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__dist_es_main__["c"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__dist_es_main__["d"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_0__dist_es_main__["e"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_0__dist_es_main__["f"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_0__dist_es_main__["g"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_0__dist_es_main__["h"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_0__dist_es_main__["i"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_0__dist_es_main__["j"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_0__dist_es_main__["k"]; }); - - -/***/ }), - -/***/ "../../../../@progress/kendo-file-saver/dist/es/base64.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export encodeBase64 */ -var KEY_STR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; -var fromCharCode = String.fromCharCode; - -function encodeBase64(plainText) { - var input = encodeUTF8(plainText); - var output = ""; - var chr1, chr2, chr3, enc1, enc2, enc3, enc4; - var i = 0; - - while (i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - - output = output + - KEY_STR.charAt(enc1) + KEY_STR.charAt(enc2) + - KEY_STR.charAt(enc3) + KEY_STR.charAt(enc4); - } - - return output; -} - -function encodeUTF8(input) { - var output = ""; - - for (var i = 0; i < input.length; i++) { - var c = input.charCodeAt(i); - - if (c < 0x80) { - // One byte - output += fromCharCode(c); - } else if (c < 0x800) { - // Two bytes - output += fromCharCode(0xC0 | (c >>> 6)); - output += fromCharCode(0x80 | (c & 0x3f)); - } else if (c < 0x10000) { - // Three bytes - output += fromCharCode(0xE0 | (c >>> 12)); - output += fromCharCode(0x80 | (c >>> 6 & 0x3f)); - output += fromCharCode(0x80 | (c & 0x3f)); - } - } - - return output; -} - - -/***/ }), - -/***/ "../../../../@progress/kendo-file-saver/dist/es/main.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__save_as__ = __webpack_require__("../../../../@progress/kendo-file-saver/dist/es/save-as.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__save_as__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__base64__ = __webpack_require__("../../../../@progress/kendo-file-saver/dist/es/base64.js"); -/* unused harmony reexport encodeBase64 */ - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-file-saver/dist/es/save-as.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = saveAs; -function saveAs(data, fileName, options) { - if ( options === void 0 ) options = {}; - - var save = postToProxy; - - if (options.forceProxy && !options.proxyURL) { - throw new Error('No proxyURL is set, but forceProxy is true'); - } - - if (!options.forceProxy) { - if (canDownload()) { - save = saveAsDataURI; - } - - if (navigator.msSaveBlob) { - save = saveAsBlob; - } - } - - save(data, fileName, options); -} - -var anchor = function () { return document.createElement('a'); }; -var canDownload = function () { return 'download' in anchor(); }; - -function saveAsBlob(data, fileName) { - var blob = data; // could be a Blob object - - if (typeof data === 'string') { - var parts = data.split(';base64,'); - var contentType = parts[0]; - var base64 = atob(parts[1]); - var array = new Uint8Array(base64.length); - - for (var idx = 0; idx < base64.length; idx++) { - array[idx] = base64.charCodeAt(idx); - } - - blob = new Blob([ array.buffer ], { type: contentType }); - } - - navigator.msSaveBlob(blob, fileName); -} - -function saveAsDataURI(data, fileName) { - var dataURI = data; - if (window.Blob && data instanceof Blob) { - dataURI = URL.createObjectURL(data); - } - - var fileSaver = anchor(); - fileSaver.download = fileName; - fileSaver.href = dataURI; - - var e = document.createEvent('MouseEvents'); - e.initMouseEvent('click', true, false, window, - 0, 0, 0, 0, 0, false, false, false, false, 0, null); - - fileSaver.dispatchEvent(e); - setTimeout(function () { return URL.revokeObjectURL(dataURI); }); -} - -function postToProxy(dataURI, fileName, options) { - if (!options.proxyURL) { - return; - } - - var form = document.createElement('form'); - form.setAttribute('action', options.proxyURL); - form.setAttribute('method', 'POST'); - form.setAttribute('target', options.proxyTarget || '_self'); - - var formData = options.proxyData || {}; - formData.fileName = fileName; - - var parts = dataURI.split(";base64,"); - formData.contentType = parts[0].replace("data:", ""); - formData.base64 = parts[1]; - - for (var name in formData) { - if (formData.hasOwnProperty(name)) { - var input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', name); - input.setAttribute('value', formData[name]); - - form.appendChild(input); - } - } - - document.body.appendChild(form); - form.submit(); - document.body.removeChild(form); -} - - - -/***/ }), - -/***/ "../../../../@progress/kendo-ooxml/dist/es/excel-exporter.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__services_template_service__ = __webpack_require__("../../../../@progress/kendo-ooxml/dist/es/services/template-service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_getter__ = __webpack_require__("../../../../@progress/kendo-ooxml/dist/es/utils/getter.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_map__ = __webpack_require__("../../../../@progress/kendo-ooxml/dist/es/utils/map.js"); - - - - -function defaultGroupHeaderTemplate(data) { - return ((data.title) + ": " + (data.value)); -} - -function createArray(length, callback) { - var result = []; - - for (var idx = 0; idx < length; idx++) { - result.push(callback(idx)); - } - - return result; -} - -var ExcelExporter = function ExcelExporter(options) { - options.columns = this._trimColumns(options.columns || []); - - this.allColumns = Object(__WEBPACK_IMPORTED_MODULE_2__utils_map__["a" /* default */])(this._leafColumns(options.columns || []), this._prepareColumn); - - this.columns = this.allColumns.filter(function(column) { return !column.hidden; }); - - this.options = options; - this.data = options.data || []; - this.aggregates = options.aggregates || {}; - this.groups = [].concat(options.groups || []); - this.hierarchy = options.hierarchy; -}; - -ExcelExporter.prototype.workbook = function workbook () { - var workbook = { - sheets: [ { - columns: this._columns(), - rows: this.hierarchy ? this._hierachyRows() : this._rows(), - freezePane: this._freezePane(), - filter: this._filter() - } ] - }; - - return workbook; -}; - -ExcelExporter.prototype._trimColumns = function _trimColumns (columns) { - var this$1 = this; - - return columns.filter(function (column) { - var result = Boolean(column.field); - - if (!result && column.columns) { - result = this$1._trimColumns(column.columns).length > 0; - } - - return result; - }); -}; - -ExcelExporter.prototype._leafColumns = function _leafColumns (columns) { - var this$1 = this; - - var result = []; - - for (var idx = 0; idx < columns.length; idx++) { - if (!columns[idx].columns) { - result.push(columns[idx]); - } else { - result = result.concat(this$1._leafColumns(columns[idx].columns)); - } - } - - return result; -}; - -ExcelExporter.prototype._prepareColumn = function _prepareColumn (column) { - if (!column.field) { - return null; - } - - var value = function(dataItem) { - return Object(__WEBPACK_IMPORTED_MODULE_1__utils_getter__["a" /* default */])(column.field)(dataItem); - }; - - var values = null; - - if (column.values) { - values = {}; - - column.values.forEach(function(item) { - values[item.value] = item.text; - }); - - value = function(dataItem) { - return values[Object(__WEBPACK_IMPORTED_MODULE_1__utils_getter__["a" /* default */])(column.field)(dataItem)]; - }; - } - - return Object.assign({}, column, { - value: value, - values: values, - groupHeaderTemplate: column.groupHeaderTemplate ? __WEBPACK_IMPORTED_MODULE_0__services_template_service__["a" /* default */].compile(column.groupHeaderTemplate) : defaultGroupHeaderTemplate, - groupFooterTemplate: column.groupFooterTemplate ? __WEBPACK_IMPORTED_MODULE_0__services_template_service__["a" /* default */].compile(column.groupFooterTemplate) : null, - footerTemplate: column.footerTemplate ? __WEBPACK_IMPORTED_MODULE_0__services_template_service__["a" /* default */].compile(column.footerTemplate) : null - }); -}; - -ExcelExporter.prototype._filter = function _filter () { - if (!this.options.filterable) { - return null; - } - - var depth = this._depth(); - - return { - from: depth, - to: depth + this.columns.length - 1 - }; -}; - -ExcelExporter.prototype._createPaddingCells = function _createPaddingCells (length) { - var this$1 = this; - - return createArray(length, function () { return Object.assign({ - background: "#dfdfdf", - color: "#333" - }, this$1.options.paddingCellOptions); }); -}; - -ExcelExporter.prototype._dataRow = function _dataRow (dataItem, level, depth) { - var this$1 = this; - - var cells = this._createPaddingCells(level); - - // grouped - if (depth && dataItem.items) { - var column = this.allColumns.filter(function(column) { - return column.field === dataItem.field; - })[0]; - - var title = column && column.title ? column.title : dataItem.field; - var template = column ? column.groupHeaderTemplate : null; - var group = Object.assign({ - title: title, - field: dataItem.field, - value: column && column.values ? column.values[dataItem.value] : dataItem.value, - aggregates: dataItem.aggregates, - items: dataItem.items - }, dataItem.aggregates[dataItem.field]); - - var value = title + ": " + (dataItem.value); - - if (template) { - value = template(group); - } - - cells.push(Object.assign({ - value: value, - background: "#dfdfdf", - color: "#333", - colSpan: this.columns.length + depth - level - }, (column || {}).groupHeaderCellOptions)); - - var rows = this._dataRows(dataItem.items, level + 1); - - rows.unshift({ - type: "group-header", - cells: cells - }); - - return rows.concat(this._footer(dataItem)); - } - - var dataCells = []; - - for (var cellIdx = 0; cellIdx < this.columns.length; cellIdx++) { - dataCells[cellIdx] = this$1._cell(dataItem, this$1.columns[cellIdx]); - } - - if (this.hierarchy) { - dataCells[0].colSpan = depth - level + 1; - } - - return [ { - type: "data", - cells: cells.concat(dataCells) - } ]; -}; - -ExcelExporter.prototype._dataRows = function _dataRows (dataItems, level) { - var this$1 = this; - - var depth = this._depth(); - var rows = []; - - for (var idx = 0; idx < dataItems.length; idx++) { - rows.push.apply(rows, this$1._dataRow(dataItems[idx], level, depth)); - } - - return rows; -}; - -ExcelExporter.prototype._hierachyRows = function _hierachyRows () { - var this$1 = this; - - var depth = this._depth(); - var data = this.data; - var itemLevel = this.hierarchy.itemLevel; - var hasFooter = this._hasFooterTemplate(); - var rows = []; - var parents = []; - var previousLevel = 0; - var previousItemId; - - for (var idx = 0; idx < data.length; idx++) { - var item = data[idx]; - var level = itemLevel(item); - - if (hasFooter) { - if (level > previousLevel) { - parents.push({ id: previousItemId, level: previousLevel }); - } else if (level < previousLevel) { - rows.push.apply(rows, this$1._hierarchyFooterRows(parents, level, depth)); - } - - previousLevel = level; - previousItemId = item.id; - } - - rows.push.apply(rows, this$1._dataRow(item, level + 1, depth)); - } - - if (hasFooter) { - rows.push.apply(rows, this._hierarchyFooterRows(parents, 0, depth)); - - var rootAggregate = data.length ? this.aggregates[data[0].parentId] : {}; - rows.push(this._hierarchyFooter(rootAggregate, 0, depth)); - } - - this._prependHeaderRows(rows); - - return rows; -}; - -ExcelExporter.prototype._hierarchyFooterRows = function _hierarchyFooterRows (parents, currentLevel, depth) { - var this$1 = this; - - var rows = []; - while (parents.length && parents[parents.length - 1].level >= currentLevel) { - var parent = parents.pop(); - rows.push(this$1._hierarchyFooter(this$1.aggregates[parent.id], parent.level + 1, depth)); - } - - return rows; -}; - -ExcelExporter.prototype._hasFooterTemplate = function _hasFooterTemplate () { - var columns = this.columns; - for (var idx = 0; idx < columns.length; idx++) { - if (columns[idx].footerTemplate) { - return true; - } - } -}; - -ExcelExporter.prototype._hierarchyFooter = function _hierarchyFooter (aggregates, level, depth) { - var cells = this.columns.map(function(column, index) { - var colSpan = index ? 1 : depth - level + 1; - if (column.footerTemplate) { - return Object.assign({ - background: "#dfdfdf", - color: "#333", - colSpan: colSpan, - value: column.footerTemplate(Object.assign({}, (aggregates || {})[column.field])) - }, column.footerCellOptions); - } - - return Object.assign({ - background: "#dfdfdf", - color: "#333", - colSpan: colSpan - }, column.footerCellOptions); - }); - - return { - type: "footer", - cells: this._createPaddingCells(level).concat(cells) - }; -}; - -ExcelExporter.prototype._footer = function _footer (dataItem) { - var this$1 = this; - - var rows = []; - var footer = false; - - var cells = this.columns.map(function (column) { - if (column.groupFooterTemplate) { - var templateData = Object.assign({}, this$1.aggregates, dataItem.aggregates, dataItem.aggregates[column.field], { - group: { - items: dataItem.items, - field: dataItem.field, - value: dataItem.value - } - }); - - // https://github.com/telerik/kendo-ui-core/issues/3024 - // https://github.com/telerik/kendo-ui-core/issues/3095 - templateData[dataItem.field] = templateData; - - footer = true; - return Object.assign({ - background: "#dfdfdf", - color: "#333", - value: column.groupFooterTemplate(templateData) - }, column.groupFooterCellOptions); - } - - return Object.assign({ - background: "#dfdfdf", - color: "#333" - }, column.groupFooterCellOptions); - }); - - if (footer) { - rows.push({ - type: "group-footer", - cells: this._createPaddingCells(this.groups.length).concat(cells) - }); - } - - return rows; -}; - -ExcelExporter.prototype._isColumnVisible = function _isColumnVisible (column) { - return this._visibleColumns([ column ]).length > 0 && (column.field || column.columns); -}; - -ExcelExporter.prototype._visibleColumns = function _visibleColumns (columns) { - var this$1 = this; - - return columns.filter(function (column) { - var result = !column.hidden; - if (result && column.columns) { - result = this$1._visibleColumns(column.columns).length > 0; - } - return result; - }); -}; - -ExcelExporter.prototype._headerRow = function _headerRow (row, groups) { - var this$1 = this; - - var headers = row.cells.map(function(cell) { - return Object.assign(cell, { - colSpan: cell.colSpan > 1 ? cell.colSpan : 1, - rowSpan: row.rowSpan > 1 && !cell.colSpan ? row.rowSpan : 1 - }); - }); - - if (this.hierarchy) { - headers[0].colSpan = this._depth() + 1; - } - - return { - type: "header", - cells: createArray(groups.length, function () { return Object.assign({ - background: "#7a7a7a", - color: "#fff" - }, this$1.options.headerPaddingCellOptions); }).concat(headers) - }; -}; - -ExcelExporter.prototype._prependHeaderRows = function _prependHeaderRows (rows) { - var this$1 = this; - - var groups = this.groups; - - var headerRows = [ { rowSpan: 1, cells: [], index: 0 } ]; - - this._prepareHeaderRows(headerRows, this.options.columns); - - for (var idx = headerRows.length - 1; idx >= 0; idx--) { - rows.unshift(this$1._headerRow(headerRows[idx], groups)); - } -}; - -ExcelExporter.prototype._prepareHeaderRows = function _prepareHeaderRows (rows, columns, parentCell, parentRow) { - var this$1 = this; - - var row = parentRow || rows[rows.length - 1]; - var childRow = rows[row.index + 1]; - var totalColSpan = 0; - - for (var idx = 0; idx < columns.length; idx++) { - var column = columns[idx]; - if (this$1._isColumnVisible(column)) { - - var cell = Object.assign({ - background: "#7a7a7a", - color: "#fff", - value: column.title || column.field, - colSpan: 0 - }, column.headerCellOptions); - row.cells.push(cell); - - if (column.columns && column.columns.length) { - if (!childRow) { - childRow = { rowSpan: 0, cells: [], index: rows.length }; - rows.push(childRow); - } - cell.colSpan = this$1._trimColumns(this$1._visibleColumns(column.columns)).length; - this$1._prepareHeaderRows(rows, column.columns, cell, childRow); - totalColSpan += cell.colSpan - 1; - row.rowSpan = rows.length - row.index; - } - } - } - - if (parentCell) { - parentCell.colSpan += totalColSpan; - } -}; - -ExcelExporter.prototype._rows = function _rows () { - var this$1 = this; - - var rows = this._dataRows(this.data, 0); - - if (this.columns.length) { - this._prependHeaderRows(rows); - var footer = false; - - var cells = this.columns.map(function (column) { - if (column.footerTemplate) { - footer = true; - - return Object.assign({ - background: "#dfdfdf", - color: "#333", - value: column.footerTemplate(Object.assign({}, this$1.aggregates, this$1.aggregates[column.field])) - }, column.footerCellOptions); - } - - return Object.assign({ - background: "#dfdfdf", - color: "#333" - }, column.footerCellOptions); - }); - - if (footer) { - rows.push({ - type: "footer", - cells: this._createPaddingCells(this.groups.length).concat(cells) - }); - } - } - - return rows; -}; - -ExcelExporter.prototype._headerDepth = function _headerDepth (columns) { - var this$1 = this; - - var result = 1; - var max = 0; - - for (var idx = 0; idx < columns.length; idx++) { - if (columns[idx].columns) { - var temp = this$1._headerDepth(columns[idx].columns); - if (temp > max) { - max = temp; - } - } - } - return result + max; -}; - -ExcelExporter.prototype._freezePane = function _freezePane () { - var columns = this._visibleColumns(this.options.columns || []); - - var colSplit = this._visibleColumns(this._trimColumns(this._leafColumns(columns.filter(function(column) { - return column.locked; - })))).length; - - return { - rowSplit: this._headerDepth(columns), - colSplit: colSplit ? colSplit + this.groups.length : 0 - }; -}; - -ExcelExporter.prototype._cell = function _cell (dataItem, column) { - return Object.assign({ - value: column.value(dataItem) - }, column.cellOptions); -}; - -ExcelExporter.prototype._depth = function _depth () { - var depth = 0; - - if (this.hierarchy) { - depth = this.hierarchy.depth; - } else { - depth = this.groups.length; - } - - return depth; -}; - -ExcelExporter.prototype._columns = function _columns () { - var depth = this._depth(); - var columns = createArray(depth, function () { return ({ width: 20 }); }); - - return columns.concat(this.columns.map(function(column) { - return { - width: parseInt(column.width, 10), - autoWidth: column.width ? false : true - }; - })); -}; - -/* harmony default export */ __webpack_exports__["a"] = (ExcelExporter); - - -/***/ }), - -/***/ "../../../../@progress/kendo-ooxml/dist/es/main.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__excel_exporter__ = __webpack_require__("../../../../@progress/kendo-ooxml/dist/es/excel-exporter.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__excel_exporter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__services__ = __webpack_require__("../../../../@progress/kendo-ooxml/dist/es/services.js"); -/* unused harmony namespace reexport */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ooxml__ = __webpack_require__("../../../../@progress/kendo-ooxml/dist/es/ooxml.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__ooxml__["a"]; }); - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-ooxml/dist/es/ooxml.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Workbook; }); -/* unused harmony export Worksheet */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_map__ = __webpack_require__("../../../../@progress/kendo-ooxml/dist/es/utils/map.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_create_zip__ = __webpack_require__("../../../../@progress/kendo-ooxml/dist/es/utils/create-zip.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_intl_service__ = __webpack_require__("../../../../@progress/kendo-ooxml/dist/es/services/intl-service.js"); - - - - -var DATA_URL_PREFIX = "data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"; -var DATA_URL_OPTIONS = { compression: "DEFLATE", type: "base64" }; -var MS_PER_MINUTE = 60000; -var MS_PER_DAY = 86400000; - -/* eslint-disable key-spacing, no-arrow-condition, indent, no-nested-ternary, consistent-return */ - -function toDataURL(content) { - return DATA_URL_PREFIX + content; -} - -function indexOf(thing, array) { - return array.indexOf(thing); -} - -var parseJSON = JSON.parse.bind(JSON); - -function ESC(val) { - return String(val) - .replace(/&/g, "&") - .replace(//g, ">") - .replace(/\"/g, """) - .replace(/\'/g, "'"); -} - -function repeat(count, func) { - var str = ""; - for (var i = 0; i < count; ++i) { - str += func(i); - } - return str; -} - -function foreach(arr, func) { - var str = ""; - for (var i = 0; i < arr.length; ++i) { - str += func(arr[i], i); - } - return str; -} - -var XMLHEAD = '\r'; - -var RELS = XMLHEAD + "\n \n \n \n \n "; - -var CORE = function (ref) { - var creator = ref.creator; - var lastModifiedBy = ref.lastModifiedBy; - var created = ref.created; - var modified = ref.modified; - - return (XMLHEAD + "\n \n " + (ESC(creator)) + "\n " + (ESC(lastModifiedBy)) + "\n " + (ESC(created)) + "\n " + (ESC(modified)) + "\n"); -}; - -var APP = function (ref) { - var sheets = ref.sheets; - - return (XMLHEAD + "\n\n Microsoft Excel\n 0\n false\n \n \n \n Worksheets\n \n \n " + (sheets.length) + "\n \n \n \n \n " + (foreach(sheets, function (sheet, i) { return sheet.options.title - ? ("" + (ESC(sheet.options.title)) + "") - : ("Sheet" + (i + 1) + ""); } - )) + "\n \n false\n false\n false\n 14.0300\n"); -}; - -var CONTENT_TYPES = function (ref) { - var count = ref.count; - - return (XMLHEAD + "\n\n \n \n \n \n \n " + (repeat(count, function (idx) { return (""); })) + "\n \n \n"); -}; - -var WORKBOOK = function (ref) { - var sheets = ref.sheets; - var filterNames = ref.filterNames; - var userNames = ref.userNames; - - return (XMLHEAD + "\n\n \n \n \n \n \n \n " + (foreach(sheets, function (ref, i) { - var options = ref.options; - - var name = options.name || options.title || ("Sheet" + (i + 1)); - return (""); - })) + "\n \n " + (filterNames.length || userNames.length ? ("\n \n " + (foreach(filterNames, function (f) { return ("\n "); })) + "\n " + (foreach(userNames, function (f) { return ("\n "); })) + "\n ") : '') + "\n \n"); -}; - -var WORKSHEET = function (ref) { - var frozenColumns = ref.frozenColumns; - var frozenRows = ref.frozenRows; - var columns = ref.columns; - var defaults = ref.defaults; - var data = ref.data; - var index = ref.index; - var mergeCells = ref.mergeCells; - var autoFilter = ref.autoFilter; - var filter = ref.filter; - var showGridLines = ref.showGridLines; - var hyperlinks = ref.hyperlinks; - var validations = ref.validations; - var defaultCellStyleId = ref.defaultCellStyleId; - var rtl = ref.rtl; - - return (XMLHEAD + "\n\n \n\n \n \n " + (frozenRows || frozenColumns ? ("\n ") : '') + "\n \n \n\n \n\n " + (defaultCellStyleId != null || (columns && columns.length > 0) ? ("\n \n " + (!columns || !columns.length ? ("\n
  • ") : '') + "\n " + (foreach(columns, function (column, ci) { - var columnIndex = typeof column.index === "number" ? column.index + 1 : (ci + 1); - if (column.width === 0) { - return (""); - } - return (""); - })) + "\n ") : '') + "\n\n \n " + (foreach(data, function (row, ri) { - var rowIndex = typeof row.index === "number" ? row.index + 1 : (ri + 1); - return ("\n \n " + (foreach(row.data, function (cell) { return ("\n \n " + (cell.formula != null ? writeFormula(cell.formula) : '') + "\n " + (cell.value != null ? ("" + (ESC(cell.value)) + "") : '') + "\n "); })) + "\n \n ");})) + "\n \n\n " + (autoFilter ? ("") - : filter ? spreadsheetFilters(filter) : '') + "\n\n " + (mergeCells.length ? ("\n \n " + (foreach(mergeCells, function (ref) { return (""); })) + "\n ") : '') + "\n\n " + (validations.length ? ("\n \n " + (foreach(validations, function (val) { return ("\n \n " + (val.formula1 ? ("" + (ESC(val.formula1)) + "") : '') + "\n " + (val.formula2 ? ("" + (ESC(val.formula2)) + "") : '') + "\n "); })) + "\n ") : '') + "\n\n " + (hyperlinks.length ? ("\n \n " + (foreach(hyperlinks, function (link, hi) { return ("\n "); })) + "\n ") : '') + "\n\n \n"); -}; - -var WORKBOOK_RELS = function (ref) { - var count = ref.count; - - return (XMLHEAD + "\n\n " + (repeat(count, function (idx) { return ("\n "); })) + "\n \n \n"); -}; - -var WORKSHEET_RELS = function (ref) { - var hyperlinks = ref.hyperlinks; - - return (XMLHEAD + "\n\n " + (foreach(hyperlinks, function (link, i) { return ("\n "); })) + "\n"); -}; - -var SHARED_STRINGS = function (ref) { - var count = ref.count; - var uniqueCount = ref.uniqueCount; - var indexes = ref.indexes; - - return (XMLHEAD + "\n\n " + (foreach(Object.keys(indexes), function (index) { return ("\n " + (ESC(index.substring(1))) + ""); })) + "\n"); -}; - -var STYLES = function (ref) { - var formats = ref.formats; - var fonts = ref.fonts; - var fills = ref.fills; - var borders = ref.borders; - var styles = ref.styles; - - return (XMLHEAD + "\n\n \n " + (foreach(formats, function (format, fi) { return ("\n "); })) + "\n \n \n \n \n \n \n \n \n \n " + (foreach(fonts, function (font) { return ("\n \n \n " + (font.bold ? '' : '') + "\n " + (font.italic ? '' : '') + "\n " + (font.underline ? '' : '') + "\n " + (font.color ? ("") : '') + "\n " + (font.fontFamily ? ("\n \n \n ") : "\n \n \n \n ") + "\n "); })) + "\n \n \n \n \n " + (foreach(fills, function (fill) { return ("\n " + (fill.background ? ("\n \n \n \n \n \n ") : '')); })) + "\n \n \n \n " + (foreach(borders, borderTemplate)) + "\n \n \n \n \n \n \n " + (foreach(styles, function (style) { return ("\n \n " + (style.textAlign || style.verticalAlign || style.wrap ? ("\n \n ") : '') + "\n \n "); })) + "\n \n \n \n \n \n \n"); -}; - -function writeFormula(formula) { - if (typeof formula == "string") { - return ("" + (ESC(formula)) + ""); - } - // array formulas - return ("" + (ESC(formula.src)) + ""); -} - -function numChar(colIndex) { - var letter = Math.floor(colIndex / 26) - 1; - - return (letter >= 0 ? numChar(letter) : "") + String.fromCharCode(65 + (colIndex % 26)); -} - -function ref(rowIndex, colIndex) { - return numChar(colIndex) + (rowIndex + 1); -} - -function $ref(rowIndex, colIndex) { - return "$" + numChar(colIndex) + "$" + (rowIndex + 1); -} - -function filterRowIndex(options) { - var frozenRows = options.frozenRows || (options.freezePane || {}).rowSplit || 1; - return frozenRows - 1; -} - -function toWidth(px) { - return ((px / 7) * 100 + 0.5) / 100; -} - -function toHeight(px) { - return px * 0.75; -} - -function stripFunnyChars(value) { - return String(value) - .replace(/[\x00-\x08]/g, "") - .replace(/\n/g, "\r\n"); -} - -var DATE_EPOCH = new Date(1900, 0, 0); - -var Worksheet = function Worksheet(options, sharedStrings, styles, borders) { - this.options = options; - this._strings = sharedStrings; - this._styles = styles; - this._borders = borders; - this._validations = {}; - }; - - Worksheet.prototype.relsToXML = function relsToXML () { - var hyperlinks = this.options.hyperlinks || []; - if (!hyperlinks.length) { - return ""; - } - - return WORKSHEET_RELS({ hyperlinks: hyperlinks }); - }; - - Worksheet.prototype.toXML = function toXML (index) { - var this$1 = this; - - var mergeCells = this.options.mergedCells || []; - var rows = this.options.rows || []; - var data = inflate(rows, mergeCells); - - this._readCells(data); - - var autoFilter = this.options.filter; - var filter; - if (autoFilter && (typeof autoFilter.from === "number") && (typeof autoFilter.to === "number")) { - // Grid enables auto filter - autoFilter = { - from: ref(filterRowIndex(this.options), autoFilter.from), - to: ref(filterRowIndex(this.options), autoFilter.to) - }; - } else if (autoFilter && autoFilter.ref && autoFilter.columns) { - // this is probably from the Spreadsheet - filter = autoFilter; - autoFilter = null; - } - - var validations = []; - for (var i in this$1._validations) { - if (Object.prototype.hasOwnProperty.call(this$1._validations, i)) { - validations.push(this$1._validations[i]); - } - } - - var defaultCellStyleId = null; - if (this.options.defaultCellStyle) { - defaultCellStyleId = this._lookupStyle(this.options.defaultCellStyle); - } - - var freezePane = this.options.freezePane || {}; - var defaults = this.options.defaults || {}; - return WORKSHEET({ - frozenColumns: this.options.frozenColumns || freezePane.colSplit, - frozenRows: this.options.frozenRows || freezePane.rowSplit, - columns: this.options.columns, - defaults: defaults, - data: data, - index: index, - mergeCells: mergeCells, - autoFilter: autoFilter, - filter: filter, - showGridLines: this.options.showGridLines, - hyperlinks: this.options.hyperlinks || [], - validations: validations, - defaultCellStyleId: defaultCellStyleId, - rtl: this.options.rtl !== undefined ? this.options.rtl : defaults.rtl - }); - }; - - Worksheet.prototype._lookupString = function _lookupString (value) { - var key = "$" + value; - var index = this._strings.indexes[key]; - var result; - - if (index !== undefined) { - result = index; - } else { - result = this._strings.indexes[key] = this._strings.uniqueCount; - this._strings.uniqueCount ++; - } - - this._strings.count ++; - - return result; - }; - - Worksheet.prototype._lookupStyle = function _lookupStyle (style) { - var json = JSON.stringify(style); - - if (json === "{}") { - return 0; - } - - var index = indexOf(json, this._styles); - - if (index < 0) { - index = this._styles.push(json) - 1; - } - - // There is one default style - return index + 1; - }; - - Worksheet.prototype._lookupBorder = function _lookupBorder (border) { - var json = JSON.stringify(border); - if (json === "{}") { - return; - } - - var index = indexOf(json, this._borders); - if (index < 0) { - index = this._borders.push(json) - 1; - } - - // There is one default border - return index + 1; - }; - - Worksheet.prototype._readCells = function _readCells (rowData) { - var this$1 = this; - - for (var i = 0; i < rowData.length; i++) { - var row = rowData[i]; - var cells = row.cells; - - row.data = []; - - for (var j = 0; j < cells.length; j++) { - var cellData = this$1._cell(cells[j], row.index, j); - if (cellData) { - row.data.push(cellData); - } - } - } - }; - - Worksheet.prototype._cell = function _cell (data, rowIndex, cellIndex) { - if (!data || data === EMPTY_CELL) { - return null; - } - - var value = data.value; - - var border = {}; - - if (data.borderLeft) { - border.left = data.borderLeft; - } - - if (data.borderRight) { - border.right = data.borderRight; - } - - if (data.borderTop) { - border.top = data.borderTop; - } - - if (data.borderBottom) { - border.bottom = data.borderBottom; - } - - border = this._lookupBorder(border); - - var defStyle = this.options.defaultCellStyle || {}; - var style = { borderId: border }; - - (function(add) { - add("color"); - add("background"); - add("bold"); - add("italic"); - add("underline"); - if (!add("fontFamily")) { add("fontName", "fontFamily"); } - add("fontSize"); - add("format"); - if (!add("textAlign")) { add("hAlign", "textAlign"); } - if (!add("verticalAlign")) { add("vAlign", "verticalAlign"); } - add("wrap"); - })( - function(prop, target) { - var val = data[prop]; - if (val === undefined) { - val = defStyle[prop]; - } - if (val !== undefined) { - style[target || prop] = val; - return true; - } - } - ); - - var columns = this.options.columns || []; - - var column = columns[cellIndex]; - var type = typeof value; - - if (column && column.autoWidth) { - var displayValue = value; - - // XXX: let's not bring kendo.toString in only for this. - // better wait until the spreadsheet engine is available as a separate - // component, then we can use a real Excel-like formatter. - // - if (type === "number") { - // kendo.toString will not behave exactly like the Excel format - // Still, it's the best we have available for estimating the character count. - displayValue = __WEBPACK_IMPORTED_MODULE_2__services_intl_service__["a" /* default */].toString(value, data.format); - } - - column.width = Math.max(column.width || 0, String(displayValue).length); - } - - if (type === "string") { - value = stripFunnyChars(value); - value = this._lookupString(value); - type = "s"; - } else if (type === "number") { - type = "n"; - } else if (type === "boolean") { - type = "b"; - value = Number(value); - } else if (value && value.getTime) { - type = null; - - var offset = (value.getTimezoneOffset() - DATE_EPOCH.getTimezoneOffset()) * MS_PER_MINUTE; - value = (value - DATE_EPOCH - offset) / MS_PER_DAY + 1; - - if (!style.format) { - style.format = "mm-dd-yy"; - } - } else { - type = null; - value = null; - } - - style = this._lookupStyle(style); - - var cellName = ref(rowIndex, cellIndex); - - if (data.validation) { - this._addValidation(data.validation, cellName); - } - - return { - value: value, - formula: data.formula, - type: type, - style: style, - ref: cellName - }; - }; - - Worksheet.prototype._addValidation = function _addValidation (v, ref) { - var tmp = { - showErrorMessage : v.type === "reject" ? 1 : 0, - formula1 : v.from, - formula2 : v.to, - type : MAP_EXCEL_TYPE[v.dataType] || v.dataType, - operator : MAP_EXCEL_OPERATOR[v.comparerType] || v.comparerType, - allowBlank : v.allowNulls ? 1 : 0, - showDropDown : v.showButton ? 0 : 1, // LOL, Excel! - error : v.messageTemplate, - errorTitle : v.titleTemplate - }; - var json = JSON.stringify(tmp); - if (!this._validations[json]) { - this._validations[json] = tmp; - tmp.sqref = []; - } - this._validations[json].sqref.push(ref); - }; - -var MAP_EXCEL_OPERATOR = { - // includes only what differs; key is our operator, value is Excel - // operator. - greaterThanOrEqualTo : "greaterThanOrEqual", - lessThanOrEqualTo : "lessThanOrEqual" -}; - -var MAP_EXCEL_TYPE = { - number: "decimal" -}; - -var defaultFormats = { - "General": 0, - "0": 1, - "0.00": 2, - "#,##0": 3, - "#,##0.00": 4, - "0%": 9, - "0.00%": 10, - "0.00E+00": 11, - "# ?/?": 12, - "# ??/??": 13, - "mm-dd-yy": 14, - "d-mmm-yy": 15, - "d-mmm": 16, - "mmm-yy": 17, - "h:mm AM/PM": 18, - "h:mm:ss AM/PM": 19, - "h:mm": 20, - "h:mm:ss": 21, - "m/d/yy h:mm": 22, - "#,##0 ;(#,##0)": 37, - "#,##0 ;[Red](#,##0)": 38, - "#,##0.00;(#,##0.00)": 39, - "#,##0.00;[Red](#,##0.00)": 40, - "mm:ss": 45, - "[h]:mm:ss": 46, - "mmss.0": 47, - "##0.0E+0": 48, - "@": 49, - "[$-404]e/m/d": 27, - "m/d/yy": 30, - "t0": 59, - "t0.00": 60, - "t#,##0": 61, - "t#,##0.00": 62, - "t0%": 67, - "t0.00%": 68, - "t# ?/?": 69, - "t# ??/??": 70 -}; - -function convertColor(value) { - var color = value; - if (color.length < 6) { - color = color.replace(/(\w)/g, function($0, $1) { - return $1 + $1; - }); - } - - color = color.substring(1).toUpperCase(); - - if (color.length < 8) { - color = "FF" + color; - } - - return color; -} - -var Workbook = function Workbook(options) { - var this$1 = this; - - this.options = options || {}; - this._strings = { - indexes: {}, - count: 0, - uniqueCount: 0 - }; - this._styles = []; - this._borders = []; - - this._sheets = Object(__WEBPACK_IMPORTED_MODULE_0__utils_map__["a" /* default */])(this.options.sheets || [], function (options) { - options.defaults = this$1.options; - return new Worksheet(options, this$1._strings, this$1._styles, this$1._borders); - }); - }; - - Workbook.prototype.toZIP = function toZIP () { - var this$1 = this; - - var zip = Object(__WEBPACK_IMPORTED_MODULE_1__utils_create_zip__["a" /* default */])(); - - var docProps = zip.folder("docProps"); - - docProps.file("core.xml", CORE({ - creator: this.options.creator || "Kendo UI", - lastModifiedBy: this.options.creator || "Kendo UI", - created: this.options.date || new Date().toJSON(), - modified: this.options.date || new Date().toJSON() - })); - - var sheetCount = this._sheets.length; - - docProps.file("app.xml", APP({ sheets: this._sheets })); - - var rels = zip.folder("_rels"); - rels.file(".rels", RELS); - - var xl = zip.folder("xl"); - - var xlRels = xl.folder("_rels"); - xlRels.file("workbook.xml.rels", WORKBOOK_RELS({ count: sheetCount })); - - var sheetIds = {}; - - xl.file("workbook.xml", WORKBOOK({ - sheets: this._sheets, - filterNames: Object(__WEBPACK_IMPORTED_MODULE_0__utils_map__["a" /* default */])(this._sheets, function(sheet, index) { - var options = sheet.options; - var sheetName = (options.name || options.title || "Sheet" + (index + 1)); - sheetIds[sheetName.toLowerCase()] = index; - var filter = options.filter; - if (filter) { - if (filter.ref) { - // spreadsheet provides `ref` - var a = filter.ref.split(":"); - var from = parseRef(a[0]); - var to = parseRef(a[1]); - return { - localSheetId: index, - name: sheetName, - from: $ref(from.row, from.col), - to: $ref(to.row, to.col) - }; - } else if (typeof filter.from !== "undefined" && typeof filter.to !== "undefined") { - // grid does this - return { - localSheetId: index, - name: sheetName, - from: $ref(filterRowIndex(options), filter.from), - to: $ref(filterRowIndex(options), filter.to) - }; - } - } - }), - userNames: Object(__WEBPACK_IMPORTED_MODULE_0__utils_map__["a" /* default */])(this.options.names || [], function(def) { - return { - name: def.localName, - localSheetId: def.sheet ? sheetIds[def.sheet.toLowerCase()] : null, - value: def.value, - hidden: def.hidden - }; - }) - })); - - var worksheets = xl.folder("worksheets"); - - var sheetRels = worksheets.folder("_rels"); - - for (var idx = 0; idx < sheetCount; idx++) { - var sheet = this$1._sheets[idx]; - var sheetName = "sheet" + (idx + 1) + ".xml"; - var relsXml = sheet.relsToXML(); - - if (relsXml) { - sheetRels.file(sheetName + ".rels", relsXml); - } - - worksheets.file(sheetName, sheet.toXML(idx)); - } - - var borders = Object(__WEBPACK_IMPORTED_MODULE_0__utils_map__["a" /* default */])(this._borders, parseJSON); - - var styles = Object(__WEBPACK_IMPORTED_MODULE_0__utils_map__["a" /* default */])(this._styles, parseJSON); - - var hasFont = function(style) { - return style.underline || style.bold || style.italic || style.color || style.fontFamily || style.fontSize; - }; - - var fonts = Object(__WEBPACK_IMPORTED_MODULE_0__utils_map__["a" /* default */])(styles, function(style) { - if (style.color) { - style.color = convertColor(style.color); - } - - if (hasFont(style)) { - return style; - } - }); - - var formats = Object(__WEBPACK_IMPORTED_MODULE_0__utils_map__["a" /* default */])(styles, function(style) { - if (style.format && defaultFormats[style.format] === undefined) { - return style; - } - }); - - var fills = Object(__WEBPACK_IMPORTED_MODULE_0__utils_map__["a" /* default */])(styles, function(style) { - if (style.background) { - style.background = convertColor(style.background); - return style; - } - }); - - xl.file("styles.xml", STYLES({ - fonts: fonts, - fills: fills, - formats: formats, - borders: borders, - styles: Object(__WEBPACK_IMPORTED_MODULE_0__utils_map__["a" /* default */])(styles, function(style) { - var result = {}; - - if (hasFont(style)) { - result.fontId = indexOf(style, fonts) + 1; - } - - if (style.background) { - result.fillId = indexOf(style, fills) + 2; - } - - result.textAlign = style.textAlign; - result.verticalAlign = style.verticalAlign; - result.wrap = style.wrap; - result.borderId = style.borderId; - - if (style.format) { - if (defaultFormats[style.format] !== undefined) { - result.numFmtId = defaultFormats[style.format]; - } else { - result.numFmtId = 165 + indexOf(style, formats); - } - } - - return result; - }) - })); - - xl.file("sharedStrings.xml", SHARED_STRINGS(this._strings)); - - zip.file("[Content_Types].xml", CONTENT_TYPES( { count: sheetCount })); - - return zip; - }; - - Workbook.prototype.toDataURL = function toDataURL$1 () { - var zip = this.toZIP(); - - return zip.generateAsync ? zip.generateAsync(DATA_URL_OPTIONS).then(toDataURL) : toDataURL(zip.generate(DATA_URL_OPTIONS)); - }; - -function borderStyle(width) { - var alias = "thin"; - - if (width === 2) { - alias = "medium"; - } else if (width === 3) { - alias = "thick"; - } - - return alias; -} - -function borderSideTemplate(name, style) { - var result = ""; - - if (style) { - result += "<" + name + " style=\"" + borderStyle(style.size) + "\">"; - if (style.color) { - result += ""; - } - result += ""; - } - - return result; -} - -function borderTemplate(border) { - return "" + - borderSideTemplate("left", border.left) + - borderSideTemplate("right", border.right) + - borderSideTemplate("top", border.top) + - borderSideTemplate("bottom", border.bottom) + - ""; -} - -var EMPTY_CELL = {}; -function inflate(rows, mergedCells) { - var rowData = []; - var rowsByIndex = []; - - indexRows(rows, function(row, index) { - var data = { - _source: row, - index: index, - height: row.height, - cells: [] - }; - - rowData.push(data); - rowsByIndex[index] = data; - }); - - var sorted = sortByIndex(rowData).slice(0); - var ctx = { - rowData: rowData, - rowsByIndex: rowsByIndex, - mergedCells: mergedCells - }; - - for (var i = 0; i < sorted.length; i++) { - fillCells(sorted[i], ctx); - delete sorted[i]._source; - } - - return sortByIndex(rowData); -} - -function indexRows(rows, callback) { - for (var i = 0; i < rows.length; i++) { - var row = rows[i]; - if (!row) { - continue; - } - - var index = row.index; - if (typeof index !== "number") { - index = i; - } - - callback(row, index); - } -} - -function sortByIndex(items) { - return items.sort(function(a, b) { - return a.index - b.index; - }); -} - -function pushUnique(array, el) { - if (array.indexOf(el) < 0) { - array.push(el); - } -} - -function getSpan(mergedCells, ref) { - for (var i = 0; i < mergedCells.length; ++i) { - var range = mergedCells[i]; - var a = range.split(":"); - var topLeft = a[0]; - if (topLeft === ref) { - var bottomRight = a[1]; - topLeft = parseRef(topLeft); - bottomRight = parseRef(bottomRight); - return { - rowSpan: bottomRight.row - topLeft.row + 1, - colSpan: bottomRight.col - topLeft.col + 1 - }; - } - } -} - -function parseRef(ref) { - function getcol(str) { - var upperStr = str.toUpperCase(); - var col = 0; - for (var i = 0; i < upperStr.length; ++i) { - col = col * 26 + upperStr.charCodeAt(i) - 64; - } - return col - 1; - } - - function getrow(str) { - return parseInt(str, 10) - 1; - } - - var m = /^([a-z]+)(\d+)$/i.exec(ref); - return { - row: getrow(m[2]), - col: getcol(m[1]) - }; -} - -function fillCells(data, ctx) { - var row = data._source; - var rowIndex = data.index; - var cells = row.cells; - var cellData = data.cells; - - if (!cells) { - return; - } - - for (var i = 0; i < cells.length; i++) { - var cell = cells[i] || EMPTY_CELL; - - var rowSpan = cell.rowSpan || 1; - var colSpan = cell.colSpan || 1; - - var cellIndex = insertCell(cellData, cell); - var topLeftRef = ref(rowIndex, cellIndex); - - if (rowSpan === 1 && colSpan === 1) { - // could still be merged: the spreadsheet does not send - // rowSpan/colSpan, but mergedCells is already populated. - // https://github.com/telerik/kendo-ui-core/issues/2401 - var tmp = getSpan(ctx.mergedCells, topLeftRef); - if (tmp) { - colSpan = tmp.colSpan; - rowSpan = tmp.rowSpan; - } - } - - spanCell(cell, cellData, cellIndex, colSpan); - - if (rowSpan > 1 || colSpan > 1) { - pushUnique(ctx.mergedCells, - topLeftRef + ":" + ref(rowIndex + rowSpan - 1, - cellIndex + colSpan - 1)); - } - - if (rowSpan > 1) { - for (var ri = rowIndex + 1; ri < rowIndex + rowSpan; ri++) { - var nextRow = ctx.rowsByIndex[ri]; - if (!nextRow) { - nextRow = ctx.rowsByIndex[ri] = { index: ri, cells: [] }; - ctx.rowData.push(nextRow); - } - - spanCell(cell, nextRow.cells, cellIndex - 1, colSpan + 1); - } - } - } -} - -function insertCell(data, cell) { - var index; - - if (typeof cell.index === "number") { - index = cell.index; - insertCellAt(data, cell, cell.index); - } else { - index = appendCell(data, cell); - } - - return index; -} - -function insertCellAt(data, cell, index) { - data[index] = cell; -} - -function appendCell(data, cell) { - var index = data.length; - - for (var i = 0; i < data.length + 1; i++) { - if (!data[i]) { - data[i] = cell; - index = i; - break; - } - } - - return index; -} - -function spanCell(cell, row, startIndex, colSpan) { - for (var i = 1; i < colSpan; i++) { - var tmp = { - borderTop : cell.borderTop, - borderRight : cell.borderRight, - borderBottom : cell.borderBottom, - borderLeft : cell.borderLeft - }; - insertCellAt(row, tmp, startIndex + i); - } -} - -var SPREADSHEET_FILTERS = function (ref$1) { - var ref = ref$1.ref; - var columns = ref$1.columns; - var generators = ref$1.generators; - - return ("\n\n " + (foreach(columns, function (col) { return ("\n \n " + (generators[col.filter](col)) + "\n \n "); })) + "\n"); -}; - -var SPREADSHEET_CUSTOM_FILTER = function (ref) { - var logic = ref.logic; - var criteria = ref.criteria; - - return ("\n\n" + (foreach(criteria, function (f) { - var op = spreadsheetFilters.customOperator(f); - var val = spreadsheetFilters.customValue(f); - return (""); -})) + "\n"); -}; - -var SPREADSHEET_DYNAMIC_FILTER = function (ref) { - var type = ref.type; - - return (""); -}; - -var SPREADSHEET_TOP_FILTER = function (ref) { - var type = ref.type; - var value = ref.value; - - return (""); -}; - -var SPREADSHEET_VALUE_FILTER = function (ref) { - var blanks = ref.blanks; - var values = ref.values; - - return ("\n " + (foreach(values, function (value) { return ("\n "); })) + "\n "); -}; - -function spreadsheetFilters(filter) { - return SPREADSHEET_FILTERS({ - ref: filter.ref, - columns: filter.columns, - generators: { - custom : SPREADSHEET_CUSTOM_FILTER, - dynamic : SPREADSHEET_DYNAMIC_FILTER, - top : SPREADSHEET_TOP_FILTER, - value : SPREADSHEET_VALUE_FILTER - } - }); -} - -spreadsheetFilters.customOperator = function(f) { - return { - eq : "equal", - gt : "greaterThan", - gte : "greaterThanOrEqual", - lt : "lessThan", - lte : "lessThanOrEqual", - ne : "notEqual", - - // These are not in the spec, but seems to be how Excel does - // it (see customValue below). For the non-negated versions, - // the operator attribute is missing completely. - doesnotstartwith: "notEqual", - doesnotendwith: "notEqual", - doesnotcontain: "notEqual", - doesnotmatch: "notEqual" - }[f.operator.toLowerCase()]; -}; - -spreadsheetFilters.customValue = function(f) { - function esc(str) { - return str.replace(/([*?])/g, "~$1"); - } - - switch (f.operator.toLowerCase()) { - case "startswith": - case "doesnotstartwith": - return esc(f.value) + "*"; - - case "endswith": - case "doesnotendwith": - return "*" + esc(f.value); - - case "contains": - case "doesnotcontain": - return "*" + esc(f.value) + "*"; - - default: - return f.value; - } -}; - -spreadsheetFilters.dynamicFilterType = function(type) { - return { - quarter1 : "Q1", - quarter2 : "Q2", - quarter3 : "Q3", - quarter4 : "Q4", - january : "M1", - february : "M2", - march : "M3", - april : "M4", - may : "M5", - june : "M6", - july : "M7", - august : "M8", - september : "M9", - october : "M10", - november : "M11", - december : "M12" - }[type.toLowerCase()] || type; -}; - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-ooxml/dist/es/services.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__services_intl_service__ = __webpack_require__("../../../../@progress/kendo-ooxml/dist/es/services/intl-service.js"); -/* unused harmony reexport IntlService */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__services_template_service__ = __webpack_require__("../../../../@progress/kendo-ooxml/dist/es/services/template-service.js"); -/* unused harmony reexport TemplateService */ - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-ooxml/dist/es/services/intl-service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var current = { - toString: function (value) { return value; } -}; - -var IntlService = function IntlService () {}; - -IntlService.register = function register (userImplementation) { - current = userImplementation; -}; - -IntlService.toString = function toString (value, format) { - return current.toString(value, format); -}; - -/* harmony default export */ __webpack_exports__["a"] = (IntlService); - -/***/ }), - -/***/ "../../../../@progress/kendo-ooxml/dist/es/services/template-service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var current = { - compile: function(template) { - return template; - } -}; - -var TemplateService = function TemplateService () {}; - -TemplateService.register = function register (userImplementation) { - current = userImplementation; -}; - -TemplateService.compile = function compile (template) { - return current.compile(template); -}; - -/* harmony default export */ __webpack_exports__["a"] = (TemplateService); - -/***/ }), - -/***/ "../../../../@progress/kendo-ooxml/dist/es/utils/create-zip.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = createZip; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jszip_dist_jszip__ = __webpack_require__("../../../../jszip/dist/jszip.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jszip_dist_jszip___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jszip_dist_jszip__); - - -function createZip() { - return new __WEBPACK_IMPORTED_MODULE_0_jszip_dist_jszip___default.a(); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-ooxml/dist/es/utils/getter.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = getter; -var FIELD_REGEX = /\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g; -var getterCache = {}; -var UNDEFINED = 'undefined'; - -getterCache[UNDEFINED] = function(obj) { - return obj; -}; - -function getter(field) { - if (getterCache[field]) { - return getterCache[field]; - } - - var fields = []; - field.replace(FIELD_REGEX, function(match, index, indexAccessor, field) { - fields.push(typeof index !== UNDEFINED ? index : (indexAccessor || field)); - }); - - getterCache[field] = function(obj) { - var result = obj; - for (var idx = 0; idx < fields.length && result; idx++) { - result = result[fields[idx]]; - } - - return result; - }; - - return getterCache[field]; -} - -/***/ }), - -/***/ "../../../../@progress/kendo-ooxml/dist/es/utils/map.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = map; -function map(array, func) { - return array.reduce(function (result, el, i) { - var val = func(el, i); - if (val != null) { - result.push(val); - } - return result; - }, []); -} - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/add-scroll.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = addScroll; -function addScroll(rect, scroll) { - return { - top: rect.top + scroll.y, - left: rect.left + scroll.x, - height: rect.height, - width: rect.width - }; -} - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/align-point.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony default export */ __webpack_exports__["a"] = ({ - "bottom": "bottom", - "center": "center", - "middle": "middle", - "left": "left", - "right": "right", - "top": "top" -}); - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/align.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__align_point__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/align-point.js"); - - -var align = function (options) { - var anchorRect = options.anchorRect; - var anchorAlign = options.anchorAlign; - var elementRect = options.elementRect; - var elementAlign = options.elementAlign; - var margin = options.margin; if ( margin === void 0 ) margin = {}; - var anchorHorizontal = anchorAlign.horizontal; - var anchorVertical = anchorAlign.vertical; - var elementHorizontal = elementAlign.horizontal; - var elementVertical = elementAlign.vertical; - - var horizontalMargin = margin.horizontal || 0; - var verticalMargin = margin.vertical || 0; - - var top = anchorRect.top; - var left = anchorRect.left; - - if (anchorVertical === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].bottom) { - top += anchorRect.height; - } - - if (anchorVertical === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].center || anchorVertical === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].middle) { - top += Math.round(anchorRect.height / 2); - } - - if (elementVertical === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].bottom) { - top -= elementRect.height; - verticalMargin *= -1; - } - - if (elementVertical === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].center || elementVertical === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].middle) { - top -= Math.round(elementRect.height / 2); - verticalMargin *= -1; - } - - if (anchorHorizontal === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].right) { - left += anchorRect.width; - } - - if (anchorHorizontal === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].center || anchorHorizontal === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].middle) { - left += Math.round(anchorRect.width / 2); - } - - if (elementHorizontal === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].right) { - left -= elementRect.width; - horizontalMargin *= -1; - } - - if (elementHorizontal === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].center || elementHorizontal === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].middle) { - left -= Math.round(elementRect.width / 2); - horizontalMargin *= -1; - } - - return { - top: top + verticalMargin, - left: left + horizontalMargin - }; -}; - -/* harmony default export */ __webpack_exports__["a"] = (align); - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/apply-location-offset.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = applyLocationOffset; -function applyLocationOffset(rect, location, isOffsetBody) { - var top = rect.top; - var left = rect.left; - - if (isOffsetBody) { - left = 0; - top = 0; - } - - return { - top: top + location.top, - left: left + location.left, - height: rect.height, - width: rect.width - }; -} - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/bounding-offset.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var boundingOffset = function (element) { - if (!element.getBoundingClientRect) { - return { - bottom: element.innerHeight, - left: 0, - right: element.innerWidth, - top: 0 - }; - } - - var ref = element.getBoundingClientRect(); - var bottom = ref.bottom; - var left = ref.left; - var right = ref.right; - var top = ref.top; - - return { - bottom: bottom, - left: left, - right: right, - top: top - }; -}; - -/* harmony default export */ __webpack_exports__["a"] = (boundingOffset); - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/collision.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony default export */ __webpack_exports__["a"] = ({ - "fit": "fit", - "flip": "flip" -}); - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/document.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var getDocument = function (element) { return ( element.ownerDocument.documentElement ); }; - -/* harmony default export */ __webpack_exports__["a"] = (getDocument); - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/element-scroll-position.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scroll_position__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/scroll-position.js"); - - -/* harmony default export */ __webpack_exports__["a"] = (function (element) { - if (element === (element.ownerDocument || {}).body) { - return Object(__WEBPACK_IMPORTED_MODULE_0__scroll_position__["a" /* default */])(element); - } - - return { - x: element.scrollLeft, - y: element.scrollTop - }; -});; - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/is-body-offset.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__offset_parent__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/offset-parent.js"); - - -var isBodyOffset = function (element) { return (Object(__WEBPACK_IMPORTED_MODULE_0__offset_parent__["a" /* default */])(element) === element.ownerDocument.body); }; - -/* harmony default export */ __webpack_exports__["a"] = (isBodyOffset); - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/main.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__align__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/align.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__align__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__add_scroll__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/add-scroll.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__add_scroll__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__apply_location_offset__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/apply-location-offset.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__apply_location_offset__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__bounding_offset__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/bounding-offset.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_3__bounding_offset__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__is_body_offset__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/is-body-offset.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_4__is_body_offset__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__offset_parent__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/offset-parent.js"); -/* unused harmony reexport offsetParent */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__offset__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/offset.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_6__offset__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__parents__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/parents.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_7__parents__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__parent_scroll_position__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/parent-scroll-position.js"); -/* unused harmony reexport parentScrollPosition */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__position__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/position.js"); -/* unused harmony reexport position */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__position_with_scroll__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/position-with-scroll.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_10__position_with_scroll__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__remove_scroll__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/remove-scroll.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_11__remove_scroll__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__restrict_to_view__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/restrict-to-view.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_12__restrict_to_view__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__scroll_position__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/scroll-position.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_13__scroll_position__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__sibling_container__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/sibling-container.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_14__sibling_container__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__siblings__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/siblings.js"); -/* unused harmony reexport siblings */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__document__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/document.js"); -/* unused harmony reexport getDocumentElement */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__window__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/window.js"); -/* unused harmony reexport getWindow */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__window_viewport__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/window-viewport.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_18__window_viewport__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__align_point__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/align-point.js"); -/* unused harmony reexport AlignPoint */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__collision__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/collision.js"); -/* unused harmony reexport Collision */ - - - - - - - - - - - - - - - - - - - - - - - - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/offset-parent-scroll-position.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__element_scroll_position__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/element-scroll-position.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__parent_scroll_position__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/parent-scroll-position.js"); - - - -/* harmony default export */ __webpack_exports__["a"] = (function (offsetParentElement, element) { return ( // eslint-disable-line no-arrow-condition - offsetParentElement ? Object(__WEBPACK_IMPORTED_MODULE_0__element_scroll_position__["a" /* default */])(offsetParentElement) : Object(__WEBPACK_IMPORTED_MODULE_1__parent_scroll_position__["a" /* default */])(element) -); });; - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/offset-parent.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__document__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/document.js"); - - -var offsetParent = function (element) { - var offsetParent = element.offsetParent; - - while (offsetParent && offsetParent.style.position === "static") { - offsetParent = offsetParent.offsetParent; - } - - return offsetParent || Object(__WEBPACK_IMPORTED_MODULE_0__document__["a" /* default */])(element); -}; - -/* harmony default export */ __webpack_exports__["a"] = (offsetParent); - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/offset.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var rectOfHiddenElement = function (element) { - var ref = element.style; - var display = ref.display; - var left = ref.left; - var position = ref.position; - - element.style.display = ''; - element.style.left = '-10000px'; - element.style.position = 'absolute'; - - var rect = element.getBoundingClientRect(); - - element.style.display = display; - element.style.left = left; - element.style.position = position; - - return rect; -}; - -var offset = function (element) { - var rect = element.getBoundingClientRect(); - var left = rect.left; - var top = rect.top; - - if (!rect.height && !rect.width) { - rect = rectOfHiddenElement(element); - } - - return { - top: top, - left: left, - height: rect.height, - width: rect.width - }; -}; - -/* harmony default export */ __webpack_exports__["a"] = (offset); - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/parent-scroll-position.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = parentScrollPosition; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__offset_parent__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/offset-parent.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__element_scroll_position__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/element-scroll-position.js"); - - - -function parentScrollPosition(element) { - var parent = Object(__WEBPACK_IMPORTED_MODULE_0__offset_parent__["a" /* default */])(element); - - return parent ? Object(__WEBPACK_IMPORTED_MODULE_1__element_scroll_position__["a" /* default */])(parent) : { x: 0, y: 0 }; -} - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/parents.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony default export */ __webpack_exports__["a"] = (function (element, until) { - var result = []; - var next = element.parentNode; - - while (next) { - result.push(next); - - if (next === until) { break; } - - next = next.parentNode; - } - - return result; -});; - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/position-with-scroll.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__offset_parent_scroll_position__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/offset-parent-scroll-position.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__offset_parent__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/offset-parent.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__position__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/position.js"); - - - - -/* harmony default export */ __webpack_exports__["a"] = (function (element, parent) { - var offsetParentElement = parent ? Object(__WEBPACK_IMPORTED_MODULE_1__offset_parent__["a" /* default */])(parent) : null; - var ref = Object(__WEBPACK_IMPORTED_MODULE_2__position__["a" /* default */])(element, offsetParentElement); - var top = ref.top; - var left = ref.left; - var height = ref.height; - var width = ref.width; - var ref$1 = Object(__WEBPACK_IMPORTED_MODULE_0__offset_parent_scroll_position__["a" /* default */])(offsetParentElement, element); - var x = ref$1.x; - var y = ref$1.y; - - return { - top: top + y, - left: left + x, - height: height, - width: width - }; -});; - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/position.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__offset_parent__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/offset-parent.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__offset__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/offset.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__window__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/window.js"); - - - - -var position = function (element, parent) { - var win = Object(__WEBPACK_IMPORTED_MODULE_2__window__["a" /* default */])(element); - var elementStyles = win.getComputedStyle(element); - var offset = Object(__WEBPACK_IMPORTED_MODULE_1__offset__["a" /* default */])(element); - var parentElement = parent || Object(__WEBPACK_IMPORTED_MODULE_0__offset_parent__["a" /* default */])(element); - - var ownerDocument = element.ownerDocument; - var useRelative = parentElement !== ownerDocument.body && parentElement !== ownerDocument.documentElement; - - var parentOffset = { top: 0, left: 0 }; - - if (elementStyles.position !== "fixed" && useRelative) { - var parentStyles = win.getComputedStyle(parentElement); - - parentOffset = Object(__WEBPACK_IMPORTED_MODULE_1__offset__["a" /* default */])(parentElement); - parentOffset.top += parseInt(parentStyles.borderTopWidth, 10); - parentOffset.left += parseInt(parentStyles.borderLeftWidth, 10); - } - - return { - top: offset.top - parentOffset.top - parseInt(elementStyles.marginTop, 10), - left: offset.left - parentOffset.left - parseInt(elementStyles.marginLeft, 10), - height: offset.height, - width: offset.width - }; -}; - -/* harmony default export */ __webpack_exports__["a"] = (position); - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/remove-scroll.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = removeScroll; -function removeScroll(rect, scroll) { - return { - top: rect.top - scroll.y, - left: rect.left - scroll.x, - height: rect.height, - width: rect.width - }; -} - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/restrict-to-view.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__align_point__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/align-point.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__collision__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/collision.js"); - - - -var fit = function(position, size, viewPortSize) { - var output = 0; - - if (position + size > viewPortSize) { - output = viewPortSize - (position + size); - } - - if (position < 0) { - output = -position; - } - - return output; -}; - -var flip = function(ref) { - var offset = ref.offset; - var size = ref.size; - var anchorSize = ref.anchorSize; - var viewPortSize = ref.viewPortSize; - var anchorAlignPoint = ref.anchorAlignPoint; - var elementAlignPoint = ref.elementAlignPoint; - var margin = ref.margin; - - var output = 0; - - var isPositionCentered = elementAlignPoint === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].center || elementAlignPoint === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].middle; - var isOriginCentered = anchorAlignPoint === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].center || anchorAlignPoint === __WEBPACK_IMPORTED_MODULE_0__align_point__["a" /* default */].middle; - var marginToAdd = 2 * margin; //2x to keep margin after flip - - if (elementAlignPoint !== anchorAlignPoint && !isPositionCentered && !isOriginCentered && offset > -1) { - if (offset + size > viewPortSize) { - output += -(anchorSize + size + marginToAdd); - } - - if (offset + output < 0) { - output = 0; //skip flip - } - } - - return output; -}; - -var restrictToView = function (options) { - var anchorRect = options.anchorRect; - var anchorAlign = options.anchorAlign; - var elementRect = options.elementRect; - var elementAlign = options.elementAlign; - var collisions = options.collisions; - var viewPort = options.viewPort; - var margin = options.margin; if ( margin === void 0 ) margin = {}; - var elementTop = elementRect.top; - var elementLeft = elementRect.left; - var elementHeight = elementRect.height; - var elementWidth = elementRect.width; - var viewPortHeight = viewPort.height; - var viewPortWidth = viewPort.width; - var horizontalMargin = margin.horizontal || 0; - var verticalMargin = margin.vertical || 0; - - var left = 0; - var top = 0; - - var isHorizontalFlip = collisions.horizontal === __WEBPACK_IMPORTED_MODULE_1__collision__["a" /* default */].flip; - var isVerticalFlip = collisions.vertical === __WEBPACK_IMPORTED_MODULE_1__collision__["a" /* default */].flip; - - if (collisions.vertical === __WEBPACK_IMPORTED_MODULE_1__collision__["a" /* default */].fit) { - top += fit(elementTop, elementHeight, viewPortHeight); - } - - if (collisions.horizontal === __WEBPACK_IMPORTED_MODULE_1__collision__["a" /* default */].fit) { - left += fit(elementLeft, elementWidth, viewPortWidth); - } - - if (isVerticalFlip) { - top += flip({ - margin: verticalMargin, - offset: elementTop, - size: elementHeight, - anchorSize: anchorRect.height, - viewPortSize: viewPortHeight, - anchorAlignPoint: anchorAlign.vertical, - elementAlignPoint: elementAlign.vertical - }); - } - - if (isHorizontalFlip) { - left += flip({ - margin: horizontalMargin, - offset: elementLeft, - size: elementWidth, - anchorSize: anchorRect.width, - viewPortSize: viewPortWidth, - anchorAlignPoint: anchorAlign.horizontal, - elementAlignPoint: elementAlign.horizontal - }); - } - var flippedHorizontal = isHorizontalFlip && left !== 0; - var flippedVertical = isVerticalFlip && top !== 0; - - return { - flipped: flippedHorizontal || flippedVertical, - flip: { - horizontal: flippedHorizontal, - vertical: flippedVertical - }, - offset: { - left: left, - top: top - } - }; -}; - -/* harmony default export */ __webpack_exports__["a"] = (restrictToView); - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/scroll-position.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = scrollPosition; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__document__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/document.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__window__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/window.js"); - - - -function scrollPosition(element) { - var documentElement = Object(__WEBPACK_IMPORTED_MODULE_0__document__["a" /* default */])(element); - var win = Object(__WEBPACK_IMPORTED_MODULE_1__window__["a" /* default */])(element); - - return { - x: win.pageXOffset || documentElement.scrollLeft || 0, - y: win.pageYOffset || documentElement.scrollTop || 0 - }; -} - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/sibling-container.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__parents__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/parents.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__siblings__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/siblings.js"); -/* eslint-disable no-loop-func */ - - - - -/* harmony default export */ __webpack_exports__["a"] = (function (anchor, container) { - var parentElements = Object(__WEBPACK_IMPORTED_MODULE_0__parents__["a" /* default */])(anchor); - var containerElement = container; - var siblingElements; - var result; - - while (containerElement) { - siblingElements = Object(__WEBPACK_IMPORTED_MODULE_1__siblings__["a" /* default */])(containerElement); - - result = parentElements.reduce( - function (list, p) { return list.concat(siblingElements.filter(function (s) { return s === p; })); }, - [] - )[0]; - - if (result) { break; } - - containerElement = containerElement.parentElement; - } - - return result; -});; - - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/siblings.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony default export */ __webpack_exports__["a"] = (function (element) { - var result = []; - - var sibling = element.parentNode.firstElementChild; - - while (sibling) { - if (sibling !== element) { - result.push(sibling); - } - - sibling = sibling.nextElementSibling; - } - return result; -});; - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/window-viewport.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = windowViewport; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__window__ = __webpack_require__("../../../../@progress/kendo-popup-common/dist/es/window.js"); - - -function windowViewport(element) { - var win = Object(__WEBPACK_IMPORTED_MODULE_0__window__["a" /* default */])(element); - - return { - height: win.innerHeight, - width: win.innerWidth - }; -} - - -/***/ }), - -/***/ "../../../../@progress/kendo-popup-common/dist/es/window.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var getWindow = function (element) { return ( element.ownerDocument.defaultView ); }; - -/* harmony default export */ __webpack_exports__["a"] = (getWindow); - - -/***/ }), - -/***/ "../../../../@telerik/kendo-draggable/dist/es/main.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export Draggable */ -var proxy = function (a, b) { return function (e) { return b(a(e)); }; }; - -var bind = function (el, event, callback) { return el.addEventListener && el.addEventListener(event, callback); }; - -var unbind = function (el, event, callback) { return el.removeEventListener && el.removeEventListener(event, callback); }; - -var noop = function () { /* empty */ }; - -var touchRegExp = /touch/; - -// 300ms is the usual mouse interval; -// // However, an underpowered mobile device under a heavy load may queue mouse events for a longer period. -var IGNORE_MOUSE_TIMEOUT = 2000; - -function normalizeEvent(e) { - if (e.type.match(touchRegExp)) { - return { - pageX: e.changedTouches[0].pageX, - pageY: e.changedTouches[0].pageY, - type: e.type, - originalEvent: e - }; - } - - return { - pageX: e.pageX, - pageY: e.pageY, - offsetX: e.offsetX, - offsetY: e.offsetY, - type: e.type, - ctrlKey: e.ctrlKey, - shiftKey: e.shiftKey, - altKey: e.altKey, - originalEvent: e - }; -} - -var Draggable = function Draggable(ref) { - var this$1 = this; - var press = ref.press; if ( press === void 0 ) press = noop; - var drag = ref.drag; if ( drag === void 0 ) drag = noop; - var release = ref.release; if ( release === void 0 ) release = noop; - - this._pressHandler = proxy(normalizeEvent, press); - this._dragHandler = proxy(normalizeEvent, drag); - this._releaseHandler = proxy(normalizeEvent, release); - this._ignoreMouse = false; - this._touchAction; - - this._touchstart = function (e) { - if (e.touches.length === 1) { - this$1._pressHandler(e); - } - }; - - this._touchmove = function (e) { - if (e.touches.length === 1) { - this$1._dragHandler(e); - } - }; - - this._touchend = function (e) { - // the last finger has been lifted, and the user is not doing gesture. - // there might be a better way to handle this. - if (e.touches.length === 0 && e.changedTouches.length === 1) { - this$1._releaseHandler(e); - this$1._ignoreMouse = true; - setTimeout(this$1._restoreMouse, IGNORE_MOUSE_TIMEOUT); - } - }; - - this._restoreMouse = function () { - this$1._ignoreMouse = false; - }; - - this._mousedown = function (e) { - var which = e.which; - - if ((which && which > 1) || this$1._ignoreMouse) { - return; - } - - bind(document, "mousemove", this$1._mousemove); - bind(document, "mouseup", this$1._mouseup); - this$1._pressHandler(e); - }; - - this._mousemove = function (e) { - this$1._dragHandler(e); - }; - - this._mouseup = function (e) { - unbind(document, "mousemove", this$1._mousemove); - unbind(document, "mouseup", this$1._mouseup); - this$1._releaseHandler(e); - }; - - this._pointerdown = function (e) { - if (e.isPrimary) { - bind(this$1._element, "pointermove", this$1._pointermove); - this$1._touchAction = e.target.style.touchAction; - e.target.style.touchAction = "none"; - e.target.setPointerCapture(e.pointerId); - this$1._pressHandler(e); - } - }; - - this._pointermove = function (e) { - if (e.isPrimary) { - this$1._dragHandler(e); - } - }; - - this._pointerup = function (e) { - if (e.isPrimary) { - unbind(this$1._element, "pointermove", this$1._pointermove); - e.target.style.touchAction = this$1._touchAction; - e.target.releasePointerCapture(e.pointerId); - this$1._releaseHandler(e); - } - }; -}; - -Draggable.supportPointerEvent = function supportPointerEvent () { - return window.PointerEvent; -}; - -Draggable.prototype.bindTo = function bindTo (element) { - if (element === this._element) { - return; - } - - if (this._element) { - this._unbindFromCurrent(); - } - - this._element = element; - - if (Draggable.supportPointerEvent()) { - bind(element, "pointerdown", this._pointerdown); - bind(element, "pointerup", this._pointerup); - } else { - bind(element, "mousedown", this._mousedown); - bind(element, "touchstart", this._touchstart); - bind(element, "touchmove", this._touchmove); - bind(element, "touchend", this._touchend); - } -}; - -Draggable.prototype._unbindFromCurrent = function _unbindFromCurrent () { - if (Draggable.supportPointerEvent()) { - unbind(this._element, "pointerdown", this._pointerdown); - unbind(this._element, "pointermove", this._pointermove); - unbind(this._element, "pointerup", this._pointerup); - } else { - unbind(this._element, "mousedown", this._mousedown); - unbind(this._element, "touchstart", this._touchstart); - unbind(this._element, "touchmove", this._touchmove); - unbind(this._element, "touchend", this._touchend); - } -}; - -Draggable.prototype.destroy = function destroy () { - this._unbindFromCurrent(); - this._element = null; -}; - -// Re-export as "default" field to address a bug -// where the ES Module is imported by CommonJS code. -// -// See https://github.com/telerik/kendo-angular/issues/1314 -Draggable.default = Draggable; - -// Rollup won't output exports['default'] otherwise -/* harmony default export */ __webpack_exports__["a"] = (Draggable); - - - -/***/ }), - -/***/ "../../../../@telerik/kendo-inputs-common/dist/es/SliderModel.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SliderUtil__ = __webpack_require__("../../../../@telerik/kendo-inputs-common/dist/es/SliderUtil.js"); - - -var SliderModel = function SliderModel(props, wrapper, track) { - this.props = props; - this.wrapper = wrapper; - this.track = track; - this.tickSizes = this.getTickSizes(); -}; - -SliderModel.prototype.getTickSizes = function getTickSizes () { - var ref = this.props; - var max = ref.max; - var min = ref.min; - var smallStep = ref.smallStep; - var trackWidth = this.trackWidth(); - - return __WEBPACK_IMPORTED_MODULE_0__SliderUtil__["a" /* default */].calculateTickSizes(trackWidth, min, max, smallStep); -}; - -SliderModel.prototype.trackWidth = function trackWidth () { - if (this.props.fixedTickWidth) { - return __WEBPACK_IMPORTED_MODULE_0__SliderUtil__["a" /* default */].calculateFixedTrackSize(this.props); - } - - return __WEBPACK_IMPORTED_MODULE_0__SliderUtil__["a" /* default */].calculateTrackSize( - this.elementSize(this.wrapper), - this.elementOffset(this.track), - this.props.buttons - ); -}; - -SliderModel.prototype.resizeTrack = function resizeTrack () { - var orientation = this.props.vertical ? 'height' : 'width'; - var trackWidth = this.trackWidth(); - - this.track.style[orientation] = trackWidth + "px"; -}; - -SliderModel.prototype.resizeTicks = function resizeTicks (ticksContainer, ticks) { - var this$1 = this; - - var dimension = this.props.vertical ? "height" : "width"; - - Array.prototype.slice.call(ticks).map(function (tick, index) { return tick.style[dimension] = (this$1.tickSizes[index]) + "px"; }); - - if (this.props.vertical) { - this.adjustPadding(ticksContainer); - } -}; - -SliderModel.prototype.resizeWrapper = function resizeWrapper () { - var dimension = this.props.vertical ? "height" : "width"; - var wrapperSize = this.elementSize(this.wrapper); - var trackWidth = __WEBPACK_IMPORTED_MODULE_0__SliderUtil__["a" /* default */].calculateTrackSize(wrapperSize, this.elementOffset(this.track)); - var fixedTrackWidth = __WEBPACK_IMPORTED_MODULE_0__SliderUtil__["a" /* default */].calculateFixedTrackSize(this.props); - - if (trackWidth > fixedTrackWidth) { - this.wrapper.parentElement.style[dimension] = (wrapperSize - (trackWidth - fixedTrackWidth)) + "px"; - } else { - this.wrapper.parentElement.style[dimension] = (wrapperSize + (fixedTrackWidth - trackWidth)) + "px"; - } -}; - -SliderModel.prototype.positionHandle = function positionHandle (dragHandle) { - var ref = this.props; - var max = ref.max; - var min = ref.min; - var reverse = ref.reverse; - var vertical = ref.vertical; - var position = vertical ? 'bottom' : 'left'; - var trackWidth = this.trackWidth(); - var value = __WEBPACK_IMPORTED_MODULE_0__SliderUtil__["a" /* default */].trimValue(max, min, this.props.value); - - this.handlePosition = __WEBPACK_IMPORTED_MODULE_0__SliderUtil__["a" /* default */].calculateHandlePosition({ - min: min, - max: max, - reverse: reverse, - value: value, - trackWidth: trackWidth, - handleWidth: dragHandle.offsetWidth - }); - - dragHandle.style[position] = (this.handlePosition) + "px"; -}; - -SliderModel.prototype.positionSelection = function positionSelection (dragHandle, selection) { - var ref = this.props; - var reverse = ref.reverse; - var vertical = ref.vertical; - var dimension = vertical ? 'height' : 'width'; - var handleWidth = Math.floor(dragHandle.offsetWidth / 2); - var size = this.handlePosition + handleWidth; - - if (reverse) { - size = this.trackWidth() - size; - } - - selection.style[dimension] = size + "px"; -}; - -SliderModel.prototype.adjustPadding = function adjustPadding (ticksContainer) { - var totalTickSize = this.tickSizes.reduce(function (prev, curr) { return prev + curr; }, 0); - var trackWidth = this.trackWidth(); - var reminder = trackWidth - totalTickSize; - - if (reminder !== 0) { - var padding = reminder + this.elementOffset(this.track); - ticksContainer.style.paddingTop = padding + "px"; - } -}; - -SliderModel.prototype.elementOffset = function elementOffset (element) { - var ref = this.props; - var vertical = ref.vertical; - var style = getComputedStyle(element); - - return parseInt(vertical ? style.bottom : style.left, 10); -}; - -SliderModel.prototype.elementSize = function elementSize (element) { - var ref = this.props; - var vertical = ref.vertical; - - return vertical ? element.clientHeight : element.clientWidth; -}; - -/* harmony default export */ __webpack_exports__["a"] = (SliderModel); - - -/***/ }), - -/***/ "../../../../@telerik/kendo-inputs-common/dist/es/SliderUtil.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var calculateFixedTrackSize = function (ref) { - var max = ref.max; - var min = ref.min; - var smallStep = ref.smallStep; - var fixedTickWidth = ref.fixedTickWidth; - - return ((max - min) / smallStep) * fixedTickWidth; -}; - -var calculateTrackSize = function (wrapperWidth, offset, showButtons) { - if ( showButtons === void 0 ) showButtons = true; - - var BUTTONS_COUNT = 2; - var trackOffset = showButtons ? parseFloat(offset, 10) * BUTTONS_COUNT : 0; - var trackWidth = wrapperWidth - trackOffset; - - return trackWidth; -}; - -var calculateTicksCount = function (max, min, smallStep) { - if ( max === void 0 ) max = 0; - if ( min === void 0 ) min = 0; - if ( smallStep === void 0 ) smallStep = 1; - - return calculateAreasCount(max, min, smallStep) + 1; -}; - -var calculateAreasCount = function (max, min, smallStep) { - if ( max === void 0 ) max = 0; - if ( min === void 0 ) min = 0; - if ( smallStep === void 0 ) smallStep = 1; - - if (smallStep <= 0 ) { - throw new Error("Invalid argument: smallStep must be a positive number"); - } - - return Math.floor(Math.abs(min - max) / smallStep); -}; - -var calculateValueFromTick = function (index, ref) { - var max = ref.max; - var min = ref.min; - var smallStep = ref.smallStep; - var reverse = ref.reverse; - var vertical = ref.vertical; - - var value = min + (index * smallStep); - - return vertical || reverse ? Math.abs(value - max) : value; -}; - -var calculateValueFromTrack = function (clientRect, pageOffset, props) { - var length, wrapperOffset; - - if (props.vertical) { - var top = clientRect.top; - var bottom = clientRect.bottom; - length = top - bottom; - wrapperOffset = pageOffset.pageY - bottom; - } else { - var left = clientRect.left; - var right = clientRect.right; - length = right - left; - wrapperOffset = pageOffset.pageX - left; - } - - return valueFromTrack(props, wrapperOffset, length); -}; - -var valueFromTrack = function (props, wrapperOffset, length) { - var max = props.max; - var min = props.min; - var reverse = props.reverse; - var smallStep = props.smallStep; - var distance = max - min; - var clickOffset = wrapperOffset / length; - var maxTickValue = distance - (distance % smallStep); - var maxOffset = (100 / distance) * maxTickValue / 100; - var absValue = (wrapperOffset / length) * distance; - var value = max; - - if (clickOffset < maxOffset) { - value = reverse ? max - absValue : absValue + min; - } - - return snapValue(extendProps(props, { value: value })); -}; - -var calculateTickSizes = function (trackSize, min, max, step) { - var elementCount = Math.floor((max - min) / step) + 1; - var distStep = trackSize / (max - min); - var result = []; - var usedSpace = 0; - var endPoint = 0; - - for (var i = 0; i < elementCount; i++) { - if (i === 0 || i === elementCount - 1) { - endPoint += (step / 2) * distStep; - } else { - endPoint += step * distStep; - } - - var size = Math.round(endPoint - usedSpace); - - result.push(size); - - usedSpace += size; - } - - return result; -}; - -var calculateHandlePosition = function (ref) { - var handleWidth = ref.handleWidth; - var trackWidth = ref.trackWidth; - var min = ref.min; - var max = ref.max; - var reverse = ref.reverse; - var value = ref.value; - - var halfHandleWidth = Math.floor(handleWidth / 2); - var step = trackWidth / Math.abs(max - min); - var pos = step * (value - min); - if (reverse) { - pos = trackWidth - pos; - } - - return Math.floor(pos - halfHandleWidth); -}; - -var decreaseValueToStep = function (ref) { - var max = ref.max; - var min = ref.min; - var smallStep = ref.smallStep; - var value = ref.value; - - var result; - if (value % smallStep === 0) { - result = value - smallStep; - } else { - result = value - (value % smallStep); - } - return trimValue(max, min, result); -}; - -var increaseValueToStep = function (ref) { - var max = ref.max; - var min = ref.min; - var smallStep = ref.smallStep; - var value = ref.value; - - var result = value - (value % smallStep) + smallStep; - - return trimValue(max, min, result); -}; - -var snapValue = function (props) { - var smallStep = props.smallStep; - var value = props.value; - var left = decreaseValueToStep(props); - var right = increaseValueToStep(props); - - if (value % smallStep === 0) { - return value; - } - - if (right - value <= smallStep / 2) { - return right; - } - - return left; -}; - -var trimValue = function (max, min, value) { - if (value > max) { - return max; - } - - if (value < min) { - return min; - } - - return value; -}; - -var identity = function (value) { return value; }; - -var extendProps = function (target) { - var sources = [], len = arguments.length - 1; - while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; - - return Object.assign.apply(Object, [ {}, target ].concat( sources )); -}; - -/* harmony default export */ __webpack_exports__["a"] = ({ - calculateFixedTrackSize: calculateFixedTrackSize, - calculateValueFromTick: calculateValueFromTick, - calculateValueFromTrack: calculateValueFromTrack, - calculateTrackSize: calculateTrackSize, - calculateTicksCount: calculateTicksCount, - calculateTickSizes: calculateTickSizes, - calculateHandlePosition: calculateHandlePosition, - decreaseValueToStep: decreaseValueToStep, - identity: identity, - increaseValueToStep: increaseValueToStep, - trimValue: trimValue, - snapValue: snapValue, - valueFromTrack: valueFromTrack -}); - - -/***/ }), - -/***/ "../../../../@telerik/kendo-inputs-common/dist/es/SwitchController.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SwitchModel__ = __webpack_require__("../../../../@telerik/kendo-inputs-common/dist/es/SwitchModel.js"); - - -var DEFAULT_THRESHOLD = 5; - -var noop = function () { /*noop*/ }; - -var SwitchController = function SwitchController(updateView, onChange) { - var this$1 = this; - if ( updateView === void 0 ) updateView = noop; - if ( onChange === void 0 ) onChange = noop; - - this.handlePosition = 0; - this.wrapperOffset = 0; - this.handleOffset = 0; - this.handleMargin = 4; - - this.updateView = updateView; - this.onChange = onChange; - - this.change = function (checked) { - this$1.checked = checked; - - this$1.updateView(this$1.updateModel(checked ? this$1.constrain : 0)); - - this$1.onChange(checked); - }; - - this.limit = function (value) { - if (value > this$1.constrain) { - return this$1.constrain; - } - - if (value < 0) { - return 0; - } - - return value; - }; - - this.addAnimation = function (model) { - if (model.transition === true) { - model.transition = 'all 200ms ease-out'; - } else { - model.transition = 'none'; - } - return model; - }; - - this.onPress = function (ref) { - var pageX = ref.pageX; - - this$1.lastPressX = this$1.originalPressX = pageX; - }; - - this.onRelease = function (ref) { - var pageX = ref.pageX; - - var delta = Math.abs(this$1.originalPressX - pageX); - var snapPoint = this$1.constrain / 2; - var checked = delta < DEFAULT_THRESHOLD ? !this$1.checked : this$1.handlePosition > snapPoint; - - this$1.change(checked); - }; - - this.onDrag = function (ref) { - var pageX = ref.pageX; - - var ref$1 = this$1.coords; - var left = ref$1.left; - var right = ref$1.right; - var overElement = pageX > left && pageX < right; - - if (overElement) { - var delta = this$1.reverse ? this$1.lastPressX - pageX : pageX - this$1.lastPressX; - var position = this$1.limit(this$1.handlePosition + delta); - - this$1.lastPressX = pageX; - this$1.handlePosition = position; - this$1.updateView(this$1.updateModel(this$1.handlePosition)); - } - if (pageX > right) { - this$1.updateView(this$1.updateModel(this$1.reverse ? 0 : this$1.constrain)); - } - - if (pageX < left) { - this$1.updateView(this$1.updateModel(this$1.reverse ? 0 : this$1.constrain)); - } - }; -}; - -var prototypeAccessors = { constrain: { configurable: true } }; - -prototypeAccessors.constrain.get = function () { - return this.wrapperOffset - this.handleOffset - this.handleMargin; -}; - -SwitchController.prototype.updateState = function updateState (ref) { - var wrapperOffset = ref.wrapperOffset; - var handleOffset = ref.handleOffset; - var checked = ref.checked; - var animate = ref.animate; if ( animate === void 0 ) animate = true; - var coords = ref.coords; - var handleMargin = ref.handleMargin; - var reverse = ref.reverse; - - this.wrapperOffset = wrapperOffset; - this.handleOffset = handleOffset; - this.coords = coords; - this.handleMargin = handleMargin; - - this.checked = checked; - this.reverse = reverse; - - this.updateView(this.updateModel(checked ? this.constrain : 0, animate)); -}; - -SwitchController.prototype.updateModel = function updateModel (position, animate) { - if ( animate === void 0 ) animate = true; - - var pos = this.reverse ? this.wrapperOffset / 2 - position : position; - return new __WEBPACK_IMPORTED_MODULE_0__SwitchModel__["a" /* default */](pos, animate); -}; - -Object.defineProperties( SwitchController.prototype, prototypeAccessors ); - -/* harmony default export */ __webpack_exports__["a"] = (SwitchController); - - -/***/ }), - -/***/ "../../../../@telerik/kendo-inputs-common/dist/es/SwitchModel.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var Model = function Model(value, animate) { - if ( value === void 0 ) value = 0; - - this.handle = { - transform: 'translateX(' + value + 'px)', - transition: animate - }; -}; - -/* harmony default export */ __webpack_exports__["a"] = (Model); - - -/***/ }), - -/***/ "../../../../@telerik/kendo-inputs-common/dist/es/main.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SliderModel__ = __webpack_require__("../../../../@telerik/kendo-inputs-common/dist/es/SliderModel.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__SliderModel__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SliderUtil__ = __webpack_require__("../../../../@telerik/kendo-inputs-common/dist/es/SliderUtil.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__SliderUtil__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__SwitchController__ = __webpack_require__("../../../../@telerik/kendo-inputs-common/dist/es/SwitchController.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__SwitchController__["a"]; }); - - - - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cldr_load__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/load.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_0__cldr_load__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cldr_set_data__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/set-data.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_1__cldr_set_data__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cldr_date_field_name__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/date-field-name.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_2__cldr_date_field_name__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__cldr_date_format_names__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/date-format-names.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_3__cldr_date_format_names__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__cldr_info__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/info.js"); -/* unused harmony reexport cldr */ -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_4__cldr_info__["c"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__cldr_currency__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/currency.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_5__cldr_currency__["b"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_5__cldr_currency__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_5__cldr_currency__["c"]; }); -/* unused harmony reexport territoryCurrencyCode */ -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_5__cldr_currency__["d"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__cldr_first_day__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/first-day.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_6__cldr_first_day__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__cldr_number_symbols__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/number-symbols.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_7__cldr_number_symbols__["a"]; }); - - - - - - - - - - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr/currency.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["b"] = currencyDisplays; -/* harmony export (immutable) */ __webpack_exports__["a"] = currencyDisplay; -/* harmony export (immutable) */ __webpack_exports__["c"] = currencyFractionOptions; -/* unused harmony export territoryCurrencyCode */ -/* harmony export (immutable) */ __webpack_exports__["d"] = localeCurrency; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__info__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/info.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__errors__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/errors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__territory__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/territory.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__parse_range_date__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/parse-range-date.js"); - - - - - -/* eslint-disable consistent-return */ - -var NoCurrency = __WEBPACK_IMPORTED_MODULE_1__errors__["a" /* errors */].NoCurrency; -var NoCurrencyDisplay = __WEBPACK_IMPORTED_MODULE_1__errors__["a" /* errors */].NoCurrencyDisplay; -var NoSupplementalCurrency = __WEBPACK_IMPORTED_MODULE_1__errors__["a" /* errors */].NoSupplementalCurrency; -var NoCurrencyRegion = __WEBPACK_IMPORTED_MODULE_1__errors__["a" /* errors */].NoCurrencyRegion; -var NoValidCurrency = __WEBPACK_IMPORTED_MODULE_1__errors__["a" /* errors */].NoValidCurrency; - -var DEFAULT_CURRENCY_FRACTIONS = 2; -var SYMBOL = "symbol"; -var INVALID_CURRENCY_CODE = 'XXX'; - -var GLOBAL_CURRENCIES = { - '001': 'USD', // 001 refers to world. not sure if it is correct to assume USD but seems better than throw an error - '150': 'EUR' // 150 territory for Europe - -}; - -function getCurrencyInfo(locale, currency, throwIfNoValid) { - var info = Object(__WEBPACK_IMPORTED_MODULE_0__info__["b" /* getLocaleInfo */])(locale); - var currencies = info.numbers.currencies; - if (!currencies) { - if (throwIfNoValid) { - throw NoCurrency.error(); - } - - return; - } - - var currencyDisplayInfo = currencies[currency]; - - if (!currencyDisplayInfo) { - if (throwIfNoValid) { - throw NoCurrencyDisplay.error(); - } - - return; - } - - return currencyDisplayInfo; -} - -function lengthComparer(a, b) { - return b.length - a.length; -} - -function regionCurrency(regionCurrencies) { - var latestValidUntil, latestValidUntilRange; - var latestStillValid, latestStillValidDate; - - for (var idx = 0; idx < regionCurrencies.length; idx++) { - var currency = regionCurrencies[idx]; - var code = Object.keys(currency)[0]; - var info = currency[code]; - if (code !== INVALID_CURRENCY_CODE && info._tender !== 'false' && info._from) { - if (!info._to) { - var stillValidDate = Object(__WEBPACK_IMPORTED_MODULE_3__parse_range_date__["a" /* default */])(info._from); - if (!latestStillValidDate || latestStillValidDate < stillValidDate) { - latestStillValid = code; - latestStillValidDate = stillValidDate; - } - } else if (!latestStillValid) { - var validFrom = Object(__WEBPACK_IMPORTED_MODULE_3__parse_range_date__["a" /* default */])(info._from); - var validTo = Object(__WEBPACK_IMPORTED_MODULE_3__parse_range_date__["a" /* default */])(info._to); - if (!latestValidUntilRange || latestValidUntilRange.to < validTo || latestValidUntilRange.from < validFrom) { - latestValidUntil = code; - latestValidUntilRange = { - from: validFrom, - to: validTo - }; - } - } - } - } - - return latestStillValid || latestValidUntil; -} - -function currencyDisplays(locale, currency, throwIfNoValid) { - if ( throwIfNoValid === void 0 ) throwIfNoValid = true; - - var currencyInfo = getCurrencyInfo(locale, currency, throwIfNoValid); - if (!currencyInfo) { - return; - } - - if (!currencyInfo.displays) { - var displays = [ currency ]; - for (var field in currencyInfo) { - displays.push(currencyInfo[field]); - } - displays.sort(lengthComparer); - currencyInfo.displays = displays; - } - - return currencyInfo.displays; -} - -function currencyDisplay(locale, options) { - var value = options.value; - var currency = options.currency; - var currencyDisplay = options.currencyDisplay; if ( currencyDisplay === void 0 ) currencyDisplay = SYMBOL; - - if (currencyDisplay === "code") { - return currency; - } - - var currencyInfo = getCurrencyInfo(locale, currency, true); - var result; - - if (currencyDisplay === SYMBOL) { - result = currencyInfo["symbol-alt-narrow"] || currencyInfo[SYMBOL]; - } else { - if (typeof value === undefined || value !== 1) { - result = currencyInfo["displayName-count-other"]; - } else { - result = currencyInfo["displayName-count-one"]; - } - } - - return result; -} - -function currencyFractionOptions(code) { - var minimumFractionDigits = DEFAULT_CURRENCY_FRACTIONS; - var maximumFractionDigits = DEFAULT_CURRENCY_FRACTIONS; - - var fractions = ((__WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */].supplemental.currencyData || {}).fractions || {})[code]; - - if (fractions && fractions._digits) { - maximumFractionDigits = minimumFractionDigits = parseInt(fractions._digits, 10); - } - - return { - minimumFractionDigits: minimumFractionDigits, - maximumFractionDigits: maximumFractionDigits - }; -} - -function territoryCurrencyCode(territory, throwIfNoValid) { - if ( throwIfNoValid === void 0 ) throwIfNoValid = true; - - if (GLOBAL_CURRENCIES[territory]) { - return GLOBAL_CURRENCIES[territory]; - } - - var currencyData = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */].supplemental.currencyData; - if (!currencyData) { - if (throwIfNoValid) { - throw NoSupplementalCurrency.error(); - } - - return; - } - - var regionCurrencies = currencyData.region[territory]; - - if (!regionCurrencies) { - if (throwIfNoValid) { - throw NoCurrencyRegion.error(territory); - } - - return; - } - - var currencyCode = regionCurrency(regionCurrencies); - - return currencyCode; -} - -function localeCurrency(locale, throwIfNoValid) { - var info = Object(__WEBPACK_IMPORTED_MODULE_0__info__["b" /* getLocaleInfo */])(locale); - var numbers = info.numbers; - - if (!numbers.localeCurrency) { - var currency = territoryCurrencyCode(Object(__WEBPACK_IMPORTED_MODULE_2__territory__["a" /* default */])(info), throwIfNoValid); - - if (!currency && throwIfNoValid) { - throw NoValidCurrency.error(info.name); - } - - numbers.localeCurrency = currency; - } - - return numbers.localeCurrency; -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr/date-field-name.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = dateFieldName; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__info__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/info.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__errors__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/errors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); - - - - -function dateFieldName(options, locale) { - if ( locale === void 0 ) locale = __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* DEFAULT_LOCALE */]; - - var info = Object(__WEBPACK_IMPORTED_MODULE_0__info__["c" /* localeInfo */])(locale); - var dateFields = info.calendar.dateFields; - if (!dateFields) { - throw __WEBPACK_IMPORTED_MODULE_1__errors__["a" /* errors */].NoDateFieldNames.error(); - } - - var fieldNameInfo = dateFields[options.type] || {}; - - return fieldNameInfo[options.nameType] || fieldNameInfo['wide']; -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr/date-format-names.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = dateFormatNames; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__info__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/info.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); - - - -function lowerArray(arr) { - var result = []; - for (var idx = 0; idx < arr.length; idx++) { - result.push(arr[idx].toLowerCase()); - } - return result; -} - -function lowerObject(obj) { - var result = {}; - for (var field in obj) { - result[field] = obj[field].toLowerCase(); - } - return result; -} - -function cloneLower(obj) { - var result = Array.isArray(obj) ? lowerArray(obj) : lowerObject(obj); - return result; -} - -function dateFormatNames(locale, options) { - var type = options.type; - var nameType = options.nameType; - var standAlone = options.standAlone; - var lower = options.lower; - var info = Object(__WEBPACK_IMPORTED_MODULE_0__info__["b" /* getLocaleInfo */])(locale); - var formatType = standAlone ? "stand-alone" : "format"; - var lowerNameType = (lower ? "lower-" : __WEBPACK_IMPORTED_MODULE_1__common_constants__["f" /* EMPTY */]) + nameType; - var formatNames = info.calendar[type][formatType]; - var result = formatNames[lowerNameType]; - if (!result && lower) { - result = formatNames[lowerNameType] = cloneLower(formatNames[nameType]); - } - return result; -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr/default-data.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var defaultData = { - en: { - name: "en", - identity: { - version: { - _number: "$Revision: 12418 $", - _cldrVersion: "29" - }, - language: "en" - }, - territory: "US", - numbers: { - symbols: { - decimal: ".", - group: ",", - list: ";", - percentSign: "%", - plusSign: "+", - minusSign: "-", - exponential: "E", - superscriptingExponent: "×", - perMille: "‰", - infinity: "∞", - nan: "NaN", - timeSeparator: ":" - }, - decimal: { - patterns: [ - "n" - ], - groupSize: [ - 3 - ] - }, - scientific: { - patterns: [ - "nEn" - ], - groupSize: [] - }, - percent: { - patterns: [ - "n%" - ], - groupSize: [ - 3 - ] - }, - currency: { - patterns: [ - "$n" - ], - groupSize: [ - 3 - ], - "unitPattern-count-one": "n $", - "unitPattern-count-other": "n $" - }, - currencies: { - BGN: { - displayName: "Bulgarian Lev", - "displayName-count-one": "Bulgarian lev", - "displayName-count-other": "Bulgarian leva", - symbol: "BGN" - }, - EUR: { - displayName: "Euro", - "displayName-count-one": "euro", - "displayName-count-other": "euros", - symbol: "€", - "symbol-alt-narrow": "€" - }, - USD: { - displayName: "US Dollar", - "displayName-count-one": "US dollar", - "displayName-count-other": "US dollars", - symbol: "$", - "symbol-alt-narrow": "$" - } - }, - localeCurrency: "USD", - accounting: { - patterns: [ - "$n", - "($n)" - ], - groupSize: [ - 3 - ] - } - }, - calendar: { - gmtFormat: "GMT{0}", - gmtZeroFormat: "GMT", - patterns: { - d: "M/d/y", - D: "EEEE, MMMM d, y", - m: "MMM d", - M: "MMMM d", - y: "MMM y", - Y: "MMMM y", - F: "EEEE, MMMM d, y h:mm:ss a", - g: "M/d/y h:mm a", - G: "M/d/y h:mm:ss a", - t: "h:mm a", - T: "h:mm:ss a", - s: "yyyy'-'MM'-'dd'T'HH':'mm':'ss", - u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'" - }, - dateTimeFormats: { - full: "{1} 'at' {0}", - long: "{1} 'at' {0}", - medium: "{1}, {0}", - short: "{1}, {0}", - availableFormats: { - Bh: "h B", - Bhm: "h:mm B", - Bhms: "h:mm:ss B", - d: "d", - E: "ccc", - EBhm: "E h:mm B", - EBhms: "E h:mm:ss B", - Ed: "d E", - Ehm: "E h:mm a", - EHm: "E HH:mm", - Ehms: "E h:mm:ss a", - EHms: "E HH:mm:ss", - Gy: "y G", - GyMMM: "MMM y G", - GyMMMd: "MMM d, y G", - GyMMMEd: "E, MMM d, y G", - h: "h a", - H: "HH", - hm: "h:mm a", - Hm: "HH:mm", - hms: "h:mm:ss a", - Hms: "HH:mm:ss", - hmsv: "h:mm:ss a v", - Hmsv: "HH:mm:ss v", - hmv: "h:mm a v", - Hmv: "HH:mm v", - M: "L", - Md: "M/d", - MEd: "E, M/d", - MMM: "LLL", - MMMd: "MMM d", - MMMEd: "E, MMM d", - MMMMd: "MMMM d", - "MMMMW-count-one": "'week' W 'of' MMMM", - "MMMMW-count-other": "'week' W 'of' MMMM", - ms: "mm:ss", - y: "y", - yM: "M/y", - yMd: "M/d/y", - yMEd: "E, M/d/y", - yMMM: "MMM y", - yMMMd: "MMM d, y", - yMMMEd: "E, MMM d, y", - yMMMM: "MMMM y", - yQQQ: "QQQ y", - yQQQQ: "QQQQ y", - "yw-count-one": "'week' w 'of' Y", - "yw-count-other": "'week' w 'of' Y" - } - }, - timeFormats: { - full: "h:mm:ss a zzzz", - long: "h:mm:ss a z", - medium: "h:mm:ss a", - short: "h:mm a" - }, - dateFormats: { - full: "EEEE, MMMM d, y", - long: "MMMM d, y", - medium: "MMM d, y", - short: "M/d/yy" - }, - days: { - format: { - abbreviated: [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ], - narrow: [ - "S", - "M", - "T", - "W", - "T", - "F", - "S" - ], - short: [ - "Su", - "Mo", - "Tu", - "We", - "Th", - "Fr", - "Sa" - ], - wide: [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ] - }, - "stand-alone": { - abbreviated: [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ], - narrow: [ - "S", - "M", - "T", - "W", - "T", - "F", - "S" - ], - short: [ - "Su", - "Mo", - "Tu", - "We", - "Th", - "Fr", - "Sa" - ], - wide: [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ] - } - }, - months: { - format: { - abbreviated: [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - narrow: [ - "J", - "F", - "M", - "A", - "M", - "J", - "J", - "A", - "S", - "O", - "N", - "D" - ], - wide: [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ] - }, - "stand-alone": { - abbreviated: [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - narrow: [ - "J", - "F", - "M", - "A", - "M", - "J", - "J", - "A", - "S", - "O", - "N", - "D" - ], - wide: [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ] - } - }, - quarters: { - format: { - abbreviated: [ - "Q1", - "Q2", - "Q3", - "Q4" - ], - narrow: [ - "1", - "2", - "3", - "4" - ], - wide: [ - "1st quarter", - "2nd quarter", - "3rd quarter", - "4th quarter" - ] - }, - "stand-alone": { - abbreviated: [ - "Q1", - "Q2", - "Q3", - "Q4" - ], - narrow: [ - "1", - "2", - "3", - "4" - ], - wide: [ - "1st quarter", - "2nd quarter", - "3rd quarter", - "4th quarter" - ] - } - }, - dayPeriods: { - format: { - abbreviated: { - midnight: "midnight", - am: "AM", - "am-alt-variant": "am", - noon: "noon", - pm: "PM", - "pm-alt-variant": "pm", - morning1: "in the morning", - afternoon1: "in the afternoon", - evening1: "in the evening", - night1: "at night" - }, - narrow: { - midnight: "mi", - am: "a", - "am-alt-variant": "am", - noon: "n", - pm: "p", - "pm-alt-variant": "pm", - morning1: "in the morning", - afternoon1: "in the afternoon", - evening1: "in the evening", - night1: "at night" - }, - wide: { - midnight: "midnight", - am: "AM", - "am-alt-variant": "am", - noon: "noon", - pm: "PM", - "pm-alt-variant": "pm", - morning1: "in the morning", - afternoon1: "in the afternoon", - evening1: "in the evening", - night1: "at night" - } - }, - "stand-alone": { - abbreviated: { - midnight: "midnight", - am: "AM", - "am-alt-variant": "am", - noon: "noon", - pm: "PM", - "pm-alt-variant": "pm", - morning1: "morning", - afternoon1: "afternoon", - evening1: "evening", - night1: "night" - }, - narrow: { - midnight: "midnight", - am: "AM", - "am-alt-variant": "am", - noon: "noon", - pm: "PM", - "pm-alt-variant": "pm", - morning1: "morning", - afternoon1: "afternoon", - evening1: "evening", - night1: "night" - }, - wide: { - midnight: "midnight", - am: "AM", - "am-alt-variant": "am", - noon: "noon", - pm: "PM", - "pm-alt-variant": "pm", - morning1: "morning", - afternoon1: "afternoon", - evening1: "evening", - night1: "night" - } - } - }, - eras: { - format: { - wide: { - 0: "Before Christ", - 1: "Anno Domini", - "0-alt-variant": "Before Common Era", - "1-alt-variant": "Common Era" - }, - abbreviated: { - 0: "BC", - 1: "AD", - "0-alt-variant": "BCE", - "1-alt-variant": "CE" - }, - narrow: { - 0: "B", - 1: "A", - "0-alt-variant": "BCE", - "1-alt-variant": "CE" - } - } - }, - dateFields: { - era: { - wide: "era" - }, - year: { - wide: "year", - short: "yr.", - narrow: "yr." - }, - quarter: { - wide: "quarter", - short: "qtr.", - narrow: "qtr." - }, - month: { - wide: "month", - short: "mo.", - narrow: "mo." - }, - week: { - wide: "week", - short: "wk.", - narrow: "wk." - }, - day: { - wide: "day", - short: "day", - narrow: "day" - }, - weekday: { - wide: "day of the week" - }, - dayperiod: { - wide: "AM/PM" - }, - hour: { - wide: "hour", - short: "hr.", - narrow: "hr." - }, - minute: { - wide: "minute", - short: "min.", - narrow: "min." - }, - second: { - wide: "second", - short: "sec.", - narrow: "sec." - }, - zone: { - wide: "time zone" - } - } - } - }, - supplemental: { - likelySubtags: { - en: "en-Latn-US" - }, - currencyData: { - region: { - US: [ - { - USD: { - _from: "1792-01-01" - } - } - ] - } - }, - weekData: { - firstDay: { - US: "sun" - } - } - } -}; -/* harmony default export */ __webpack_exports__["a"] = (defaultData); - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr/first-day.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = firstDay; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__info__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/info.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__territory__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/territory.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__errors__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/errors.js"); - - - - - -var NoWeekData = __WEBPACK_IMPORTED_MODULE_2__errors__["a" /* errors */].NoWeekData; -var NoFirstDay = __WEBPACK_IMPORTED_MODULE_2__errors__["a" /* errors */].NoFirstDay; - -var DAYS = [ "sun", "mon", "tue", "wed", "thu", "fri", "sat" ]; -var DEFAULT = '001'; - -function firstDay(locale) { - var info = Object(__WEBPACK_IMPORTED_MODULE_0__info__["b" /* getLocaleInfo */])(locale); - - if (!isNaN(info.firstDay)) { - return info.firstDay; - } - - var weekData = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */].supplemental.weekData; - if (!weekData) { - throw NoWeekData.error(); - } - - var firstDay = weekData.firstDay[Object(__WEBPACK_IMPORTED_MODULE_1__territory__["a" /* default */])(info)] || weekData.firstDay[DEFAULT]; - - if (!firstDay) { - throw NoFirstDay.error(); - } - - info.firstDay = DAYS.indexOf(firstDay); - - return info.firstDay; -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr/info.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cldr; }); -/* harmony export (immutable) */ __webpack_exports__["b"] = getLocaleInfo; -/* harmony export (immutable) */ __webpack_exports__["c"] = localeInfo; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__default_data__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/default-data.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_is_string__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/is-string.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__errors__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/errors.js"); - - - - -function availableLocaleInfo(fullName, suffixes) { - var parts = fullName.split("-"); - var language = parts[0]; - var script = parts[1]; - var territory = parts[2]; - - return cldr[fullName] || (suffixes.indexOf(territory) !== -1 && cldr[language + "-" + territory]) || (suffixes.indexOf(script) !== -1 && cldr[language + "-" + script]) || cldr[language]; -} - -function localeFullName(language, suffixes) { - var likelySubtags = cldr.supplemental.likelySubtags; - - for (var idx = 0; idx < suffixes.length; idx++) { - var name = likelySubtags[language + "-" + suffixes[idx ]]; - if (name) { - return name; - } - } - - if (likelySubtags[language]) { - return likelySubtags[language]; - } -} - -var cldr = __WEBPACK_IMPORTED_MODULE_0__default_data__["a" /* default */]; - -function getLocaleInfo(locale) { - var info; - if (Object(__WEBPACK_IMPORTED_MODULE_1__common_is_string__["a" /* default */])(locale)) { - info = localeInfo(locale); - } else { - info = locale; - } - return info; -} - -function localeInfo(locale) { - if (cldr[locale]) { - return cldr[locale]; - } - - var likelySubtags = cldr.supplemental.likelySubtags; - if (likelySubtags) { - var parts = locale.split("-"); - var language = parts[0]; - var suffixes = parts.slice(1); - var fullName = localeFullName(language, suffixes); - var info = fullName ? availableLocaleInfo(fullName, suffixes) : null; - if (info) { - return info; - } - } - - throw __WEBPACK_IMPORTED_MODULE_2__errors__["a" /* errors */].NoLocale.error(locale); -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr/load-dates.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = loadCalendarInfo; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__info__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/info.js"); - - -var predefinedDatePatterns = { - s: "yyyy'-'MM'-'dd'T'HH':'mm':'ss", - u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'" -}; -var datePatterns = { - d: [ [ "dateTimeFormats", "availableFormats", "yMd" ] ], - D: [ [ "dateFormats", "full" ] ], - m: [ [ "dateTimeFormats", "availableFormats", "MMMd" ] ], - M: [ [ "dateTimeFormats", "availableFormats", "MMMMd" ] ], - y: [ [ "dateTimeFormats", "availableFormats", "yMMM" ] ], - Y: [ [ "dateTimeFormats", "availableFormats", "yMMMM" ] ], - F: [ [ "dateFormats", "full" ], [ "timeFormats", "medium" ] ], - g: [ [ "dateTimeFormats", "availableFormats", "yMd" ], [ "timeFormats", "short" ] ], - G: [ [ "dateTimeFormats", "availableFormats", "yMd" ], [ "timeFormats", "medium" ] ], - t: [ [ "timeFormats", "short" ] ], - T: [ [ "timeFormats", "medium" ] ] -}; - -function toArray(obj) { - var result = []; - var names = Object.getOwnPropertyNames(obj); - for (var idx = 0; idx < names.length; idx++) { - var value = obj[names[idx]]; - result.push(value); - } - return result; -} - -function getCalendarNames(info, isObj) { - var result = {}; - for (var formatType in info) { - var names = result[formatType] = {}; - for (var format in info[formatType]) { - var formats = info[formatType][format]; - names[format] = isObj ? formats : toArray(formats); - } - } - return result; -} - -function getEraNames(eras) { - var result = {}; - var format = result.format = {}; - var eraNameMap = { - eraAbbr: "abbreviated", - eraNames: "wide", - eraNarrow: "narrow" - }; - - for (var eraFormatName in eras) { - var formatName = eraNameMap[eraFormatName]; - format[formatName] = eras[eraFormatName]; - } - - return result; -} - -function loadCalendarNames(locale, calendar) { - var localeCalendar = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */][locale].calendar; - localeCalendar.days = getCalendarNames(calendar.days); - localeCalendar.months = getCalendarNames(calendar.months); - localeCalendar.quarters = getCalendarNames(calendar.quarters); - localeCalendar.dayPeriods = getCalendarNames(calendar.dayPeriods, true); - - localeCalendar.eras = getEraNames(calendar.eras); -} - -function loadCalendarDateFields(locale, fields) { - var localeCalendar = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */][locale].calendar; - var dateFields = {}; - - for (var field in fields) { - var ref = field.split('-'); - var fieldName = ref[0]; - var formatType = ref[1]; if ( formatType === void 0 ) formatType = 'wide'; - var fieldInfo = dateFields[fieldName] || {}; - var displayName = fields[field].displayName; - - if (!displayName) { continue; } - - fieldInfo[formatType] = displayName; - dateFields[fieldName] = fieldInfo; - } - - localeCalendar.dateFields = dateFields; -} - -function getPredefinedFormat(paths, calendar) { - var result = []; - - for (var pathIdx = 0; pathIdx < paths.length; pathIdx++) { - var fields = paths[ pathIdx ]; - var pattern = calendar; - for (var idx = 0; idx < fields.length; idx++) { - pattern = pattern[fields[idx]]; - } - result.push(pattern); - } - - return result.join(" "); -} - -function loadCalendarPatterns(locale, calendar) { - var cldrCalendar = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */][locale].calendar; - var patterns = cldrCalendar.patterns = {}; - for (var pattern in datePatterns) { - patterns[pattern] = getPredefinedFormat(datePatterns[pattern], calendar); - } - - for (var pattern$1 in predefinedDatePatterns) { - patterns[pattern$1] = predefinedDatePatterns[pattern$1]; - } - - var dateTimeFormats = calendar.dateTimeFormats; - cldrCalendar.dateTimeFormats = { - full: dateTimeFormats.full, - long: dateTimeFormats.long, - medium: dateTimeFormats.medium, - short: dateTimeFormats.short, - availableFormats: dateTimeFormats.availableFormats - }; - cldrCalendar.timeFormats = calendar.timeFormats; - cldrCalendar.dateFormats = calendar.dateFormats; -} - - -function loadCalendarInfo(locale, info) { - var calendar = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */][locale].calendar = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */][locale].calendar || {}; - for (var field in info) { - if (field === "timeZoneNames") { - calendar.gmtFormat = info[field].gmtFormat; - calendar.gmtZeroFormat = info[field].gmtZeroFormat; - } else if (field === "calendars" && info[field].gregorian) { - loadCalendarPatterns(locale, info[field].gregorian); - loadCalendarNames(locale, info[field].gregorian); - } else if (field === "fields") { - loadCalendarDateFields(locale, info.fields); - } - } -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr/load-numbers.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = loadNumbersInfo; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__info__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/info.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); - - - -var LATIN_NUMBER_FORMATS = "Formats-numberSystem-latn"; -var LATIN_NUMBER_SYMBOLS = "symbols-numberSystem-latn"; - -var patternRegExp = /([#,0.]+)/g; -var cldrCurrencyRegExp = /¤/g; - -function getPatterns(pattern) { - patternRegExp.lastIndex = 0; - - return pattern.replace(cldrCurrencyRegExp, __WEBPACK_IMPORTED_MODULE_1__common_constants__["c" /* CURRENCY_PLACEHOLDER */]).replace(patternRegExp, __WEBPACK_IMPORTED_MODULE_1__common_constants__["i" /* NUMBER_PLACEHOLDER */]).split(__WEBPACK_IMPORTED_MODULE_1__common_constants__["h" /* LIST_SEPARATOR */]); -} - -function getGroupSize(pattern) { - patternRegExp.lastIndex = 0; - - var numberPatterns = patternRegExp.exec(pattern.split(__WEBPACK_IMPORTED_MODULE_1__common_constants__["h" /* LIST_SEPARATOR */])[0])[0].split(__WEBPACK_IMPORTED_MODULE_1__common_constants__["l" /* POINT */]); - var integer = numberPatterns[0]; - - var groupSize = integer.split(__WEBPACK_IMPORTED_MODULE_1__common_constants__["g" /* GROUP_SEPARATOR */]).slice(1).map(function(group) { - return group.length; - }).reverse(); - - return groupSize; -} - -function loadCurrencyUnitPatterns(currencyInfo, currencyFormats) { - for (var field in currencyFormats) { - if (field.startsWith("unitPattern")) { - currencyInfo[field] = currencyFormats[field].replace("{0}", __WEBPACK_IMPORTED_MODULE_1__common_constants__["i" /* NUMBER_PLACEHOLDER */]).replace("{1}", __WEBPACK_IMPORTED_MODULE_1__common_constants__["c" /* CURRENCY_PLACEHOLDER */]); - } - } -} - -function loadNumbersInfo(locale, info) { - var localeInfo = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */][locale]; - var numbers = localeInfo.numbers = localeInfo.numbers || {}; - numbers.symbols = numbers.symbols || {}; - for (var field in info) { - if (field === LATIN_NUMBER_SYMBOLS) { - Object.assign(numbers.symbols, info[field]); - } else if (field.includes(LATIN_NUMBER_FORMATS)) { - var style = field.substr(0, field.indexOf(LATIN_NUMBER_FORMATS)); - var pattern = info[field].standard; - numbers[style] = { - patterns: getPatterns(pattern) - }; - if (style === __WEBPACK_IMPORTED_MODULE_1__common_constants__["b" /* CURRENCY */]) { - numbers[style].groupSize = getGroupSize((info[__WEBPACK_IMPORTED_MODULE_1__common_constants__["d" /* DECIMAL */] + LATIN_NUMBER_FORMATS] || info[field]).standard); - loadCurrencyUnitPatterns(numbers[style], info[field]); - numbers[__WEBPACK_IMPORTED_MODULE_1__common_constants__["a" /* ACCOUNTING */]] = { - patterns: getPatterns(info[field][__WEBPACK_IMPORTED_MODULE_1__common_constants__["a" /* ACCOUNTING */]]), - groupSize: numbers[style].groupSize - }; - } else { - numbers[style].groupSize = getGroupSize(pattern); - } - } else if (field === "currencies") { - numbers.currencies = info[field]; - } - } -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr/load.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = load; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__info__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/info.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__load_numbers__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/load-numbers.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__load_dates__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/load-dates.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__territory__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/territory.js"); - - - - - -function loadLocale(locale, info) { - for (var field in info) { - if (field === "numbers") { - Object(__WEBPACK_IMPORTED_MODULE_1__load_numbers__["a" /* default */])(locale, info[field]); - } else if (field === "dates") { - Object(__WEBPACK_IMPORTED_MODULE_2__load_dates__["a" /* default */])(locale, info[field]); - } - } -} - -function load() { - var arguments$1 = arguments; - - var length = arguments.length; - for (var idx = 0; idx < length; idx++) { - var entry = arguments$1[idx]; - if (entry.main) { - var locale = Object.keys(entry.main)[0]; - var info = entry.main[locale]; - var localeInfo = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */][locale] = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */][locale] || {}; - - localeInfo.name = localeInfo.name || locale; - localeInfo.identity = localeInfo.identity || info.identity; - - Object(__WEBPACK_IMPORTED_MODULE_3__territory__["a" /* default */])(localeInfo); - loadLocale(locale, info); - } else if (entry.supplemental) { - if (entry.supplemental.weekData) { - __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */].supplemental.weekData = { - firstDay: entry.supplemental.weekData.firstDay - }; - } else { - Object.assign(__WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */].supplemental, entry.supplemental); - } - } - } -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr/number-symbols.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = numberSymbols; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__info__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/info.js"); - - -function numberSymbols(locale) { - var info = Object(__WEBPACK_IMPORTED_MODULE_0__info__["b" /* getLocaleInfo */])(locale); - - return info.numbers.symbols; -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr/parse-range-date.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = parseRangeDate; -function parseRangeDate(value) { - var parts = value.split('-'); - var year = parseInt(parts[0], 10); - var month = parseInt(parts[1], 10) - 1; - var day = parseInt(parts[2], 10); - - return new Date(year, month, day); -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr/set-data.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = setData; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__info__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/info.js"); - - -function setData(data) { - var locale = data.name; - var info = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */][locale] = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */][locale] || {}; - if (data.likelySubtags) { - var supplemental = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */].supplemental = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */].supplemental || {}; - supplemental.likelySubtags = Object.assign(supplemental.likelySubtags || {}, data.likelySubtags); - } - - var numbers = info.numbers; - - Object.assign(info, data); - - if (numbers && data.numbers) { - info.numbers = Object.assign({}, numbers, data.numbers); - } -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/cldr/territory.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = localeTerritory; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__info__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/info.js"); - - -function territoryFromName(name) { - var parts = name.split("-"); - var length = parts.length; - - if (length > 1) { - var territory = parts[ length - 1 ]; - return territory.toUpperCase(); - } -} - -function territoryFromName(name, identity) { - var likelySubtags = __WEBPACK_IMPORTED_MODULE_0__info__["a" /* cldr */].supplemental.likelySubtags; - var parts = name.split("-"); - if (likelySubtags) { - var likelyName = likelySubtags[name] || likelySubtags[parts[0]]; - if (likelyName) { - parts = likelyName.split("-"); - } - } - - if (identity) { - for (var idx = parts.length - 1; idx >= 1; idx--) { - var part = parts[idx]; - if (part === identity.variant || part === identity.script) { - parts.splice(idx, 1); - } - } - } - - var length = parts.length; - - if (length > 1) { - var territory = parts[length - 1]; - return territory.toUpperCase(); - } -} - -function localeTerritory(info) { - if (info.territory) { - return info.territory; - } - - var name = info.name; - var identity = info.identity; - var territory; - - if (identity && identity.territory) { - territory = identity.territory; - } else { - territory = territoryFromName(name, identity); - } - - info.territory = territory; - - return territory; -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/common/constants.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return DECIMAL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CURRENCY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ACCOUNTING; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return PERCENT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return SCIENTIFIC; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return CURRENCY_PLACEHOLDER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return PERCENT_PLACEHOLDER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return NUMBER_PLACEHOLDER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return LIST_SEPARATOR; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return GROUP_SEPARATOR; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return POINT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return EMPTY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return DEFAULT_LOCALE; }); -var DECIMAL = "decimal"; -var CURRENCY = "currency"; -var ACCOUNTING = "accounting"; -var PERCENT = "percent"; -var SCIENTIFIC = "scientific"; - -var CURRENCY_PLACEHOLDER = "$"; -var PERCENT_PLACEHOLDER = "%"; -var NUMBER_PLACEHOLDER = "n"; - -var LIST_SEPARATOR = ";"; -var GROUP_SEPARATOR = ","; - -var POINT = "."; -var EMPTY = ""; - -var DEFAULT_LOCALE = "en"; - - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/common/format-string.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = formatString; -var formatRegExp = /\{(\d+)}/g; - -function formatString(format) { - var values = arguments; - - return format.replace(formatRegExp, function (match, index) { - var value = values[parseInt(index, 10) + 1]; - - return value; - }); -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/common/is-date.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = isDate; -var objectToString = {}.toString; -var DATE_STRING = "[object Date]"; - -function isDate(value) { - return objectToString.call(value) === DATE_STRING; -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/common/is-number.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = isNumber; -function isNumber(value) { - return typeof value === "number"; -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/common/is-string.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = isString; -function isString(value) { - return typeof value === "string"; -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/common/pad.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = pad; -function pad(number, digits, right) { - if ( digits === void 0 ) digits = 2; - if ( right === void 0 ) right = false; - - var count = digits - String(number).length; - var result = number; - - if (count > 0) { - var padString = new Array(count + 1).join("0"); - result = right ? number + padString : padString + number; - } - - return result; -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/common/round.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = round; -var MAX_PRECISION = 20; - -function round(value, precision) { - var result = value; - var decimals = precision || 0; - - result = result.toString().split('e'); - result = Math.round(Number(result[0] + 'e' + (result[1] ? (Number(result[1]) + decimals) : decimals))); - - result = result.toString().split('e'); - result = Number(result[0] + 'e' + (result[1] ? (Number(result[1]) - decimals) : -decimals)); - - return result.toFixed(Math.min(decimals, MAX_PRECISION)); -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/dates.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dates_format_date__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates/format-date.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__dates_format_date__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__dates_parse_date__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates/parse-date.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__dates_parse_date__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__dates_split_date_format__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates/split-date-format.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__dates_split_date_format__["a"]; }); - - - - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/dates/constants.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return dateFormatRegExp; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DATE_FIELD_MAP; }); -var MONTH = 'month'; -var HOUR = 'hour'; -var ZONE = 'zone'; -var WEEKDAY = 'weekday'; -var QUARTER = 'quarter'; - -var DATE_FIELD_MAP = { - 'G': 'era', - 'y': 'year', - 'q': QUARTER, - 'Q': QUARTER, - 'M': MONTH, - 'L': MONTH, - 'd': 'day', - 'E': WEEKDAY, - 'c': WEEKDAY, - 'e': WEEKDAY, - 'h': HOUR, - 'H': HOUR, - 'k': HOUR, - 'K': HOUR, - 'm': 'minute', - 's': 'second', - 'a': 'dayperiod', - 'x': ZONE, - 'X': ZONE, - 'z': ZONE, - 'Z': ZONE -}; - -var dateFormatRegExp = /d{1,2}|E{1,6}|e{1,6}|c{3,6}|c{1}|M{1,5}|L{1,5}|y{1,4}|H{1,2}|h{1,2}|k{1,2}|K{1,2}|m{1,2}|a{1,5}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|x{1,5}|X{1,5}|G{1,5}|q{1,5}|Q{1,5}|"[^"]*"|'[^']*'/g; - - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/dates/date-name-type.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = dateNameType; -function dateNameType(formatLength) { - var nameType; - if (formatLength <= 3) { - nameType = "abbreviated"; - } else if (formatLength === 4) { - nameType = "wide"; - } else if (formatLength === 5) { - nameType = "narrow"; - } else if (formatLength === 6) { - nameType = "short"; - } - - return nameType; -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/dates/date-pattern.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = datePattern; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_format_string__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/format-string.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_is_string__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/is-string.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); - - - - -var REMOVAL_PENALTY = 120; -var ADDITION_PENALTY = 20; -var LENGHT_DELTA = [ 2, 1, 5, 3, 4 ]; -var LONG_LESS_PENALTY_DELTA = -2; -var SHORT_LESS_PENALTY_DELTA = -1; -var SHORT_MORE_PENALTY_DELTA = 1; -var LONG_MORE_PENALTY_DELTA = 2; - -var PENALTIES = {}; -PENALTIES[LONG_LESS_PENALTY_DELTA.toString()] = 8; -PENALTIES[SHORT_LESS_PENALTY_DELTA.toString()] = 6; -PENALTIES[LONG_MORE_PENALTY_DELTA.toString()] = 6; -PENALTIES[SHORT_MORE_PENALTY_DELTA.toString()] = 3; - -var VALUE_FORMAT_LENGTH = { - numeric: 1, - "2-digit": 2, - short: 3, - long: 4, - narrow: 5 -}; - -var TIME_SPECIFIERS_REGEX = /[hHmsSzZoOvVxX]/; - -function getHourSpecifier(options) { - return options.hour12 ? "h" : "H"; -} - -var DATE_OPTIONS_MAP = [ { - key: "era", - specifier: "G" -}, { - key: "year", - specifier: "y" -}, { - key: "month", - specifier: "M" -}, { - key: "day", - specifier: "d" -}, { - key: "weekday", - specifier: "E" -}, { - key: "hour", - getSpecifier: getHourSpecifier -}, { - key: "minute", - specifier: "m" -}, { - key: "second", - specifier: "s" -}, { - key: "timeZoneName", - specifier: "z" -} ]; - -var STAND_ALONE_SPECIFIERS = { - e: 'c', - E: 'c', - M: 'L', - Q: 'q' -}; - -var specifiersRegex = {}; -var resolvedFormats = {}; - -function getSpecifierRegex(specifier) { - if (!specifiersRegex[specifier]) { - specifiersRegex[specifier] = new RegExp(specifier + "+"); - } - return specifiersRegex[specifier]; -} - -function skeletonSpecifiers(skeleton) { - var result = []; - var current = skeleton.charAt(0); - var specifier = current; - for (var idx = 1; idx < skeleton.length; idx++) { - var character = skeleton.charAt(idx); - if (character === specifier) { - current += character; - } else { - result.push(current); - current = specifier = character; - } - } - - result.push(current); - - return result; -} - -function findBestMatch(specifiers, availableFormats) { - var specifiersLength = specifiers.length; - var maxScore = -Number.MAX_VALUE; - var bestMatches, result; - for (var format in availableFormats) { - var matches = []; - var currentFormat = format.replace("v", "z"); - var score = 0; - for (var idx = 0; idx < specifiersLength; idx++) { - var specifier = specifiers[idx]; - var specifierRegex = getSpecifierRegex(specifier[0]); - var match = (specifierRegex.exec(currentFormat) || [])[0]; - - if (!match) { - score -= REMOVAL_PENALTY; - } else { - currentFormat = currentFormat.replace(match, __WEBPACK_IMPORTED_MODULE_2__common_constants__["f" /* EMPTY */]); - if (match.length !== specifier.length) { - var delta = Math.max(Math.min(LENGHT_DELTA[match.length] - LENGHT_DELTA[specifier.length], 2), -2); - score -= PENALTIES[delta]; - } - } - - matches.push(match); - - if (score < maxScore) { - break; - } - } - - if (currentFormat.length) { - score -= skeletonSpecifiers(currentFormat).length * ADDITION_PENALTY; - } - - if (score > maxScore) { - maxScore = score; - bestMatches = matches; - result = availableFormats[format]; - } - } - - result = result.replace("v", "z"); - - for (var idx$1 = 0; idx$1 < specifiersLength; idx$1++) { - var bestMatch = bestMatches[idx$1]; - if (bestMatch && bestMatch !== specifiers[idx$1]) { - var matchSpecifier = bestMatches[idx$1][0]; - result = result.replace(getSpecifierRegex(matchSpecifier), specifiers[idx$1]); - if (STAND_ALONE_SPECIFIERS[matchSpecifier]) { - result = result.replace(getSpecifierRegex(STAND_ALONE_SPECIFIERS[matchSpecifier]), specifiers[idx$1]); - } - } - } - - return result; -} - -function cacheFormat(skeleton, format, locale) { - if (!resolvedFormats[locale]) { - resolvedFormats[locale] = {}; - } - resolvedFormats[locale][skeleton] = format; -} - - -function skeletonFormat(skeleton, info) { - var availableFormats = info.calendar.dateTimeFormats.availableFormats; - if (availableFormats[skeleton]) { - return availableFormats[skeleton]; - } - if (resolvedFormats[info.name] && resolvedFormats[info.name][skeleton]) { - return resolvedFormats[info.name][skeleton]; - } - var timeStartIndex = skeleton.search(TIME_SPECIFIERS_REGEX); - var result; - if (timeStartIndex > 0) { - var dateSkeleton = skeleton.substr(0, timeStartIndex); - var timeSkeleton = skeleton.substr(timeStartIndex); - - result = Object(__WEBPACK_IMPORTED_MODULE_0__common_format_string__["a" /* default */])(info.calendar.dateTimeFormats.short, //should be deterimed based on specifiers - availableFormats[timeSkeleton] || findBestMatch(skeletonSpecifiers(timeSkeleton), availableFormats), - availableFormats[dateSkeleton] || findBestMatch(skeletonSpecifiers(dateSkeleton), availableFormats)); - } else { - result = findBestMatch(skeletonSpecifiers(skeleton), availableFormats); - } - - cacheFormat(skeleton, result, info.name); - return result; -} - -function skeletonFromOptions(options) { - var result = []; - for (var idx = 0; idx < DATE_OPTIONS_MAP.length; idx++) { - var option = DATE_OPTIONS_MAP[idx]; - var field = option.key; - var value = options[field]; - if (value) { - var spcifier = option.specifier || option.getSpecifier(options); - result.push(spcifier.repeat(VALUE_FORMAT_LENGTH[value])); - } - } - - return result.join(__WEBPACK_IMPORTED_MODULE_2__common_constants__["f" /* EMPTY */]); -} - -function datePattern(format, info) { - var calendar = info.calendar; - var result; - if (Object(__WEBPACK_IMPORTED_MODULE_1__common_is_string__["a" /* default */])(format)) { - if (calendar.patterns[format]) { - result = calendar.patterns[format]; - } else { - result = format; - } - } else if (format) { - if (format.pattern) { - return format.pattern; - } - - var skeleton = format.skeleton; - if (!skeleton) { - if (format.datetime) { - result = Object(__WEBPACK_IMPORTED_MODULE_0__common_format_string__["a" /* default */])(calendar.dateTimeFormats[format.datetime], calendar.timeFormats[format.datetime], calendar.dateFormats[format.datetime]); - } else if (format.date) { - result = calendar.dateFormats[format.date]; - } else if (format.time) { - result = calendar.timeFormats[format.time]; - } else { - skeleton = skeletonFromOptions(format); - } - } - - if (skeleton) { - result = skeletonFormat(skeleton, info); - } - } - - if (!result) { - result = calendar.patterns.d; - } - - return result; -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/dates/format-date.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = formatDate; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cldr__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_format_string__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/format-string.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__date_pattern__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates/date-pattern.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__format_names__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates/format-names.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_pad__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/pad.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_is_date__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/is-date.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates/constants.js"); - - - - - - - - - -function formatDayOfWeekIndex(day, formatLength, localeInfo) { - var firstDayIndex = Object(__WEBPACK_IMPORTED_MODULE_0__cldr__["f" /* firstDay */])(localeInfo); - var dayIndex; - if (day < firstDayIndex) { - dayIndex = 7 - firstDayIndex + day; - } else { - dayIndex = day - firstDayIndex; - } - - return dayIndex + 1; -} - -function formatMonth(month, formatLength, info, standAlone) { - if (formatLength <= 2) { - return Object(__WEBPACK_IMPORTED_MODULE_5__common_pad__["a" /* default */])(month + 1, formatLength); - } - return Object(__WEBPACK_IMPORTED_MODULE_4__format_names__["a" /* default */])(info, "months", formatLength, standAlone)[month]; -} - -function formatQuarter(date, formatLength, info, standAlone) { - var quarter = Math.floor(date.getMonth() / 3); - if (formatLength < 3) { - return quarter + 1; - } - - return Object(__WEBPACK_IMPORTED_MODULE_4__format_names__["a" /* default */])(info, "quarters", formatLength, standAlone)[quarter]; -} - - -function formatTimeZone(date, info, options) { - var shortHours = options.shortHours; - var optionalMinutes = options.optionalMinutes; - var separator = options.separator; - var localizedName = options.localizedName; - var zZeroOffset = options.zZeroOffset; - var offset = date.getTimezoneOffset() / 60; - if (offset === 0 && zZeroOffset) { - return "Z"; - } - var sign = offset <= 0 ? "+" : "-"; - var hoursMinutes = Math.abs(offset).toString().split("."); - var minutes = hoursMinutes[1] || 0; - var result = sign + (shortHours ? hoursMinutes[0] : Object(__WEBPACK_IMPORTED_MODULE_5__common_pad__["a" /* default */])(hoursMinutes[0], 2)); - if (minutes || !optionalMinutes) { - result += (separator ? ":" : __WEBPACK_IMPORTED_MODULE_1__common_constants__["f" /* EMPTY */]) + Object(__WEBPACK_IMPORTED_MODULE_5__common_pad__["a" /* default */])(minutes, 2); - } - - if (localizedName) { - var localizedFormat = offset === 0 ? info.calendar.gmtZeroFormat : info.calendar.gmtFormat; - result = Object(__WEBPACK_IMPORTED_MODULE_2__common_format_string__["a" /* default */])(localizedFormat, result); - } - - return result; -} - -function formatDayOfWeek(date, formatLength, info, standAlone) { - var result; - if (formatLength < 3) { - result = formatDayOfWeekIndex(date.getDay(), formatLength, info); - } else { - result = Object(__WEBPACK_IMPORTED_MODULE_4__format_names__["a" /* default */])(info, "days", formatLength, standAlone)[date.getDay()]; - } - return result; -} - -var formatters = {}; - -formatters.d = function(date, formatLength) { - return Object(__WEBPACK_IMPORTED_MODULE_5__common_pad__["a" /* default */])(date.getDate(), formatLength); -}; - -formatters.E = function(date, formatLength, info) { - return Object(__WEBPACK_IMPORTED_MODULE_4__format_names__["a" /* default */])(info, "days", formatLength)[date.getDay()]; -}; - -formatters.M = function(date, formatLength, info) { - return formatMonth(date.getMonth(), formatLength, info, false); -}; - -formatters.L = function(date, formatLength, info) { - return formatMonth(date.getMonth(), formatLength, info, true); -}; - -formatters.y = function(date, formatLength) { - var year = date.getFullYear(); - if (formatLength === 2) { - year = year % 100; - } - return Object(__WEBPACK_IMPORTED_MODULE_5__common_pad__["a" /* default */])(year, formatLength); -}; - -formatters.h = function(date, formatLength) { - var hours = date.getHours() % 12 || 12; - return Object(__WEBPACK_IMPORTED_MODULE_5__common_pad__["a" /* default */])(hours, formatLength); -}; - -formatters.H = function(date, formatLength) { - return Object(__WEBPACK_IMPORTED_MODULE_5__common_pad__["a" /* default */])(date.getHours(), formatLength); -}; - -formatters.k = function(date, formatLength) { - return Object(__WEBPACK_IMPORTED_MODULE_5__common_pad__["a" /* default */])(date.getHours() || 24, formatLength); -}; - -formatters.K = function(date, formatLength) { - return Object(__WEBPACK_IMPORTED_MODULE_5__common_pad__["a" /* default */])(date.getHours() % 12, formatLength); -}; - -formatters.m = function(date, formatLength) { - return Object(__WEBPACK_IMPORTED_MODULE_5__common_pad__["a" /* default */])(date.getMinutes(), formatLength); -}; - -formatters.s = function(date, formatLength) { - return Object(__WEBPACK_IMPORTED_MODULE_5__common_pad__["a" /* default */])(date.getSeconds(), formatLength); -}; - -formatters.S = function(date, formatLength) { - var milliseconds = date.getMilliseconds(); - var result; - if (milliseconds !== 0) { - result = String(date.getMilliseconds() / 1000).split(".")[1].substr(0, formatLength); - } else { - result = Object(__WEBPACK_IMPORTED_MODULE_5__common_pad__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__common_constants__["f" /* EMPTY */], formatLength); - } - return result; -}; - -formatters.a = function(date, formatLength, info) { - return Object(__WEBPACK_IMPORTED_MODULE_4__format_names__["a" /* default */])(info, "dayPeriods", formatLength)[date.getHours() < 12 ? "am" : "pm"]; -}; - -formatters.z = function(date, formatLength, info) { - return formatTimeZone(date, info, { - shortHours: formatLength < 4, - optionalMinutes: formatLength < 4, - separator: true, - localizedName: true - }); -}; - -formatters.Z = function(date, formatLength, info) { - return formatTimeZone(date, info, { - separator: formatLength > 3, - localizedName: formatLength === 4, - zZeroOffset: formatLength === 5 - }); -}; - -formatters.x = function(date, formatLength, info) { - return formatTimeZone(date, info, { - optionalMinutes: formatLength === 1, - separator: formatLength === 3 || formatLength === 5 - }); -}; - -formatters.X = function(date, formatLength, info) { - return formatTimeZone(date, info, { - optionalMinutes: formatLength === 1, - separator: formatLength === 3 || formatLength === 5, - zZeroOffset: true - }); -}; - -formatters.G = function(date, formatLength, info) { - var era = date.getFullYear() >= 0 ? 1 : 0; - return Object(__WEBPACK_IMPORTED_MODULE_4__format_names__["a" /* default */])(info, "eras", formatLength)[era]; -}; - -formatters.e = formatDayOfWeek; - -formatters.c = function(date, formatLength, info) { - return formatDayOfWeek(date, formatLength, info, true); -}; - -formatters.q = function(date, formatLength, info) { - return formatQuarter(date, formatLength, info, true); -}; - -formatters.Q = formatQuarter; - -function formatDate(date, format, locale) { - if ( locale === void 0 ) locale = __WEBPACK_IMPORTED_MODULE_1__common_constants__["e" /* DEFAULT_LOCALE */]; - - if (!Object(__WEBPACK_IMPORTED_MODULE_6__common_is_date__["a" /* default */])(date)) { - if (date === undefined || date === null) { - return __WEBPACK_IMPORTED_MODULE_1__common_constants__["f" /* EMPTY */]; - } - return date; - } - - var info = Object(__WEBPACK_IMPORTED_MODULE_0__cldr__["i" /* localeInfo */])(locale); - var pattern = Object(__WEBPACK_IMPORTED_MODULE_3__date_pattern__["a" /* default */])(format, info); - - return pattern.replace(__WEBPACK_IMPORTED_MODULE_7__constants__["b" /* dateFormatRegExp */], function(match) { - var formatLength = match.length; - var result; - - if (match.includes("'") || match.includes("\"")) { - result = match.slice(1, formatLength - 1); - } else { - result = formatters[match[0]](date, formatLength, info); - } - - return result; - }); -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/dates/format-names.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = formatNames; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cldr_date_format_names__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr/date-format-names.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__date_name_type__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates/date-name-type.js"); - - - -function formatNames(locale, type, formatLength, standAlone, lower) { - return Object(__WEBPACK_IMPORTED_MODULE_0__cldr_date_format_names__["a" /* default */])(locale, { - type: type, - nameType: Object(__WEBPACK_IMPORTED_MODULE_1__date_name_type__["a" /* default */])(formatLength), - standAlone: standAlone, - lower: lower - }); -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/dates/parse-date.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = parseDate; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__time_utils__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates/time-utils.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cldr__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__errors__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/errors.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__format_names__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates/format-names.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__date_pattern__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates/date-pattern.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_round__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/round.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common_is_date__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/is-date.js"); - - - - - - - - - -var timeZoneOffsetRegExp = /([+|\-]\d{1,2})(:?)(\d{2})?/; -var dateRegExp = /^\/Date\((.*?)\)\/$/; -var offsetRegExp = /[+-]\d*/; -var numberRegExp = { - 2: /^\d{1,2}/, - 3: /^\d{1,3}/, - 4: /^\d{4}/ -}; -var numberRegex = /\d+/; -var PLACEHOLDER = "{0}"; - -var standardDateFormats = [ - "yyyy/MM/dd HH:mm:ss", - "yyyy/MM/dd HH:mm", - "yyyy/MM/dd", - "E MMM dd yyyy HH:mm:ss", - "yyyy-MM-ddTHH:mm:ss.SSSSSSSXXX", - "yyyy-MM-ddTHH:mm:ss.SSSXXX", - "yyyy-MM-ddTHH:mm:ssXXX", - "yyyy-MM-ddTHH:mm:ss.SSSSSSS", - "yyyy-MM-ddTHH:mm:ss.SSS", - "yyyy-MM-ddTHH:mmXXX", - "yyyy-MM-ddTHH:mmX", - "yyyy-MM-ddTHH:mm:ss", - "yyyy-MM-ddTHH:mm", - "yyyy-MM-dd HH:mm:ss", - "yyyy-MM-dd HH:mm", - "yyyy-MM-dd", - "HH:mm:ss", - "HH:mm" -]; -var FORMATS_SEQUENCE = [ "G", "g", "F", "Y", "y", "M", "m", "D", "d", "y", "T", "t" ]; -var TWO_DIGIT_YEAR_MAX = 2029; - -function outOfRange(value, start, end) { - return !(value >= start && value <= end); -} - -function lookAhead(match, state) { - var format = state.format; - var idx = state.idx; - var i = 0; - while (format[idx] === match) { - i++; - idx++; - } - if (i > 0) { - idx -= 1; - } - state.idx = idx; - return i; -} - -function getNumber(size, state) { - var regex = size ? (numberRegExp[size] || new RegExp('^\\d{1,' + size + '}')) : numberRegex, - match = state.value.substr(state.valueIdx, size).match(regex); - - if (match) { - match = match[0]; - state.valueIdx += match.length; - return parseInt(match, 10); - } - return null; -} - -function getIndexByName(names, state, lower) { - var i = 0, - length = names.length, - name, nameLength, - matchLength = 0, - matchIdx = 0, - subValue; - - for (; i < length; i++) { - name = names[i]; - nameLength = name.length; - subValue = state.value.substr(state.valueIdx, nameLength); - - if (lower) { - subValue = subValue.toLowerCase(); - } - - if (subValue === name && nameLength > matchLength) { - matchLength = nameLength; - matchIdx = i; - } - } - - if (matchLength) { - state.valueIdx += matchLength; - return matchIdx + 1; - } - - return null; -} - -function checkLiteral(state) { - var result = false; - if (state.value.charAt(state.valueIdx) === state.format[state.idx]) { - state.valueIdx++; - result = true; - } - return result; -} - -function calendarGmtFormats(calendar) { - var gmtFormat = calendar.gmtFormat; - var gmtZeroFormat = calendar.gmtZeroFormat; - if (!gmtFormat) { - throw __WEBPACK_IMPORTED_MODULE_3__errors__["a" /* errors */].NoGMTInfo.error(); - } - - return [ gmtFormat.replace(PLACEHOLDER, __WEBPACK_IMPORTED_MODULE_2__common_constants__["f" /* EMPTY */]).toLowerCase(), gmtZeroFormat.replace(PLACEHOLDER, __WEBPACK_IMPORTED_MODULE_2__common_constants__["f" /* EMPTY */]).toLowerCase() ]; -} - -function parseTimeZoneOffset(state, info, options) { - var shortHours = options.shortHours; - var noSeparator = options.noSeparator; - var optionalMinutes = options.optionalMinutes; - var localizedName = options.localizedName; - var zLiteral = options.zLiteral; - state.UTC = true; - - if (zLiteral && state.value.charAt(state.valueIdx) === "Z") { - state.valueIdx++; - return false; - } - - if (localizedName && !getIndexByName(calendarGmtFormats(info.calendar), state, true)) { - return true; - } - - var matches = timeZoneOffsetRegExp.exec(state.value.substr(state.valueIdx, 6)); - if (!matches) { - return !localizedName; - } - - var hoursMatch = matches[1]; - var minutesMatch = matches[3]; - var hoursOffset = parseInt(hoursMatch, 10); - var separator = matches[2]; - var minutesOffset = parseInt(minutesMatch, 10); - - if (isNaN(hoursOffset) || (!shortHours && hoursMatch.length !== 3) || (!optionalMinutes && isNaN(minutesOffset)) || (noSeparator && separator)) { - return true; - } - - if (isNaN(minutesOffset)) { - minutesOffset = null; - } - - if (outOfRange(hoursOffset, -12, 13) || (minutesOffset && outOfRange(minutesOffset, 0, 59))) { - return true; - } - - state.valueIdx += matches[0].length; - state.hoursOffset = hoursOffset; - state.minutesOffset = minutesOffset; -} - -function parseMonth(ch, state, info) { - var count = lookAhead(ch, state); - var names = Object(__WEBPACK_IMPORTED_MODULE_4__format_names__["a" /* default */])(info, "months", count, ch === "L", true); - - var month = count < 3 ? getNumber(2, state) : getIndexByName(names, state, true); - - if (month === null || outOfRange(month, 1, 12)) { - return true; - } - state.month = month - 1; -} - -function parseDayOfWeek(ch, state, info) { - var count = lookAhead(ch, state); - var names = Object(__WEBPACK_IMPORTED_MODULE_4__format_names__["a" /* default */])(info, "days", count, ch === "c", true); - var dayOfWeek = count < 3 ? getNumber(1, state) : getIndexByName(names, state, true); - if ((!dayOfWeek && dayOfWeek !== 0) || outOfRange(dayOfWeek, 1, 7)) { - return true; - } -} - -var parsers = {}; - -parsers.d = function(state) { - lookAhead("d", state); - var day = getNumber(2, state); - - if (day === null || outOfRange(day, 1, 31)) { - return true; - } - - if (state.day === null) { - state.day = day; - } -}; - -parsers.E = function(state, info) { - var count = lookAhead("E", state); - //validate if it matches the day? - var dayOfWeek = getIndexByName(Object(__WEBPACK_IMPORTED_MODULE_4__format_names__["a" /* default */])(info, "days", count, false, true), state, true); - if (dayOfWeek === null) { - return true; - } -}; - -parsers.M = function(state, info) { - return parseMonth("M", state, info); -}; - -parsers.L = function(state, info) { - return parseMonth("L", state, info); -}; - -parsers.y = function(state) { - var count = lookAhead("y", state); - var year = getNumber(count === 1 ? undefined : count, state); - - if (year === null) { - return true; - } - - if (count === 2) { - var currentYear = new Date().getFullYear(); - year = (currentYear - currentYear % 100) + year; - if (year > TWO_DIGIT_YEAR_MAX) { - year -= 100; - } - } - - state.year = year; -}; - -parsers.h = function(state) { - lookAhead("h", state); - - var hours = getNumber(2, state); - if (hours === 12) { - hours = 0; - } - - if (hours === null || outOfRange(hours, 0, 11)) { - return true; - } - - state.hours = hours; -}; - -parsers.K = function(state) { - lookAhead("K", state); - - var hours = getNumber(2, state); - - if (hours === null || outOfRange(hours, 0, 11)) { - return true; - } - - state.hours = hours; -}; - -parsers.a = function(state, info) { - var count = lookAhead("a", state); - var periodFormats = Object(__WEBPACK_IMPORTED_MODULE_4__format_names__["a" /* default */])(info, "dayPeriods", count, false, true); - - var pmHour = getIndexByName([ periodFormats.pm ], state, true); - if (!pmHour && !getIndexByName([ periodFormats.am ], state, true)) { - return true; - } - - state.pmHour = pmHour; -}; - -parsers.H = function(state) { - lookAhead("H", state); - var hours = getNumber(2, state); - if (hours === null || outOfRange(hours, 0, 23)) { - return true; - } - state.hours = hours; -}; - -parsers.k = function(state) { - lookAhead("k", state); - - var hours = getNumber(2, state); - - if (hours === null || outOfRange(hours, 1, 24)) { - return true; - } - - state.hours = hours === 24 ? 0 : hours; -}; - -parsers.m = function(state) { - lookAhead("m", state); - var minutes = getNumber(2, state); - - if (minutes === null || outOfRange(minutes, 0, 59)) { - return true; - } - - state.minutes = minutes; -}; - -parsers.s = function(state) { - lookAhead("s", state); - var seconds = getNumber(2, state); - if (seconds === null || outOfRange(seconds, 0, 59)) { - return true; - } - state.seconds = seconds; -}; - -parsers.S = function(state) { - var count = lookAhead("S", state); - var match = state.value.substr(state.valueIdx, count); - var milliseconds = null; - - if (!isNaN(parseInt(match, 10))) { - milliseconds = parseFloat("0." + match, 10); - milliseconds = Object(__WEBPACK_IMPORTED_MODULE_6__common_round__["a" /* default */])(milliseconds, 3); - milliseconds *= 1000; - state.valueIdx += count; - } - - if (milliseconds === null || outOfRange(milliseconds, 0, 999)) { - return true; - } - - state.milliseconds = milliseconds; -}; - -parsers.z = function(state, info) { - var count = lookAhead("z", state); - - var shortFormat = count < 4; - - var invalid = parseTimeZoneOffset(state, info, { - shortHours: shortFormat, - optionalMinutes: shortFormat, - localizedName: true - }); - - if (invalid) { - return invalid; - } -}; - -parsers.Z = function(state, info) { - var count = lookAhead("Z", state); - - var invalid = parseTimeZoneOffset(state, info, { - noSeparator: count < 4, - zLiteral: count === 5, - localizedName: count === 4 - }); - - if (invalid) { - return invalid; - } -}; - -parsers.x = function(state, info) { - var count = lookAhead("x", state); - - var invalid = parseTimeZoneOffset(state, info, { - noSeparator: count !== 3 && count !== 5, - optionalMinutes: count === 1 - }); - if (invalid) { - return invalid; - } -}; - -parsers.X = function(state, info) { - var count = lookAhead("X", state); - - var invalid = parseTimeZoneOffset(state, info, { - noSeparator: count !== 3 && count !== 5, - optionalMinutes: count === 1, - zLiteral: true - }); - if (invalid) { - return invalid; - } -}; - -parsers.G = function(state, info) { - var count = lookAhead("G", state); - var eras = Object(__WEBPACK_IMPORTED_MODULE_4__format_names__["a" /* default */])(info, "eras", count, false, true); - var era = getIndexByName([ eras[0], eras[1] ], state, true); - - if (era === null) { - return true; - } -}; - -parsers.e = function(state, info) { - return parseDayOfWeek("e", state, info); -}; - -parsers.c = function(state, info) { - return parseDayOfWeek("c", state, info); -}; - -function createDate(state) { - var year = state.year; - var month = state.month; - var day = state.day; - var hours = state.hours; - var minutes = state.minutes; - var seconds = state.seconds; - var milliseconds = state.milliseconds; - var pmHour = state.pmHour; - var UTC = state.UTC; - var hoursOffset = state.hoursOffset; - var minutesOffset = state.minutesOffset; - var hasTime = hours !== null || minutes !== null || seconds || null; - var date = new Date(); - var result; - - if (year === null && month === null && day === null && hasTime) { - year = date.getFullYear(); - month = date.getMonth(); - day = date.getDate(); - } else { - if (year === null) { - year = date.getFullYear(); - } - - if (day === null) { - day = 1; - } - } - - if (pmHour && hours < 12) { - hours += 12; - } - - if (UTC) { - if (hoursOffset) { - hours += -hoursOffset; - } - - if (minutesOffset) { - minutes += -minutesOffset * (hoursOffset < 0 ? -1 : 1); - } - - result = new Date(Date.UTC(year, month, day, hours, minutes, seconds, milliseconds)); - } else { - result = new Date(year, month, day, hours, minutes, seconds, milliseconds); - Object(__WEBPACK_IMPORTED_MODULE_0__time_utils__["a" /* adjustDST */])(result, hours); - } - - if (year < 100) { - result.setFullYear(year); - } - - if (result.getDate() !== day && UTC === undefined) { - return null; - } - - return result; -} - -function parseExact(value, format, info) { - var pattern = Object(__WEBPACK_IMPORTED_MODULE_5__date_pattern__["a" /* default */])(format, info).split(__WEBPACK_IMPORTED_MODULE_2__common_constants__["f" /* EMPTY */]); - - var state = { - format: pattern, - idx: 0, - value: value, - valueIdx: 0, - year: null, - month: null, - day: null, - hours: null, - minutes: null, - seconds: null, - milliseconds: null - }; - var length = pattern.length; - var literal = false; - - for (; state.idx < length; state.idx++) { - var ch = pattern[state.idx]; - - if (literal) { - if (ch === "'") { - literal = false; - } - - checkLiteral(state); - } else { - if (parsers[ch]) { - var invalid = parsers[ch](state, info); - if (invalid) { - return null; - } - } else if (ch === "'") { - literal = true; - checkLiteral(state); - } else if (!checkLiteral(state)) { - return null; - } - } - } - - if (state.valueIdx < value.length) { - return null; - } - - return createDate(state) || null; -} - -function parseMicrosoftDateOffset(offset) { - var sign = offset.substr(0, 1) === "-" ? -1 : 1; - - var result = offset.substring(1); - result = (parseInt(result.substr(0, 2), 10) * 60) + parseInt(result.substring(2), 10); - - return sign * result; -} - -function parseMicrosoftDateFormat(value) { - if (value && value.indexOf("/D") === 0) { - var date = dateRegExp.exec(value); - if (date) { - date = date[1]; - var tzoffset = offsetRegExp.exec(date.substring(1)); - - date = new Date(parseInt(date, 10)); - - if (tzoffset) { - tzoffset = parseMicrosoftDateOffset(tzoffset[0]); - date = Object(__WEBPACK_IMPORTED_MODULE_0__time_utils__["b" /* convertTimeZone */])(date, date.getTimezoneOffset(), 0); - date = Object(__WEBPACK_IMPORTED_MODULE_0__time_utils__["b" /* convertTimeZone */])(date, 0, -1 * tzoffset); - } - - return date; - } - } -} - -function defaultFormats(calendar) { - var formats = []; - var patterns = calendar.patterns; - var length = FORMATS_SEQUENCE.length; - - for (var idx = 0; idx < length; idx++) { - formats.push(patterns[FORMATS_SEQUENCE[idx]]); - } - - return formats.concat(standardDateFormats); -} - -function parseDate(value, formats, locale) { - if ( locale === void 0 ) locale = __WEBPACK_IMPORTED_MODULE_2__common_constants__["e" /* DEFAULT_LOCALE */]; - - if (!value) { - return null; - } - - if (Object(__WEBPACK_IMPORTED_MODULE_7__common_is_date__["a" /* default */])(value)) { - return value; - } - - var parseValue = String(value).trim(); - var date = parseMicrosoftDateFormat(parseValue); - if (date) { - return date; - } - - var info = Object(__WEBPACK_IMPORTED_MODULE_1__cldr__["i" /* localeInfo */])(locale); - var parseFormats = formats || defaultFormats(info.calendar); - parseFormats = Array.isArray(parseFormats) ? parseFormats : [ parseFormats ]; - - var length = parseFormats.length; - - for (var idx = 0; idx < length; idx++) { - date = parseExact(parseValue, parseFormats[idx], info); - if (date) { - return date; - } - } - - return date; -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/dates/split-date-format.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = splitDateFormat; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_is_number__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/is-number.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__date_pattern__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates/date-pattern.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__date_name_type__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates/date-name-type.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__cldr__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr.js"); - - - - - - - -var NAME_TYPES = { - month: { - type: 'months', - minLength: 3, - standAlone: 'L' - }, - - quarter: { - type: 'quarters', - minLength: 3, - standAlone: 'q' - }, - - weekday: { - type: 'days', - minLength: { - E: 0, - c: 3, - e: 3 - }, - standAlone: 'c' - }, - - dayperiod: { - type: 'dayPeriods', - minLength: 0 - }, - - era: { - type: 'eras', - minLength: 0 - } -}; - -var LITERAL = 'literal'; - -function addLiteral(parts, value) { - var lastPart = parts[parts.length - 1]; - if (lastPart && lastPart.type === LITERAL) { - lastPart.pattern += value; - } else { - parts.push({ - type: LITERAL, - pattern: value - }); - } -} - -function isHour12(pattern) { - return pattern === 'h' || pattern === 'K'; -} - -function splitDateFormat(format, locale) { - if ( locale === void 0 ) locale = __WEBPACK_IMPORTED_MODULE_0__common_constants__["e" /* DEFAULT_LOCALE */]; - - var info = Object(__WEBPACK_IMPORTED_MODULE_5__cldr__["i" /* localeInfo */])(locale); - var pattern = Object(__WEBPACK_IMPORTED_MODULE_2__date_pattern__["a" /* default */])(format, info); - var parts = []; - var lastIndex = __WEBPACK_IMPORTED_MODULE_4__constants__["b" /* dateFormatRegExp */].lastIndex = 0; - var match = __WEBPACK_IMPORTED_MODULE_4__constants__["b" /* dateFormatRegExp */].exec(pattern); - - while (match) { - var value = match[0]; - - if (lastIndex < match.index) { - addLiteral(parts, pattern.substring(lastIndex, match.index)); - } - - if (value.startsWith('"') || value.startsWith("'")) { - addLiteral(parts, value); - } else { - var specifier = value[0]; - var type = __WEBPACK_IMPORTED_MODULE_4__constants__["a" /* DATE_FIELD_MAP */][specifier]; - var part = { - type: type, - pattern: value - }; - - if (type === 'hour') { - part.hour12 = isHour12(value); - } - - var names = NAME_TYPES[type]; - - if (names) { - var minLength = Object(__WEBPACK_IMPORTED_MODULE_1__common_is_number__["a" /* default */])(names.minLength) ? names.minLength : names.minLength[specifier]; - var patternLength = value.length; - - if (patternLength >= minLength) { - part.names = { - type: names.type, - nameType: Object(__WEBPACK_IMPORTED_MODULE_3__date_name_type__["a" /* default */])(patternLength), - standAlone: names.standAlone === specifier - }; - } - } - - parts.push(part); - } - - lastIndex = __WEBPACK_IMPORTED_MODULE_4__constants__["b" /* dateFormatRegExp */].lastIndex; - match = __WEBPACK_IMPORTED_MODULE_4__constants__["b" /* dateFormatRegExp */].exec(pattern); - } - - if (lastIndex < pattern.length) { - addLiteral(parts, pattern.substring(lastIndex)); - } - - return parts; -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/dates/time-utils.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["b"] = convertTimeZone; -/* harmony export (immutable) */ __webpack_exports__["a"] = adjustDST; -function convertTimeZone(date, fromOffset, toOffset) { - var fromLocalOffset = date.getTimezoneOffset(); - - var offsetDate = new Date(date.getTime() + (fromOffset - toOffset) * 60000); - - var toLocalOffset = offsetDate.getTimezoneOffset(); - - return new Date(offsetDate.getTime() + (toLocalOffset - fromLocalOffset) * 60000); -} - -function adjustDST(date, hours) { - if (!hours && date.getHours() === 23) { - date.setHours(date.getHours() + 2); - } -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/error-details.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -//The error is represented by unique name and corresponding message -//The message can contain placeholders with index, e.g. {0}, {1} - -/* harmony default export */ __webpack_exports__["a"] = ({ - "NoLocale": "Missing locale info for '{0}'", - "NoCurrency": "Cannot determine currency information. Please load the locale currencies data.", - "NoSupplementalCurrency": "Cannot determine currency. Please load the supplemental currencyData.", - "NoCurrencyRegion": "No currency data for region '{0}'", - "NoCurrencyDisplay": "Cannot determine currency display information. Please load the locale currencies data. The default culture does not include the all currencies data.", - "NoGMTInfo": "Cannot determine locale GMT format. Please load the locale timeZoneNames data.", - "NoWeekData": "Cannot determine locale first day of week. Please load the supplemental weekData.", - "NoFirstDay": "Cannot determine locale first day of week. Please load the supplemental weekData. The default culture includes only the 'en-US' first day info.", - "NoValidCurrency": "Cannot determine a default currency for the {0} locale. Please specify explicitly the currency with the format options.", - "NoDateFieldNames": "Cannot determine the locale date field names. Please load the locale dateFields data." -}); - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/errors.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return errors; }); -/* unused harmony export IntlError */ -/* unused harmony export toIntlErrors */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__error_details__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/error-details.js"); - - -var formatRegExp = /\{(\d+)}?\}/g; - -var IntlError = function IntlError(ref) { - var name = ref.name; - var message = ref.message; - - if (!name || !message) { - throw new Error("{ name: string, message: string } object is required!"); - } - - this.name = name; - this.message = message; -}; - -IntlError.prototype.formatMessage = function formatMessage () { - var values = [], len = arguments.length; - while ( len-- ) values[ len ] = arguments[ len ]; - - var flattenValues = flatten(values); - - var formattedMessage = this.message.replace(formatRegExp, function(match, index) { - return flattenValues[parseInt(index, 10)]; - }); - - return ((this.name) + ": " + formattedMessage); -}; - -IntlError.prototype.error = function error () { - var values = [], len = arguments.length; - while ( len-- ) values[ len ] = arguments[ len ]; - - return new Error(this.formatMessage(values)); -}; - -var flatten = function(arr) { - return arr.reduce(function (a, b) { return a.concat(b); }, []); -}; - -var toIntlErrors = function(errors) { - var predicate = function(prev, name) { - prev[name] = new IntlError({ name: name, message: errors[name] }); - return prev; - }; - - return Object.keys(errors).reduce(predicate, {}); -}; - -var errors = toIntlErrors(__WEBPACK_IMPORTED_MODULE_0__error_details__["a" /* default */]); - - - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/format.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["b"] = toString; -/* harmony export (immutable) */ __webpack_exports__["a"] = format; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dates__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__numbers__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_is_date__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/is-date.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_is_number__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/is-number.js"); - - - - - - -var formatRegExp = /\{(\d+)(:[^\}]+)?\}/g; - -function toString(value, format, locale) { - if (format) { - if (Object(__WEBPACK_IMPORTED_MODULE_3__common_is_date__["a" /* default */])(value)) { - return Object(__WEBPACK_IMPORTED_MODULE_0__dates__["a" /* formatDate */])(value, format, locale); - } else if (Object(__WEBPACK_IMPORTED_MODULE_4__common_is_number__["a" /* default */])(value)) { - return Object(__WEBPACK_IMPORTED_MODULE_1__numbers__["a" /* formatNumber */])(value, format, locale); - } - } - - return value !== undefined && value !== null ? value : __WEBPACK_IMPORTED_MODULE_2__common_constants__["f" /* EMPTY */]; -} - -function format(format, values, locale) { - return format.replace(formatRegExp, function(match, index, placeholderFormat) { - var value = values[parseInt(index, 10)]; - - return toString(value, placeholderFormat ? placeholderFormat.substring(1) : __WEBPACK_IMPORTED_MODULE_2__common_constants__["f" /* EMPTY */], locale); - }); -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/main.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__numbers__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_0__numbers__["a"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_0__numbers__["b"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__dates__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/dates.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_1__dates__["a"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_1__dates__["b"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_1__dates__["c"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cldr__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__cldr__["d"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__cldr__["e"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__cldr__["f"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_2__cldr__["g"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_2__cldr__["j"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_2__cldr__["k"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__format__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/format.js"); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_3__format__["a"]; }); -/* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_3__format__["b"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__errors__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/errors.js"); -/* unused harmony namespace reexport */ - - - - - - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/numbers.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__numbers_format_number__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers/format-number.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__numbers_format_number__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__numbers_parse_number__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers/parse-number.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__numbers_parse_number__["a"]; }); - - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/numbers/custom-number-format.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = customNumberFormat; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__format_currency_symbol__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers/format-currency-symbol.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__group_integer__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers/group-integer.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_round__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/round.js"); - - - - - -var PLACEHOLDER = "__??__"; - -var SHARP = "#"; -var ZERO = "0"; - -var literalRegExp = /(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g; -var trailingZerosRegExp = /(\.(?:[0-9]*[1-9])?)0+$/g; -var trailingPointRegExp = /\.$/; -var commaRegExp = /\,/g; - -function setFormatLiterals(formatOptions) { - var format = formatOptions.format; - if (format.indexOf("'") > -1 || format.indexOf("\"") > -1 || format.indexOf("\\") > -1) { - var literals = formatOptions.literals = []; - formatOptions.format = format.replace(literalRegExp, function(match) { - var quoteChar = match.charAt(0).replace("\\", __WEBPACK_IMPORTED_MODULE_0__common_constants__["f" /* EMPTY */]); - var literal = match.slice(1).replace(quoteChar, __WEBPACK_IMPORTED_MODULE_0__common_constants__["f" /* EMPTY */]); - - literals.push(literal); - - return PLACEHOLDER; - }); - } -} - -function trimTrailingZeros(value, lastZero) { - var trimRegex; - - if (lastZero === 0) { - trimRegex = trailingZerosRegExp; - } else { - trimRegex = new RegExp(("(\\.[0-9]{" + lastZero + "}[1-9]*)0+$"), 'g'); - } - - return value.replace(trimRegex, '$1').replace(trailingPointRegExp, __WEBPACK_IMPORTED_MODULE_0__common_constants__["f" /* EMPTY */]); -} - -function roundNumber(formatOptions) { - var number = formatOptions.number; - var format = formatOptions.format; - var decimalIndex = format.indexOf(__WEBPACK_IMPORTED_MODULE_0__common_constants__["l" /* POINT */]); - - if (decimalIndex !== -1) { - var zeroIndex = format.lastIndexOf(ZERO) - decimalIndex; - var sharpIndex = format.lastIndexOf(SHARP) - decimalIndex; - var hasZero = zeroIndex > -1; - var hasSharp = sharpIndex > -1; - var fraction = number.toString().split("e"); - - if (fraction[1]) { - fraction = Object(__WEBPACK_IMPORTED_MODULE_3__common_round__["a" /* default */])(number, Math.abs(fraction[1])); - } else { - fraction = fraction[0]; - } - fraction = fraction.split(__WEBPACK_IMPORTED_MODULE_0__common_constants__["l" /* POINT */])[1] || __WEBPACK_IMPORTED_MODULE_0__common_constants__["f" /* EMPTY */]; - - var precision = fraction.length; - var trailingZeros = -1; - - if (!hasZero && !hasSharp) { - formatOptions.format = format.substring(0, decimalIndex) + format.substring(decimalIndex + 1); - decimalIndex = -1; - precision = 0; - } else if (hasZero && zeroIndex > sharpIndex) { - precision = zeroIndex; - } else if (sharpIndex > zeroIndex) { - if (hasSharp && precision > sharpIndex) { - precision = sharpIndex; - } else if (hasZero && precision < zeroIndex) { - precision = zeroIndex; - } - - trailingZeros = hasZero ? zeroIndex : 0; - } - - if (precision > -1) { - number = Object(__WEBPACK_IMPORTED_MODULE_3__common_round__["a" /* default */])(number, precision); - if (trailingZeros > -1) { - number = trimTrailingZeros(number, trailingZeros); - } - } - } else { - number = Object(__WEBPACK_IMPORTED_MODULE_3__common_round__["a" /* default */])(number); - } - - if (formatOptions.negative && (number * -1) >= 0) { - formatOptions.negative = false; - } - - formatOptions.number = number; - formatOptions.decimalIndex = decimalIndex; -} - -function isConstantFormat(format) { - return format.indexOf(SHARP) === -1 && format.indexOf(ZERO) === -1; -} - -function setValueSpecificFormat(formatOptions) { - var number = formatOptions.number; - var format = formatOptions.format; - format = format.split(__WEBPACK_IMPORTED_MODULE_0__common_constants__["h" /* LIST_SEPARATOR */]); - if (formatOptions.negative && format[1]) { - format = format[1]; - formatOptions.hasNegativeFormat = true; - } else if (number === 0) { - var zeroFormat = format[2]; - format = zeroFormat || format[0]; - if (zeroFormat && isConstantFormat(zeroFormat)) { - formatOptions.constant = zeroFormat; - } - } else { - format = format[0]; - } - - formatOptions.format = format; -} - -function setStyleOptions(formatOptions, info) { - var format = formatOptions.format; - - //multiply number if the format has percent - if (format.indexOf(__WEBPACK_IMPORTED_MODULE_0__common_constants__["k" /* PERCENT_PLACEHOLDER */]) !== -1) { - formatOptions.style = __WEBPACK_IMPORTED_MODULE_0__common_constants__["j" /* PERCENT */]; - formatOptions.symbol = info.numbers.symbols.percentSign; - formatOptions.number *= 100; - } - - if (format.indexOf(__WEBPACK_IMPORTED_MODULE_0__common_constants__["c" /* CURRENCY_PLACEHOLDER */]) !== -1) { - formatOptions.style = __WEBPACK_IMPORTED_MODULE_0__common_constants__["b" /* CURRENCY */]; - formatOptions.symbol = Object(__WEBPACK_IMPORTED_MODULE_1__format_currency_symbol__["a" /* default */])(info); - } -} - -function setGroupOptions(formatOptions) { - formatOptions.hasGroup = formatOptions.format.indexOf(__WEBPACK_IMPORTED_MODULE_0__common_constants__["g" /* GROUP_SEPARATOR */]) > -1; - if (formatOptions.hasGroup) { - formatOptions.format = formatOptions.format.replace(commaRegExp, __WEBPACK_IMPORTED_MODULE_0__common_constants__["f" /* EMPTY */]); - } -} - -function placeholderIndex(index1, index2, start) { - var index; - if (index1 === -1 && index2 !== -1) { - index = index2; - } else if (index1 !== -1 && index2 === -1) { - index = index1; - } else { - index = start ? Math.min(index1, index2) : Math.max(index1, index2); - } - return index; -} - -function setPlaceholderIndices(formatOptions) { - var format = formatOptions.format; - var sharpIndex = format.indexOf(SHARP); - var zeroIndex = format.indexOf(ZERO); - - var start = placeholderIndex(sharpIndex, zeroIndex, true); - - sharpIndex = format.lastIndexOf(SHARP); - zeroIndex = format.lastIndexOf(ZERO); - - var end = placeholderIndex(sharpIndex, zeroIndex); - - if (start === format.length) { - end = start; - } - - formatOptions.start = start; - formatOptions.end = end; - formatOptions.lastZeroIndex = zeroIndex; -} - -function replaceStyleSymbols(number, style, symbol) { - var result = number; - if (style === __WEBPACK_IMPORTED_MODULE_0__common_constants__["b" /* CURRENCY */] || style === __WEBPACK_IMPORTED_MODULE_0__common_constants__["j" /* PERCENT */]) { - result = __WEBPACK_IMPORTED_MODULE_0__common_constants__["f" /* EMPTY */]; - for (var idx = 0, length = number.length; idx < length; idx++) { - var ch = number.charAt(idx); - result += (ch === __WEBPACK_IMPORTED_MODULE_0__common_constants__["c" /* CURRENCY_PLACEHOLDER */] || ch === __WEBPACK_IMPORTED_MODULE_0__common_constants__["k" /* PERCENT_PLACEHOLDER */]) ? symbol : ch; - } - } - return result; -} - -function replaceLiterals(number, literals) { - var result = number; - if (literals) { - var length = literals.length; - for (var idx = 0; idx < length; idx++) { - result = result.replace(PLACEHOLDER, literals[idx]); - } - } - return result; -} - -function replacePlaceHolders(formatOptions, info) { - var start = formatOptions.start; - var end = formatOptions.end; - var negative = formatOptions.negative; - var format = formatOptions.format; - var decimalIndex = formatOptions.decimalIndex; - var lastZeroIndex = formatOptions.lastZeroIndex; - var hasNegativeFormat = formatOptions.hasNegativeFormat; - var hasGroup = formatOptions.hasGroup; - var number = formatOptions.number; - var value = number.toString().split(__WEBPACK_IMPORTED_MODULE_0__common_constants__["l" /* POINT */]); - var length = format.length; - var integer = value[0]; - var fraction = value[1] || __WEBPACK_IMPORTED_MODULE_0__common_constants__["f" /* EMPTY */]; - var integerLength = integer.length; - var replacement = __WEBPACK_IMPORTED_MODULE_0__common_constants__["f" /* EMPTY */]; - - number = format.substring(0, start); - - if (negative && !hasNegativeFormat) { - number += "-"; - } - - for (var idx = start; idx < length; idx++) { - var ch = format.charAt(idx); - - if (decimalIndex === -1) { - if (end - idx < integerLength) { - - number += integer; - break; - } - } else { - if (lastZeroIndex !== -1 && lastZeroIndex < idx) { - replacement = __WEBPACK_IMPORTED_MODULE_0__common_constants__["f" /* EMPTY */]; - } - - if ((decimalIndex - idx) <= integerLength && decimalIndex - idx > -1) { - number += integer; - idx = decimalIndex; - } - - if (decimalIndex === idx) { - number += (fraction ? info.numbers.symbols.decimal : __WEBPACK_IMPORTED_MODULE_0__common_constants__["f" /* EMPTY */]) + fraction; - idx += end - decimalIndex + 1; - continue; - } - } - - if (ch === ZERO) { - number += ch; - replacement = ch; - } else if (ch === SHARP) { - number += replacement; - } - } - - if (hasGroup) { - number = Object(__WEBPACK_IMPORTED_MODULE_2__group_integer__["a" /* default */])(number, start + (negative && !hasNegativeFormat ? 1 : 0), Math.max(end, (integerLength + start)), info.numbers.decimal, info); - } - - if (end >= start) { - number += format.substring(end + 1); - } - - return number; -} - -function applyCustomFormat(formatOptions, info) { - var number = formatOptions.number; - if (formatOptions.start !== -1) { - number = replacePlaceHolders(formatOptions, info); - number = replaceStyleSymbols(number, formatOptions.style, formatOptions.symbol); - number = replaceLiterals(number, formatOptions.literals); - } - - return number; -} - -function customNumberFormat(number, format, info) { - var formatOptions = { - negative: number < 0, - number: Math.abs(number), - format: format - }; - - setValueSpecificFormat(formatOptions); - - if (formatOptions.constant) { - return formatOptions.constant; - } - - setFormatLiterals(formatOptions); - setStyleOptions(formatOptions, info); - setGroupOptions(formatOptions); - roundNumber(formatOptions); - setPlaceholderIndices(formatOptions); - - return applyCustomFormat(formatOptions, info); -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/numbers/format-currency-symbol.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = formatCurrencySymbol; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cldr__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr.js"); - - -function formatCurrencySymbol(info, options) { - if ( options === void 0 ) options = {}; - - if (!options.currency) { - options.currency = Object(__WEBPACK_IMPORTED_MODULE_0__cldr__["h" /* localeCurrency */])(info, true); - } - - var display = Object(__WEBPACK_IMPORTED_MODULE_0__cldr__["a" /* currencyDisplay */])(info, options); - - return display; -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/numbers/format-number.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = formatNumber; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cldr__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__standard_number_format__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers/standard-number-format.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__custom_number_format__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers/custom-number-format.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__format_options__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers/format-options.js"); - - - - - - -function formatNumber(number, format, locale) { - if ( format === void 0 ) format = __WEBPACK_IMPORTED_MODULE_1__common_constants__["i" /* NUMBER_PLACEHOLDER */]; - if ( locale === void 0 ) locale = __WEBPACK_IMPORTED_MODULE_1__common_constants__["e" /* DEFAULT_LOCALE */]; - - if (number === undefined || number === null) { - return __WEBPACK_IMPORTED_MODULE_1__common_constants__["f" /* EMPTY */]; - } - - if (!isFinite(number)) { - return String(number); - } - - var info = Object(__WEBPACK_IMPORTED_MODULE_0__cldr__["i" /* localeInfo */])(locale); - var options = Object(__WEBPACK_IMPORTED_MODULE_4__format_options__["a" /* default */])(format); - - var result; - if (options) { - var style = (options || {}).style || __WEBPACK_IMPORTED_MODULE_1__common_constants__["d" /* DECIMAL */]; - result = Object(__WEBPACK_IMPORTED_MODULE_2__standard_number_format__["a" /* default */])(number, Object.assign({}, info.numbers[style], options), info); - } else { - result = Object(__WEBPACK_IMPORTED_MODULE_3__custom_number_format__["a" /* default */])(number, format, info); - } - - return result; -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/numbers/format-options.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = formatOptions; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_is_string__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/is-string.js"); - - - -var standardFormatRegExp = /^(n|c|p|e|a)(\d*)$/i; - -function standardFormatOptions(format) { - var formatAndPrecision = standardFormatRegExp.exec(format); - - if (formatAndPrecision) { - var options = { - style: __WEBPACK_IMPORTED_MODULE_0__common_constants__["d" /* DECIMAL */] - }; - - var style = formatAndPrecision[1].toLowerCase(); - - if (style === "c") { - options.style = __WEBPACK_IMPORTED_MODULE_0__common_constants__["b" /* CURRENCY */]; - } else if (style === "a") { - options.style = __WEBPACK_IMPORTED_MODULE_0__common_constants__["a" /* ACCOUNTING */]; - } else if (style === "p") { - options.style = __WEBPACK_IMPORTED_MODULE_0__common_constants__["j" /* PERCENT */]; - } else if (style === "e") { - options.style = __WEBPACK_IMPORTED_MODULE_0__common_constants__["m" /* SCIENTIFIC */]; - } - - if (formatAndPrecision[2]) { - options.minimumFractionDigits = options.maximumFractionDigits = parseInt(formatAndPrecision[2], 10); - } - - return options; - } -} - -function formatOptions(format) { - var options; - if (Object(__WEBPACK_IMPORTED_MODULE_1__common_is_string__["a" /* default */])(format)) { - options = standardFormatOptions(format); - } else { - options = format; - } - - return options; -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/numbers/group-integer.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = groupInteger; -function groupInteger(number, start, end, options, info) { - var symbols = info.numbers.symbols; - var decimalIndex = number.indexOf(symbols.decimal); - var groupSizes = options.groupSize.slice(); - var groupSize = groupSizes.shift(); - - var integerEnd = decimalIndex !== -1 ? decimalIndex : end + 1; - - var integer = number.substring(start, integerEnd); - var result = number; - var integerLength = integer.length; - - if (integerLength >= groupSize) { - var idx = integerLength; - var parts = []; - - while (idx > -1) { - var value = integer.substring(idx - groupSize, idx); - if (value) { - parts.push(value); - } - idx -= groupSize; - var newGroupSize = groupSizes.shift(); - groupSize = newGroupSize !== undefined ? newGroupSize : groupSize; - - if (groupSize === 0) { - value = integer.substring(0, idx); - if (value) { - parts.push(value); - } - break; - } - } - - integer = parts.reverse().join(symbols.group); - result = number.substring(0, start) + integer + number.substring(integerEnd); - } - - return result; -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/numbers/is-currency-style.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = isCurrencyStyle; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); - - -function isCurrencyStyle(style) { - return style === __WEBPACK_IMPORTED_MODULE_0__common_constants__["b" /* CURRENCY */] || style === __WEBPACK_IMPORTED_MODULE_0__common_constants__["a" /* ACCOUNTING */]; -} - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/numbers/parse-number.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = parseNumber; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cldr__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_is_number__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/is-number.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__is_currency_style__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers/is-currency-style.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__format_options__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers/format-options.js"); - - - - - - -var exponentRegExp = /[eE][\-+]?[0-9]+/; -var nonBreakingSpaceRegExp = /\u00A0/g; - -function cleanNegativePattern(number, patterns) { - if (patterns.length > 1) { - var parts = (patterns[1] || __WEBPACK_IMPORTED_MODULE_1__common_constants__["f" /* EMPTY */]).replace(__WEBPACK_IMPORTED_MODULE_1__common_constants__["c" /* CURRENCY_PLACEHOLDER */], __WEBPACK_IMPORTED_MODULE_1__common_constants__["f" /* EMPTY */]).split(__WEBPACK_IMPORTED_MODULE_1__common_constants__["i" /* NUMBER_PLACEHOLDER */]); - if (number.indexOf(parts[0]) > -1 && number.indexOf(parts[1]) > -1) { - return number.replace(parts[0], __WEBPACK_IMPORTED_MODULE_1__common_constants__["f" /* EMPTY */]).replace(parts[1], __WEBPACK_IMPORTED_MODULE_1__common_constants__["f" /* EMPTY */]); - } - } -} - -function cleanCurrencyNumber(value, info, format) { - var options = Object(__WEBPACK_IMPORTED_MODULE_4__format_options__["a" /* default */])(format) || {}; - var isCurrency = Object(__WEBPACK_IMPORTED_MODULE_3__is_currency_style__["a" /* default */])(options.style); - var number = value; - var negative; - - var currency = options.currency || Object(__WEBPACK_IMPORTED_MODULE_0__cldr__["h" /* localeCurrency */])(info, isCurrency); - - if (currency) { - var displays = Object(__WEBPACK_IMPORTED_MODULE_0__cldr__["b" /* currencyDisplays */])(info, currency, isCurrency); - if (displays) { - for (var idx = 0; idx < displays.length; idx++) { - var display = displays[idx]; - if (number.includes(display)) { - number = number.replace(display, __WEBPACK_IMPORTED_MODULE_1__common_constants__["f" /* EMPTY */]); - isCurrency = true; - break; - } - } - } - - if (isCurrency) { - var cleanNumber = cleanNegativePattern(number, info.numbers.currency.patterns) || - cleanNegativePattern(number, info.numbers.accounting.patterns); - - if (cleanNumber) { - negative = true; - number = cleanNumber; - } - - } - } - - return { - number: number, - negative: negative - }; -} - -function parseNumber(value, locale, format) { - if ( locale === void 0 ) locale = __WEBPACK_IMPORTED_MODULE_1__common_constants__["e" /* DEFAULT_LOCALE */]; - if ( format === void 0 ) format = {}; - - if (!value && value !== 0) { - return null; - } - - if (Object(__WEBPACK_IMPORTED_MODULE_2__common_is_number__["a" /* default */])(value)) { - return value; - } - - var info = Object(__WEBPACK_IMPORTED_MODULE_0__cldr__["i" /* localeInfo */])(locale); - var symbols = info.numbers.symbols; - - var number = value.toString(); - var isPercent; - - if (exponentRegExp.test(number)) { - number = parseFloat(number.replace(symbols.decimal, __WEBPACK_IMPORTED_MODULE_1__common_constants__["l" /* POINT */])); - return isNaN(number) ? null : number; - } - - var negativeSignIndex = number.indexOf("-"); - if (negativeSignIndex > 0) { - return null; - } - - var isNegative = negativeSignIndex > -1; - var ref = cleanCurrencyNumber(number, info, format); - var negativeCurrency = ref.negative; - var newNumber = ref.number; - - number = newNumber; - isNegative = negativeCurrency !== undefined ? negativeCurrency : isNegative; - - if (format.style === __WEBPACK_IMPORTED_MODULE_1__common_constants__["j" /* PERCENT */] || number.indexOf(symbols.percentSign) > -1) { - number = number.replace(symbols.percentSign, __WEBPACK_IMPORTED_MODULE_1__common_constants__["f" /* EMPTY */]); - isPercent = true; - } - - number = number.replace("-", __WEBPACK_IMPORTED_MODULE_1__common_constants__["f" /* EMPTY */]) - .replace(nonBreakingSpaceRegExp, " ") - .split(symbols.group.replace(nonBreakingSpaceRegExp, " ")).join(__WEBPACK_IMPORTED_MODULE_1__common_constants__["f" /* EMPTY */]) - .replace(symbols.decimal, __WEBPACK_IMPORTED_MODULE_1__common_constants__["l" /* POINT */]); - - number = parseFloat(number); - - if (isNaN(number)) { - number = null; - } else if (isNegative) { - number *= -1; - } - - if (number && isPercent) { - number /= 100; - } - - return number; -} - - -/***/ }), - -/***/ "../../../../@telerik/kendo-intl/dist/es/numbers/standard-number-format.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = standardNumberFormat; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common_constants__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/constants.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__format_currency_symbol__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers/format-currency-symbol.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__group_integer__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers/group-integer.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__is_currency_style__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/numbers/is-currency-style.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_pad__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/pad.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_round__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/common/round.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__cldr__ = __webpack_require__("../../../../@telerik/kendo-intl/dist/es/cldr.js"); - - - - - - - - -var DEFAULT_DECIMAL_ROUNDING = 3; -var DEFAULT_PERCENT_ROUNDING = 0; - -var trailingZeroRegex = /0+$/; - -function fractionOptions(options) { - var minimumFractionDigits = options.minimumFractionDigits; - var maximumFractionDigits = options.maximumFractionDigits; - var style = options.style; - var isCurrency = Object(__WEBPACK_IMPORTED_MODULE_3__is_currency_style__["a" /* default */])(style); - var currencyFractions; - if (isCurrency) { - currencyFractions = Object(__WEBPACK_IMPORTED_MODULE_6__cldr__["c" /* currencyFractionOptions */])(options.currency); - } - - if (minimumFractionDigits === undefined) { - minimumFractionDigits = isCurrency ? currencyFractions.minimumFractionDigits : 0; - } - - if (maximumFractionDigits === undefined) { - if (style === __WEBPACK_IMPORTED_MODULE_0__common_constants__["j" /* PERCENT */]) { - maximumFractionDigits = Math.max(minimumFractionDigits, DEFAULT_PERCENT_ROUNDING); - } else if (isCurrency) { - maximumFractionDigits = Math.max(minimumFractionDigits, currencyFractions.maximumFractionDigits); - } else { - maximumFractionDigits = Math.max(minimumFractionDigits, DEFAULT_DECIMAL_ROUNDING); - } - } - - return { - minimumFractionDigits: minimumFractionDigits, - maximumFractionDigits: maximumFractionDigits - }; -} - -function applyPattern(value, pattern, symbol) { - var result = __WEBPACK_IMPORTED_MODULE_0__common_constants__["f" /* EMPTY */]; - for (var idx = 0, length = pattern.length; idx < length; idx++) { - var ch = pattern.charAt(idx); - - if (ch === __WEBPACK_IMPORTED_MODULE_0__common_constants__["i" /* NUMBER_PLACEHOLDER */]) { - result += value; - } else if (ch === __WEBPACK_IMPORTED_MODULE_0__common_constants__["c" /* CURRENCY_PLACEHOLDER */] || ch === __WEBPACK_IMPORTED_MODULE_0__common_constants__["k" /* PERCENT_PLACEHOLDER */]) { - result += symbol; - } else { - result += ch; - } - } - return result; -} - -function currencyUnitPattern(info, value) { - var currencyInfo = info.numbers.currency; - var pattern = value !== 1 ? currencyInfo["unitPattern-count-other"] : currencyInfo["unitPattern-count-one"]; - if (value < 0) { - pattern = pattern.replace(__WEBPACK_IMPORTED_MODULE_0__common_constants__["i" /* NUMBER_PLACEHOLDER */], ("-" + __WEBPACK_IMPORTED_MODULE_0__common_constants__["i" /* NUMBER_PLACEHOLDER */])); - } - - return pattern; -} - - -function standardNumberFormat(number, options, info) { - var symbols = info.numbers.symbols; - var style = options.style; - var isCurrency = Object(__WEBPACK_IMPORTED_MODULE_3__is_currency_style__["a" /* default */])(style); - - //return number in exponential format - if (style === __WEBPACK_IMPORTED_MODULE_0__common_constants__["m" /* SCIENTIFIC */]) { - var exponential = options.minimumFractionDigits !== undefined ? number.toExponential(options.minimumFractionDigits) : number.toExponential(); - return exponential.replace(__WEBPACK_IMPORTED_MODULE_0__common_constants__["l" /* POINT */], symbols.decimal); - } - - var value = number; - var symbol; - - if (isCurrency) { - options.value = value; - symbol = Object(__WEBPACK_IMPORTED_MODULE_1__format_currency_symbol__["a" /* default */])(info, options); - } - - if (style === __WEBPACK_IMPORTED_MODULE_0__common_constants__["j" /* PERCENT */]) { - value *= 100; - symbol = symbols.percentSign; - } - - var ref = fractionOptions(options); - var minimumFractionDigits = ref.minimumFractionDigits; - var maximumFractionDigits = ref.maximumFractionDigits; - - value = Object(__WEBPACK_IMPORTED_MODULE_5__common_round__["a" /* default */])(value, maximumFractionDigits); - - var negative = value < 0; - - var parts = value.split(__WEBPACK_IMPORTED_MODULE_0__common_constants__["l" /* POINT */]); - - var integer = parts[0]; - var fraction = Object(__WEBPACK_IMPORTED_MODULE_4__common_pad__["a" /* default */])(parts[1] ? parts[1].replace(trailingZeroRegex, __WEBPACK_IMPORTED_MODULE_0__common_constants__["f" /* EMPTY */]) : __WEBPACK_IMPORTED_MODULE_0__common_constants__["f" /* EMPTY */], minimumFractionDigits, true); - - //exclude "-" if number is negative. - if (negative) { - integer = integer.substring(1); - } - - if (options.minimumIntegerDigits) { - integer = Object(__WEBPACK_IMPORTED_MODULE_4__common_pad__["a" /* default */])(integer, options.minimumIntegerDigits); - } - - var formattedValue = options.useGrouping !== false ? Object(__WEBPACK_IMPORTED_MODULE_2__group_integer__["a" /* default */])(integer, 0, integer.length, options, info) : integer; - - if (fraction) { - formattedValue += symbols.decimal + fraction; - } - - var pattern; - - if (isCurrency && options.currencyDisplay === "name") { - pattern = currencyUnitPattern(info, number); - } else { - var patterns = options.patterns; - pattern = negative ? patterns[1] || ("-" + patterns[0]) : patterns[0]; - } - - if (pattern === __WEBPACK_IMPORTED_MODULE_0__common_constants__["i" /* NUMBER_PLACEHOLDER */] && !negative) { - return formattedValue; - } - - var result = applyPattern(formattedValue, pattern, symbol); - - return result; -} - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/components.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfComponentsModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_avatar_thf_avatar_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-avatar/thf-avatar.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_breadcrumb_thf_breadcrumb_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_button_thf_button_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button/thf-button.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_button_group_thf_button_group_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button-group/thf-button-group.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__thf_chart_thf_chart_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-chart/thf-chart.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__thf_code_editor_thf_code_editor_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-code-editor/thf-code-editor.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__thf_disclaimer_group_thf_disclaimer_group_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-disclaimer-group/thf-disclaimer-group.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__thf_disclaimer_thf_disclaimer_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-disclaimer/thf-disclaimer.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__thf_dropdown_thf_dropdown_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-dropdown/thf-dropdown.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__thf_dynamic_form_thf_dynamic_form_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__thf_field_thf_field_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-field.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__thf_grid_thf_grid_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-grid/thf-grid.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__thf_info_thf_info_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-info/thf-info.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__thf_list_thf_list_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-list/thf-list.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__thf_menu_thf_menu_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-menu/thf-menu.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__thf_modal_thf_modal_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-modal/thf-modal.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__thf_page_thf_page_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__thf_popover_thf_popover_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-popover/thf-popover.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__thf_stepper_thf_stepper_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-stepper/thf-stepper.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__thf_table_thf_table_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-table/thf-table.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__thf_tabs_thf_tabs_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-tabs/thf-tabs.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__thf_toolbar_thf_toolbar_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-toolbar/thf-toolbar.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__thf_widget_thf_widget_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-widget/thf-widget.module.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - - - - - - - - - - - - - - - - - - - -var ThfComponentsModule = /** @class */ (function () { - function ThfComponentsModule() { - } - ThfComponentsModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - declarations: [], - imports: [ - __WEBPACK_IMPORTED_MODULE_1__thf_avatar_thf_avatar_module__["a" /* ThfAvatarModule */], - __WEBPACK_IMPORTED_MODULE_2__thf_breadcrumb_thf_breadcrumb_module__["a" /* ThfBreadcrumbModule */], - __WEBPACK_IMPORTED_MODULE_3__thf_button_thf_button_module__["a" /* ThfButtonModule */], - __WEBPACK_IMPORTED_MODULE_4__thf_button_group_thf_button_group_module__["a" /* ThfButtonGroupModule */], - __WEBPACK_IMPORTED_MODULE_5__thf_chart_thf_chart_module__["a" /* ThfChartModule */], - __WEBPACK_IMPORTED_MODULE_6__thf_code_editor_thf_code_editor_module__["a" /* ThfCodeEditorModule */], - __WEBPACK_IMPORTED_MODULE_7__thf_disclaimer_group_thf_disclaimer_group_module__["a" /* ThfDisclaimerGroupModule */], - __WEBPACK_IMPORTED_MODULE_8__thf_disclaimer_thf_disclaimer_module__["a" /* ThfDisclaimerModule */], - __WEBPACK_IMPORTED_MODULE_9__thf_dropdown_thf_dropdown_module__["a" /* ThfDropdownModule */], - __WEBPACK_IMPORTED_MODULE_10__thf_dynamic_form_thf_dynamic_form_module__["a" /* ThfDynamicFormModule */], - __WEBPACK_IMPORTED_MODULE_11__thf_field_thf_field_module__["a" /* ThfFieldModule */], - __WEBPACK_IMPORTED_MODULE_12__thf_grid_thf_grid_module__["a" /* ThfGridModule */], - __WEBPACK_IMPORTED_MODULE_13__thf_info_thf_info_module__["a" /* ThfInfoModule */], - __WEBPACK_IMPORTED_MODULE_14__thf_list_thf_list_module__["a" /* ThfListModule */], - __WEBPACK_IMPORTED_MODULE_15__thf_menu_thf_menu_module__["a" /* ThfMenuModule */], - __WEBPACK_IMPORTED_MODULE_16__thf_modal_thf_modal_module__["a" /* ThfModalModule */], - __WEBPACK_IMPORTED_MODULE_17__thf_page_thf_page_module__["a" /* ThfPageModule */], - __WEBPACK_IMPORTED_MODULE_18__thf_popover_thf_popover_module__["a" /* ThfPopoverModule */], - __WEBPACK_IMPORTED_MODULE_19__thf_stepper_thf_stepper_module__["a" /* ThfStepperModule */], - __WEBPACK_IMPORTED_MODULE_20__thf_table_thf_table_module__["a" /* ThfTableModule */], - __WEBPACK_IMPORTED_MODULE_21__thf_tabs_thf_tabs_module__["a" /* ThfTabsModule */], - __WEBPACK_IMPORTED_MODULE_22__thf_toolbar_thf_toolbar_module__["a" /* ThfToolbarModule */], - __WEBPACK_IMPORTED_MODULE_23__thf_widget_thf_widget_module__["a" /* ThfWidgetModule */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_1__thf_avatar_thf_avatar_module__["a" /* ThfAvatarModule */], - __WEBPACK_IMPORTED_MODULE_2__thf_breadcrumb_thf_breadcrumb_module__["a" /* ThfBreadcrumbModule */], - __WEBPACK_IMPORTED_MODULE_3__thf_button_thf_button_module__["a" /* ThfButtonModule */], - __WEBPACK_IMPORTED_MODULE_4__thf_button_group_thf_button_group_module__["a" /* ThfButtonGroupModule */], - __WEBPACK_IMPORTED_MODULE_5__thf_chart_thf_chart_module__["a" /* ThfChartModule */], - __WEBPACK_IMPORTED_MODULE_6__thf_code_editor_thf_code_editor_module__["a" /* ThfCodeEditorModule */], - __WEBPACK_IMPORTED_MODULE_7__thf_disclaimer_group_thf_disclaimer_group_module__["a" /* ThfDisclaimerGroupModule */], - __WEBPACK_IMPORTED_MODULE_8__thf_disclaimer_thf_disclaimer_module__["a" /* ThfDisclaimerModule */], - __WEBPACK_IMPORTED_MODULE_9__thf_dropdown_thf_dropdown_module__["a" /* ThfDropdownModule */], - __WEBPACK_IMPORTED_MODULE_10__thf_dynamic_form_thf_dynamic_form_module__["a" /* ThfDynamicFormModule */], - __WEBPACK_IMPORTED_MODULE_11__thf_field_thf_field_module__["a" /* ThfFieldModule */], - __WEBPACK_IMPORTED_MODULE_12__thf_grid_thf_grid_module__["a" /* ThfGridModule */], - __WEBPACK_IMPORTED_MODULE_13__thf_info_thf_info_module__["a" /* ThfInfoModule */], - __WEBPACK_IMPORTED_MODULE_14__thf_list_thf_list_module__["a" /* ThfListModule */], - __WEBPACK_IMPORTED_MODULE_15__thf_menu_thf_menu_module__["a" /* ThfMenuModule */], - __WEBPACK_IMPORTED_MODULE_16__thf_modal_thf_modal_module__["a" /* ThfModalModule */], - __WEBPACK_IMPORTED_MODULE_17__thf_page_thf_page_module__["a" /* ThfPageModule */], - __WEBPACK_IMPORTED_MODULE_18__thf_popover_thf_popover_module__["a" /* ThfPopoverModule */], - __WEBPACK_IMPORTED_MODULE_19__thf_stepper_thf_stepper_module__["a" /* ThfStepperModule */], - __WEBPACK_IMPORTED_MODULE_21__thf_tabs_thf_tabs_module__["a" /* ThfTabsModule */], - __WEBPACK_IMPORTED_MODULE_20__thf_table_thf_table_module__["a" /* ThfTableModule */], - __WEBPACK_IMPORTED_MODULE_22__thf_toolbar_thf_toolbar_module__["a" /* ThfToolbarModule */], - __WEBPACK_IMPORTED_MODULE_23__thf_widget_thf_widget_module__["a" /* ThfWidgetModule */] - ], - providers: [], - bootstrap: [] - },] }, - ]; - /** @nocollapse */ - ThfComponentsModule.ctorParameters = function () { return []; }; - return ThfComponentsModule; -}()); - -function ThfComponentsModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfComponentsModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfComponentsModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-avatar/thf-avatar-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfAvatarBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -var /** @type {?} */ THF_AVATAR_SIZES = ['xs', 'sm', 'md', 'lg', 'xl']; -var /** @type {?} */ THF_AVATAR_SIZE_DEFAULT = 'md'; -/** - * \@description - * - * O componente `thf-avatar` é um container para imagens em miniatura, possui um formato redondo e cinco opções de - * tamanho, pode ser utilizado para mostrar a foto do perfil de um usuário, entre outras possibilidades. - * - * Além de poder ser utilizado separadamente, é possível usar o `thf-avatar` juntamente com outros componentes e criar - * layouts ricos e bem interessantes para os usuários, como por exemplo, uma lista de itens ou produtos. - */ -var ThfAvatarBaseComponent = /** @class */ (function () { - function ThfAvatarBaseComponent() { - this._size = 'md'; - } - Object.defineProperty(ThfAvatarBaseComponent.prototype, "size", { - get: /** - * @return {?} - */ - function () { - return this._size; - }, - set: /** - * \@optional - * - * \@description - * - * Tamanho de exibição do componente. - * - * Valores válidos: - * - `xs` (24x24) - * - `sm` (32x32) - * - `md` (64x64) - * - `lg` (96x96) - * - `xl` (144x144) - * - * \@default `md` - * @param {?} value - * @return {?} - */ - function (value) { - this._size = THF_AVATAR_SIZES.includes(value) ? value : THF_AVATAR_SIZE_DEFAULT; - }, - enumerable: true, - configurable: true - }); - ThfAvatarBaseComponent.propDecorators = { - "src": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-src',] },], - "size": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-size',] },], - }; - return ThfAvatarBaseComponent; -}()); - -function ThfAvatarBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfAvatarBaseComponent.propDecorators; - /** @type {?} */ - ThfAvatarBaseComponent.prototype._size; - /** - * Fonte da imagem que pode ser um caminho local (`./assets/images/logo-black-small.png`) - * ou um servidor externo (`https://thf.totvs.com.br/assets/images/logo-black-small.png`). - * @type {?} - */ - ThfAvatarBaseComponent.prototype.src; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-avatar/thf-avatar.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfAvatarComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_avatar_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-avatar/thf-avatar-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -// Imagem default caso não seja informada a propriedade 't-src' ou houver algum erro na requisição da mesma. -var /** @type {?} */ THF_AVATAR_DEFAULT_SRC = './assets/images/totvs-avatar-default.svg'; -/** - * \@docsExtends ThfAvatarBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfAvatarComponent = /** @class */ (function (_super) { - __extends(ThfAvatarComponent, _super); - function ThfAvatarComponent() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @return {?} - */ - ThfAvatarComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - if (!this.src) { - this.src = THF_AVATAR_DEFAULT_SRC; - } - }; - /** - * @return {?} - */ - ThfAvatarComponent.prototype.onError = /** - * @return {?} - */ - function () { - this.src = THF_AVATAR_DEFAULT_SRC; - }; - ThfAvatarComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-avatar', template: "
    \"\"
    " - },] }, - ]; - /** @nocollapse */ - ThfAvatarComponent.ctorParameters = function () { return []; }; - return ThfAvatarComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_avatar_base_component__["a" /* ThfAvatarBaseComponent */])); - -function ThfAvatarComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfAvatarComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfAvatarComponent.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-avatar/thf-avatar.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfAvatarModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_avatar_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-avatar/thf-avatar.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * - * Módulo do componente thf-avatar. - */ -var ThfAvatarModule = /** @class */ (function () { - function ThfAvatarModule() { - } - ThfAvatarModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_0__angular_common__["b" /* CommonModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_2__thf_avatar_component__["a" /* ThfAvatarComponent */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_2__thf_avatar_component__["a" /* ThfAvatarComponent */] - ] - },] }, - ]; - /** @nocollapse */ - ThfAvatarModule.ctorParameters = function () { return []; }; - return ThfAvatarModule; -}()); - -function ThfAvatarModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfAvatarModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfAvatarModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfBreadcrumbBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * O componente thf-breadcrumb cria uma estrutura de navegação que apresenta ao usuário a localização - * da url atual e as urls ancestrais. Se for especificado um serviço, o componente possibilita ao - * usuário favoritar ou não a url atual e também incluir parâmetros na requisição. - */ -var ThfBreadcrumbBaseComponent = /** @class */ (function () { - function ThfBreadcrumbBaseComponent() { - } - Object.defineProperty(ThfBreadcrumbBaseComponent.prototype, "items", { - get: /** - * @return {?} - */ - function () { - return this._items; - }, - set: /** - * @param {?} items - * @return {?} - */ - function (items) { - this._items = items; - this.itemsView = [].concat(items); - }, - enumerable: true, - configurable: true - }); - ThfBreadcrumbBaseComponent.propDecorators = { - "items": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-items',] },], - "favoriteService": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-favorite-service',] },], - "paramsService": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-params-service',] },], - }; - return ThfBreadcrumbBaseComponent; -}()); - -function ThfBreadcrumbBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfBreadcrumbBaseComponent.propDecorators; - /** @type {?} */ - ThfBreadcrumbBaseComponent.prototype.itemsView; - /** @type {?} */ - ThfBreadcrumbBaseComponent.prototype._items; - /** @type {?} */ - ThfBreadcrumbBaseComponent.prototype.favoriteService; - /** @type {?} */ - ThfBreadcrumbBaseComponent.prototype.paramsService; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb-dropdown/thf-breadcrumb-dropdown.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfBreadcrumbDropdownComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * Componente que renderiza o dropdown do thf-breadcrumb. - */ -var ThfBreadcrumbDropdownComponent = /** @class */ (function () { - function ThfBreadcrumbDropdownComponent() { - } - ThfBreadcrumbDropdownComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-breadcrumb-dropdown', template: "
    • {{ item.label }}
    " - },] }, - ]; - /** @nocollapse */ - ThfBreadcrumbDropdownComponent.ctorParameters = function () { return []; }; - ThfBreadcrumbDropdownComponent.propDecorators = { - "items": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-items',] },], - }; - return ThfBreadcrumbDropdownComponent; -}()); - -function ThfBreadcrumbDropdownComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfBreadcrumbDropdownComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfBreadcrumbDropdownComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfBreadcrumbDropdownComponent.propDecorators; - /** @type {?} */ - ThfBreadcrumbDropdownComponent.prototype.items; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb-favorite/thf-breadcrumb-favorite.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfBreadcrumbFavoriteComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_breadcrumb_favorite_service__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb-favorite/thf-breadcrumb-favorite.service.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsPrivate - * - * \@description - * - * Componente que renderiza o serviço de favoritar do thf-breadcrumb. - */ -var ThfBreadcrumbFavoriteComponent = /** @class */ (function () { - function ThfBreadcrumbFavoriteComponent(service) { - this.service = service; - this.favorite = false; - } - /** - * @return {?} - */ - ThfBreadcrumbFavoriteComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - this.service.configService(this.favoriteService, this.paramsService, this.itemActive); - this.getStatusFavorite(); - }; - /** - * @return {?} - */ - ThfBreadcrumbFavoriteComponent.prototype.toggleFavoriteAction = /** - * @return {?} - */ - function () { - this.favorite ? this.setStatusFavorite(false) : this.setStatusFavorite(true); - }; - /** - * @return {?} - */ - ThfBreadcrumbFavoriteComponent.prototype.getStatusFavorite = /** - * @return {?} - */ - function () { - var _this = this; - this.service.getFavorite().subscribe(function (result) { return _this.favorite = result.isFavorite; }); - }; - /** - * @param {?} status - * @return {?} - */ - ThfBreadcrumbFavoriteComponent.prototype.setStatusFavorite = /** - * @param {?} status - * @return {?} - */ - function (status) { - var _this = this; - this.service.sendStatusFavorite(status).subscribe(function (result) { return _this.favorite = result.isFavorite; }); - }; - ThfBreadcrumbFavoriteComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-breadcrumb-favorite', template: "
    Desfavoritar Favoritar
    ", - providers: [__WEBPACK_IMPORTED_MODULE_1__thf_breadcrumb_favorite_service__["a" /* ThfBreadcrumbFavoriteService */]] - },] }, - ]; - /** @nocollapse */ - ThfBreadcrumbFavoriteComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__thf_breadcrumb_favorite_service__["a" /* ThfBreadcrumbFavoriteService */], }, - ]; }; - ThfBreadcrumbFavoriteComponent.propDecorators = { - "favoriteService": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-favorite-service',] },], - "itemActive": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-item-active',] },], - "paramsService": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-params-service',] },], - }; - return ThfBreadcrumbFavoriteComponent; -}()); - -function ThfBreadcrumbFavoriteComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfBreadcrumbFavoriteComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfBreadcrumbFavoriteComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfBreadcrumbFavoriteComponent.propDecorators; - /** @type {?} */ - ThfBreadcrumbFavoriteComponent.prototype.favorite; - /** @type {?} */ - ThfBreadcrumbFavoriteComponent.prototype.favoriteService; - /** @type {?} */ - ThfBreadcrumbFavoriteComponent.prototype.itemActive; - /** @type {?} */ - ThfBreadcrumbFavoriteComponent.prototype.paramsService; - /** @type {?} */ - ThfBreadcrumbFavoriteComponent.prototype.service; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb-favorite/thf-breadcrumb-favorite.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfBreadcrumbFavoriteService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsPrivate - * - * \@description - * - * Serviço utilizado para favoritar/desfavoritar uma url no componente thf-breadcrumb. - * A API deve retornar um objeto no formato { isFavorite: booleano, url: string }. Em ambos os métodos, GET e POST este - * objeto deve ser retornado. - * Ao alterar o status de favorito, a API deve retornar o objeto acima, com o novo status atualizado. - * No método POST, existe a possibilidade de ser enviado parâmetros junto com a requisição. Neste caso, o objeto enviado - * para a API terá o formato: { isFavorite: booleano, url: string, params: {} }, onde params é o objeto que pode ser enviado - * junto com a requisição. - * - */ -var ThfBreadcrumbFavoriteService = /** @class */ (function () { - function ThfBreadcrumbFavoriteService(http) { - this.http = http; - } - Object.defineProperty(ThfBreadcrumbFavoriteService.prototype, "url", { - get: /** - * @return {?} - */ - function () { return this._url; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfBreadcrumbFavoriteService.prototype, "bodyParams", { - get: /** - * @return {?} - */ - function () { return this._bodyParams; }, - enumerable: true, - configurable: true - }); - /** - * @param {?} url - * @param {?} params - * @param {?} item - * @return {?} - */ - ThfBreadcrumbFavoriteService.prototype.configService = /** - * @param {?} url - * @param {?} params - * @param {?} item - * @return {?} - */ - function (url, params, item) { - this._url = url; - this._bodyParams = { - isFavorite: false, - url: item.link, - params: params - }; - }; - /** - * @param {?} status - * @return {?} - */ - ThfBreadcrumbFavoriteService.prototype.sendStatusFavorite = /** - * @param {?} status - * @return {?} - */ - function (status) { - this.bodyParams['isFavorite'] = status; - return this.http.post(this.url, this.bodyParams).map(function (response) { return response; }); - }; - /** - * @return {?} - */ - ThfBreadcrumbFavoriteService.prototype.getFavorite = /** - * @return {?} - */ - function () { - return this.http.get(this.url, { responseType: 'json', params: { url: this.bodyParams['url'] } }) - .map(function (response) { return response; }); - }; - ThfBreadcrumbFavoriteService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["B" /* Injectable */] }, - ]; - /** @nocollapse */ - ThfBreadcrumbFavoriteService.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_common_http__["b" /* HttpClient */], }, - ]; }; - return ThfBreadcrumbFavoriteService; -}()); - -function ThfBreadcrumbFavoriteService_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfBreadcrumbFavoriteService.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfBreadcrumbFavoriteService.ctorParameters; - /** @type {?} */ - ThfBreadcrumbFavoriteService.prototype._url; - /** @type {?} */ - ThfBreadcrumbFavoriteService.prototype._bodyParams; - /** @type {?} */ - ThfBreadcrumbFavoriteService.prototype.http; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb-item/thf-breadcrumb-item.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfBreadcrumbItemComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * Componente que renderiza cada item do thf-breadcrumb. - */ -var ThfBreadcrumbItemComponent = /** @class */ (function () { - function ThfBreadcrumbItemComponent() { - // Especifica se item é o link ativo. - this.itemActive = false; - } - ThfBreadcrumbItemComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-breadcrumb-item', template: "
  • " - },] }, - ]; - /** @nocollapse */ - ThfBreadcrumbItemComponent.ctorParameters = function () { return []; }; - ThfBreadcrumbItemComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "link": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-link',] },], - "itemActive": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-item-active',] },], - }; - return ThfBreadcrumbItemComponent; -}()); - -function ThfBreadcrumbItemComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfBreadcrumbItemComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfBreadcrumbItemComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfBreadcrumbItemComponent.propDecorators; - /** @type {?} */ - ThfBreadcrumbItemComponent.prototype.label; - /** @type {?} */ - ThfBreadcrumbItemComponent.prototype.link; - /** @type {?} */ - ThfBreadcrumbItemComponent.prototype.itemActive; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfBreadcrumbComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_breadcrumb_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsPrivate - * - * \@docsExtends ThfBreadcrumbBaseComponent - * - * \@examplePrivate - * - * - * - * - * - */ -var ThfBreadcrumbComponent = /** @class */ (function (_super) { - __extends(ThfBreadcrumbComponent, _super); - function ThfBreadcrumbComponent(element, renderer, changeDetector) { - var _this = _super.call(this) || this; - _this.element = element; - _this.renderer = renderer; - _this.changeDetector = changeDetector; - _this.showDropdown = false; - _this.showDropdownToggle = false; - _this._breadcrumbItemsLenght = 0; - renderer.listen('window', 'resize', function (event) { - _this.debounceResize(); - }); - renderer.listen('document', 'click', function (event) { - _this.wasClickedonDropdown(event); - }); - return _this; - } - /** - * @return {?} - */ - ThfBreadcrumbComponent.prototype.ngAfterViewInit = /** - * @return {?} - */ - function () { - var _this = this; - setTimeout(function () { - _this.calcBreadcrumbItemsWidth(); - _this.calcBreadcrumb(); - }); - this.changeDetector.detectChanges(); - }; - /** - * @param {?} event - * @return {?} - */ - ThfBreadcrumbComponent.prototype.wasClickedonDropdown = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ clickedOutIconDropdown = this.checkClickOutElement(event, this.dropdownIcon); - if (clickedOutIconDropdown) { - this.showDropdown = false; - } - }; - /** - * @param {?} event - * @param {?} element - * @return {?} - */ - ThfBreadcrumbComponent.prototype.checkClickOutElement = /** - * @param {?} event - * @param {?} element - * @return {?} - */ - function (event, element) { - return element && !element.nativeElement.contains(event.target); - }; - /** - * @return {?} - */ - ThfBreadcrumbComponent.prototype.calcBreadcrumb = /** - * @return {?} - */ - function () { - var /** @type {?} */ breadcrumbFavorite = this.getBreadcrumbFavoriteWidth(); - var /** @type {?} */ breadcrumb = this.getBreadcrumbWidth(breadcrumbFavorite); - if (breadcrumb <= this._breadcrumbItemsLenght) { - this.enableBreadcrumbResponsive(); - } - else { - this.disableBreadcrumbResponsive(); - } - }; - /** - * @return {?} - */ - ThfBreadcrumbComponent.prototype.getBreadcrumbFavoriteWidth = /** - * @return {?} - */ - function () { - return this.favoriteService ? this.element.nativeElement - .querySelector('.thf-breadcrumb-favorite').offsetWidth + 20 : 0; - }; - /** - * @param {?} breadcrumbFavorite - * @return {?} - */ - ThfBreadcrumbComponent.prototype.getBreadcrumbWidth = /** - * @param {?} breadcrumbFavorite - * @return {?} - */ - function (breadcrumbFavorite) { - return this.element.nativeElement.querySelector('.thf-breadcrumb').offsetWidth - breadcrumbFavorite; - }; - /** - * @return {?} - */ - ThfBreadcrumbComponent.prototype.calcBreadcrumbItemsWidth = /** - * @return {?} - */ - function () { - var /** @type {?} */ breadcrumbItem = this.element.nativeElement - .querySelectorAll('.thf-breadcrumb-item, .thf-breadcrumb-item-active'); - this._breadcrumbItemsLenght = Array.from(breadcrumbItem) - .map(function (breadcrumb) { return breadcrumb['offsetWidth']; }) - .reduce(function (a, b) { return a + b; }) + 16; - }; - /** - * @return {?} - */ - ThfBreadcrumbComponent.prototype.enableBreadcrumbResponsive = /** - * @return {?} - */ - function () { - this.showDropdownToggle = true; - this.itemsView = this.items.slice(-2); - this.dropdownItems = this.items.slice(0, -2).reverse(); - }; - /** - * @return {?} - */ - ThfBreadcrumbComponent.prototype.disableBreadcrumbResponsive = /** - * @return {?} - */ - function () { - this.showDropdownToggle = false; - this.itemsView = [].concat(this.items); - this.showDropdown = false; - }; - /** - * @return {?} - */ - ThfBreadcrumbComponent.prototype.debounceResize = /** - * @return {?} - */ - function () { - var _this = this; - clearTimeout(this.timeoutResize); - this.timeoutResize = setTimeout(function () { - _this.calcBreadcrumb(); - }, 50); - }; - ThfBreadcrumbComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-breadcrumb', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfBreadcrumbComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["X" /* Renderer2 */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["k" /* ChangeDetectorRef */], }, - ]; }; - ThfBreadcrumbComponent.propDecorators = { - "dropdownIcon": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['dropdownIcon', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - }; - return ThfBreadcrumbComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_breadcrumb_base_component__["a" /* ThfBreadcrumbBaseComponent */])); - -function ThfBreadcrumbComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfBreadcrumbComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfBreadcrumbComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfBreadcrumbComponent.propDecorators; - /** @type {?} */ - ThfBreadcrumbComponent.prototype.showDropdown; - /** @type {?} */ - ThfBreadcrumbComponent.prototype.showDropdownToggle; - /** @type {?} */ - ThfBreadcrumbComponent.prototype.dropdownItems; - /** @type {?} */ - ThfBreadcrumbComponent.prototype._breadcrumbItemsLenght; - /** @type {?} */ - ThfBreadcrumbComponent.prototype.timeoutResize; - /** @type {?} */ - ThfBreadcrumbComponent.prototype.dropdownIcon; - /** @type {?} */ - ThfBreadcrumbComponent.prototype.element; - /** @type {?} */ - ThfBreadcrumbComponent.prototype.renderer; - /** @type {?} */ - ThfBreadcrumbComponent.prototype.changeDetector; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfBreadcrumbModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_breadcrumb_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_breadcrumb_dropdown_thf_breadcrumb_dropdown_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb-dropdown/thf-breadcrumb-dropdown.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__thf_breadcrumb_favorite_thf_breadcrumb_favorite_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb-favorite/thf-breadcrumb-favorite.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__thf_breadcrumb_item_thf_breadcrumb_item_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-breadcrumb/thf-breadcrumb-item/thf-breadcrumb-item.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - - -/** - * \@description - * - * Módulo do componente thf-breadcrumb. - * - */ -var ThfBreadcrumbModule = /** @class */ (function () { - function ThfBreadcrumbModule() { - } - ThfBreadcrumbModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_0__angular_common__["b" /* CommonModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_router__["c" /* RouterModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_3__thf_breadcrumb_component__["a" /* ThfBreadcrumbComponent */], - __WEBPACK_IMPORTED_MODULE_4__thf_breadcrumb_dropdown_thf_breadcrumb_dropdown_component__["a" /* ThfBreadcrumbDropdownComponent */], - __WEBPACK_IMPORTED_MODULE_5__thf_breadcrumb_favorite_thf_breadcrumb_favorite_component__["a" /* ThfBreadcrumbFavoriteComponent */], - __WEBPACK_IMPORTED_MODULE_6__thf_breadcrumb_item_thf_breadcrumb_item_component__["a" /* ThfBreadcrumbItemComponent */] - ], - exports: [__WEBPACK_IMPORTED_MODULE_3__thf_breadcrumb_component__["a" /* ThfBreadcrumbComponent */]] - },] }, - ]; - /** @nocollapse */ - ThfBreadcrumbModule.ctorParameters = function () { return []; }; - return ThfBreadcrumbModule; -}()); - -function ThfBreadcrumbModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfBreadcrumbModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfBreadcrumbModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-button-group/thf-button-group-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfButtonGroupBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@description - * - * O componente `thf-button-group` é formado por um conjunto de botões distribuídos horizontalmente. - * - * Apesar do botões serem apresentados em grupo, é possível definir para cada botão do grupo um label, uma ação e se o mesmo - * deverá estar habilitado ou não, ou seja cada um dos botões pode ser tratado de forma individual. - * - * O grupo de botões deve ser utilizado para organizar as ações de forma visual e transmitir a ideia de que os botões fazem - * parte de um mesmo segmento. - * - * ### Boas práticas - * - * - Evite usar o `thf-button-group` com apenas 1 ação, para isso utilize o `thf-button`. - * - Procure utilizar no máximo 3 ações para cada `thf-button-group`. - * - * > As recomendações do `thf-button` também valem para o `thf-button-group`. - */ -var ThfButtonGroupBaseComponent = /** @class */ (function () { - function ThfButtonGroupBaseComponent() { - /** - * Lista de botões. - */ - this.buttons = []; - } - ThfButtonGroupBaseComponent.propDecorators = { - "buttons": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-buttons',] },], - }; - return ThfButtonGroupBaseComponent; -}()); - -function ThfButtonGroupBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfButtonGroupBaseComponent.propDecorators; - /** - * Lista de botões. - * @type {?} - */ - ThfButtonGroupBaseComponent.prototype.buttons; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-button-group/thf-button-group.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfButtonGroupComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_button_group_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button-group/thf-button-group-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsExtends ThfButtonGroupBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - */ -var ThfButtonGroupComponent = /** @class */ (function (_super) { - __extends(ThfButtonGroupComponent, _super); - function ThfButtonGroupComponent(viewRef) { - var _this = _super.call(this) || this; - // Get instance of parent to execute the actions - // Get instance of parent to execute the actions - _this.parentRef = viewRef['_view']['component']; - return _this; - } - ThfButtonGroupComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-button-group', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfButtonGroupComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - ]; }; - return ThfButtonGroupComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_button_group_base_component__["a" /* ThfButtonGroupBaseComponent */])); - -function ThfButtonGroupComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfButtonGroupComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfButtonGroupComponent.ctorParameters; - /** @type {?} */ - ThfButtonGroupComponent.prototype.parentRef; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-button-group/thf-button-group.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfButtonGroupModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_button_index__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button/index.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_button_group_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button-group/thf-button-group.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@description - * - * Módulo do componente thf-button-group. - */ -var ThfButtonGroupModule = /** @class */ (function () { - function ThfButtonGroupModule() { - } - ThfButtonGroupModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */], - __WEBPACK_IMPORTED_MODULE_2__thf_button_index__["a" /* ThfButtonModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_3__thf_button_group_component__["a" /* ThfButtonGroupComponent */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_3__thf_button_group_component__["a" /* ThfButtonGroupComponent */] - ] - },] }, - ]; - /** @nocollapse */ - ThfButtonGroupModule.ctorParameters = function () { return []; }; - return ThfButtonGroupModule; -}()); - -function ThfButtonGroupModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfButtonGroupModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfButtonGroupModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-button/index.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__thf_button_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button/thf-button.module.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__thf_button_module__["a"]; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-button/thf-button-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfButtonBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -var /** @type {?} */ THF_BUTTON_TYPES = ['default', 'primary', 'danger', 'link']; -var /** @type {?} */ THF_BUTTON_TYPE_DEFAULT = 'default'; -/** - * \@description - * - * O `thf-button` permite que o usuário execute ações predefinidas pelo desenvolvedor. - * - * Através dos tipos, é possível identificar a importância de cada ação, sendo ela primária (`primary`) ou até mesmo uma - * ação irreversível (`danger`), como a exclusão de um registro. - * - * ### Boas práticas - * - * - Evite `labels` extensos que quebram o layout do `thf-button`, use `labels` diretos, curtos e intuitivos. - * - Utilize apenas um `thf-button` configurado como `primary` por página. - * - Para ações irreversíveis use sempre o tipo `danger`. - */ -var ThfButtonBaseComponent = /** @class */ (function () { - function ThfButtonBaseComponent() { - this._small = false; - this._type = 'default'; - this._disabled = false; - /** - * Ação que será executada quando o usuário clicar sobre o `thf-button`. - */ - this.click = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - Object.defineProperty(ThfButtonBaseComponent.prototype, "primary", { - get: /** - * @return {?} - */ - function () { - return this._type === 'primary'; - }, - set: /** - * @deprecated 12.1.21 - * - * \@optional - * - * \@description - * - * Define o botão como primário, ou seja, deve ser a ação principal da página. - * - * > Veja a propriedade `t-type`. - * - * \@default `false` - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ isPrimary = /** @type {?} */ (value) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(value); - this.type = isPrimary ? 'primary' : THF_BUTTON_TYPE_DEFAULT; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfButtonBaseComponent.prototype, "small", { - get: /** - * @return {?} - */ - function () { - return this._small; - }, - set: /** - * \@optional - * - * \@description - * - * Deixa o botão menor. - * - * \@default `false` - * - * @param {?} value - * @return {?} - */ - function (value) { - this._small = /** @type {?} */ (value) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(value); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfButtonBaseComponent.prototype, "type", { - get: /** - * @return {?} - */ - function () { - return this._type; - }, - set: /** - * \@optional - * - * \@description - * - * Define o estilo do `thf-button`. - * - * Valore válidos: - * - `default`: estilo padrão do `thf-button`. - * - `primary`: deixa o `thf-button` com destaque, deve ser usado para ações primárias. - * - `danger`: deve ser usado para ações que o usuário precisa ter cuidado ao executa-lá. - * - `link`: o `thf-button` recebe o estilo de um link. - * - * \@default `default` - * - * @param {?} value - * @return {?} - */ - function (value) { - this._type = THF_BUTTON_TYPES.includes(value) ? value : THF_BUTTON_TYPE_DEFAULT; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfButtonBaseComponent.prototype, "disabled", { - get: /** - * @return {?} - */ - function () { - return this._disabled; - }, - set: /** - * \@optional - * - * \@description - * - * Desabilita o `thf-button` e não permite que o usuário interaja com o mesmo. - * - * \@default `false` - * - * @param {?} value - * @return {?} - */ - function (value) { - this._disabled = /** @type {?} */ (value) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(value); - }, - enumerable: true, - configurable: true - }); - ThfButtonBaseComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "icon": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-icon',] },], - "primary": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-primary',] },], - "small": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-small',] },], - "type": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-type',] },], - "disabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled',] },], - "click": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-click',] },], - }; - return ThfButtonBaseComponent; -}()); - -function ThfButtonBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfButtonBaseComponent.propDecorators; - /** @type {?} */ - ThfButtonBaseComponent.prototype._small; - /** @type {?} */ - ThfButtonBaseComponent.prototype._type; - /** @type {?} */ - ThfButtonBaseComponent.prototype._disabled; - /** - * Label do botão. - * @type {?} - */ - ThfButtonBaseComponent.prototype.label; - /** - * Ícone exibido ao lado esquerdo do label do botão. - * - * É possível usar qualquer uma dos ícones da [Biblioteca de ícones](/guides/icons). - * - * @type {?} - */ - ThfButtonBaseComponent.prototype.icon; - /** - * Ação que será executada quando o usuário clicar sobre o `thf-button`. - * @type {?} - */ - ThfButtonBaseComponent.prototype.click; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-button/thf-button.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfButtonComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_button_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button/thf-button-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsExtends ThfButtonBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfButtonComponent = /** @class */ (function (_super) { - __extends(ThfButtonComponent, _super); - function ThfButtonComponent() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @return {?} - */ - ThfButtonComponent.prototype.onClick = /** - * @return {?} - */ - function () { - this.click.emit(null); - }; - ThfButtonComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-button', template: " " - },] }, - ]; - /** @nocollapse */ - ThfButtonComponent.ctorParameters = function () { return []; }; - return ThfButtonComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_button_base_component__["a" /* ThfButtonBaseComponent */])); - -function ThfButtonComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfButtonComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfButtonComponent.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-button/thf-button.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfButtonModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_button_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button/thf-button.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * - * Módulo do componente thf-button. - */ -var ThfButtonModule = /** @class */ (function () { - function ThfButtonModule() { - } - ThfButtonModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_2__thf_button_component__["a" /* ThfButtonComponent */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_2__thf_button_component__["a" /* ThfButtonComponent */] - ] - },] }, - ]; - /** @nocollapse */ - ThfButtonModule.ctorParameters = function () { return []; }; - return ThfButtonModule; -}()); - -function ThfButtonModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfButtonModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfButtonModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-calendar/thf-calendar.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfCalendarComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_calendar_lang_service__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-calendar/thf-calendar.lang.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_calendar_service__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-calendar/thf-calendar.service.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsPrivate - * - * \@description - * - * Componente de calendário de uso interno - */ -var ThfCalendarComponent = /** @class */ (function () { - function ThfCalendarComponent(elementRef, thfCalendarService, thfCalendarLangService) { - this.elementRef = elementRef; - this.dateChange = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - this.submit = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - this.today = new Date(); - this.isMobile = __WEBPACK_IMPORTED_MODULE_1__utils_util__["h" /* isMobile */]; - this.displayMonths = Array(); - this.displayWeedDays = Array(); - this.thfCalendarService = thfCalendarService; - this.thfCalendarLangService = thfCalendarLangService; - } - Object.defineProperty(ThfCalendarComponent.prototype, "date", { - get: /** - * @return {?} - */ - function () { - return this._date; - }, - set: /** - * @param {?} val - * @return {?} - */ - function (val) { - if (val) { - this._date = val; - this.updateDate(val); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfCalendarComponent.prototype, "dateStart", { - get: /** - * @return {?} - */ - function () { - return this._dateStart; - }, - set: /** - * @param {?} val - * @return {?} - */ - function (val) { - if (val) { - var /** @type {?} */ year = val.getFullYear(); - var /** @type {?} */ month = val.getMonth(); - var /** @type {?} */ day = val.getDate(); - this._dateStart = new Date(year, month, day, 0, 0, 0); - } - else { - this._dateStart = undefined; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfCalendarComponent.prototype, "dateEnd", { - get: /** - * @return {?} - */ - function () { - return this._dateEnd; - }, - set: /** - * @param {?} val - * @return {?} - */ - function (val) { - if (val) { - var /** @type {?} */ year = val.getFullYear(); - var /** @type {?} */ month = val.getMonth(); - var /** @type {?} */ day = val.getDate(); - this._dateEnd = new Date(year, month, day, 23, 59, 59); - } - else { - this._dateEnd = undefined; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfCalendarComponent.prototype, "locale", { - get: /** - * @return {?} - */ - function () { - return this._locale; - }, - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - this._locale = value; - this.initializeLanguage(); - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfCalendarComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - this.initializeLanguage(); - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.initializeLanguage = /** - * @return {?} - */ - function () { - this.thfCalendarLangService.setLanguage(this.locale); - this.displayWeedDays = this.thfCalendarLangService.getArrayWeekDays(); - this.displayMonths = this.thfCalendarLangService.getArrayMonths(); - this.init(); - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.init = /** - * @return {?} - */ - function () { - if (!this.date) { - this.date = new Date(); - } - this.selectDay(); - this.updateDate(this.date); - if (this.isMobile()) { - this.setMobileVisualization(); - } - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.setMobileVisualization = /** - * @return {?} - */ - function () { - var /** @type {?} */ thfCalendarOverlay = this.elementRef.nativeElement.querySelector('.thf-calendar-overlay'); - var /** @type {?} */ thfCalendar = this.elementRef.nativeElement.querySelector('.thf-calendar'); - thfCalendar.classList.add('thf-calendar-mobile'); - thfCalendarOverlay.classList.remove('thf-invisible'); - }; - /** - * @param {?} date - * @return {?} - */ - ThfCalendarComponent.prototype.updateDate = /** - * @param {?} date - * @return {?} - */ - function (date) { - this.currentMonthNumber = date.getMonth(); - this.currentMonth = this.displayMonths[this.currentMonthNumber]; - this.currentYear = date.getFullYear(); - this.currentDay = date.getDate(); - this.currentDayOfWeek = this.displayWeedDays[date.getDay()]; - this.updateDisplay(this.currentYear, this.currentMonthNumber); - }; - /** - * @param {?} year - * @param {?} month - * @return {?} - */ - ThfCalendarComponent.prototype.updateDisplay = /** - * @param {?} year - * @param {?} month - * @return {?} - */ - function (year, month) { - var /** @type {?} */ calendarArray = this.thfCalendarService.monthDays(year, month); - this.displayDays = [].concat.apply([], calendarArray); - this.displayMonthNumber = month; - this.displayMonth = this.displayMonths[month]; - this.displayYear = year; - this.getArrayDecade(year); - }; - /** - * @param {?} date1 - * @param {?} date2 - * @return {?} - */ - ThfCalendarComponent.prototype.equalsDate = /** - * @param {?} date1 - * @param {?} date2 - * @return {?} - */ - function (date1, date2) { - try { - return date1.getFullYear() === date2.getFullYear() && - date1.getMonth() === date2.getMonth() && - date1.getDate() === date2.getDate(); - } - catch (/** @type {?} */ error) { - return false; - } - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.selectDay = /** - * @return {?} - */ - function () { - this.elDays.nativeElement.classList.remove('thf-invisible'); - this.elMonths.nativeElement.classList.add('thf-invisible'); - this.elYears.nativeElement.classList.add('thf-invisible'); - this.lastDisplay = 'day'; - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.selectMonth = /** - * @return {?} - */ - function () { - this.elDays.nativeElement.classList.add('thf-invisible'); - this.elMonths.nativeElement.classList.remove('thf-invisible'); - this.elYears.nativeElement.classList.add('thf-invisible'); - this.lastDisplay = 'month'; - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.selectYear = /** - * @return {?} - */ - function () { - this.elDays.nativeElement.classList.add('thf-invisible'); - this.elMonths.nativeElement.classList.add('thf-invisible'); - this.elYears.nativeElement.classList.remove('thf-invisible'); - }; - /** - * @param {?} day - * @return {?} - */ - ThfCalendarComponent.prototype.getDayBackgroundColor = /** - * @param {?} day - * @return {?} - */ - function (day) { - if (this.equalsDate(day, this.date)) { - return 'thf-calendar-box-background-selected'; - } - else if (this.equalsDate(day, this.today)) { - return 'thf-calendar-box-background-today'; - } - else if (day) { - if (this.dateInRange(day)) { - return 'thf-calendar-box-background'; - } - else { - return 'thf-calendar-box-background-disabled'; - } - } - else { - return ''; - } - }; - /** - * @param {?} day - * @return {?} - */ - ThfCalendarComponent.prototype.getDayForegroundColor = /** - * @param {?} day - * @return {?} - */ - function (day) { - if (this.equalsDate(day, this.date)) { - return 'thf-calendar-box-foreground-selected'; - } - else if (this.equalsDate(day, this.today)) { - return 'thf-calendar-box-foreground-today'; - } - else { - if (this.dateInRange(day)) { - return 'thf-calendar-box-foreground'; - } - else { - return 'thf-calendar-box-foreground-disabled'; - } - } - }; - /** - * @param {?} date - * @return {?} - */ - ThfCalendarComponent.prototype.dateInRange = /** - * @param {?} date - * @return {?} - */ - function (date) { - if (this._dateStart && !this._dateEnd) { - return date >= this._dateStart ? true : false; - } - if (this._dateEnd && !this._dateStart) { - return date <= this._dateEnd ? true : false; - } - if (this._dateStart && this._dateEnd) { - return date >= this._dateStart && date <= this._dateEnd ? true : false; - } - else { - return true; - } - }; - /** - * @param {?} month - * @return {?} - */ - ThfCalendarComponent.prototype.getMonthBackgroundColor = /** - * @param {?} month - * @return {?} - */ - function (month) { - return (month === this.displayMonthNumber) ? 'thf-calendar-box-background-selected' : 'thf-calendar-box-background'; - }; - /** - * @param {?} month - * @return {?} - */ - ThfCalendarComponent.prototype.getMonthForegroundColor = /** - * @param {?} month - * @return {?} - */ - function (month) { - return (month === this.displayMonthNumber) ? 'thf-calendar-box-foreground-selected' : 'thf-calendar-box-foreground'; - }; - /** - * @param {?} year - * @return {?} - */ - ThfCalendarComponent.prototype.getYearBackgroundColor = /** - * @param {?} year - * @return {?} - */ - function (year) { - return (year === this.currentYear) ? 'thf-calendar-box-background-selected' : 'thf-calendar-box-background'; - }; - /** - * @param {?} year - * @return {?} - */ - ThfCalendarComponent.prototype.getYearForegroundColor = /** - * @param {?} year - * @return {?} - */ - function (year) { - return (year === this.currentYear) ? 'thf-calendar-box-foreground-selected' : 'thf-calendar-box-foreground'; - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.onPrevMonth = /** - * @return {?} - */ - function () { - if (this.displayMonthNumber > 0) { - this.updateDisplay(this.displayYear, this.displayMonthNumber - 1); - } - else { - this.updateDisplay(this.displayYear - 1, 11); - } - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.onNextMonth = /** - * @return {?} - */ - function () { - if (this.displayMonthNumber < 11) { - this.updateDisplay(this.displayYear, this.displayMonthNumber + 1); - } - else { - this.updateDisplay(this.displayYear + 1, 0); - } - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.onPrevYear = /** - * @return {?} - */ - function () { - this.updateDisplay(this.displayYear - 1, this.displayMonthNumber); - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.onNextYear = /** - * @return {?} - */ - function () { - this.updateDisplay(this.displayYear + 1, this.displayMonthNumber); - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.onPrevDecade = /** - * @return {?} - */ - function () { - this.updateDisplay(this.displayYear - 10, this.displayMonthNumber); - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.onNextDecade = /** - * @return {?} - */ - function () { - this.updateDisplay(this.displayYear + 10, this.displayMonthNumber); - }; - // Ao selecionar um ano - /** - * @param {?} year - * @param {?} month - * @return {?} - */ - ThfCalendarComponent.prototype.onSelectYear = /** - * @param {?} year - * @param {?} month - * @return {?} - */ - function (year, month) { - // Se veio da tela de seleção de mês - if (this.lastDisplay === 'month') { - this.selectMonth(); - } - else { - this.selectDay(); - } - this.currentYear = year; - this.updateDisplay(year, month); - }; - // Ao selecionar um mês - /** - * @param {?} year - * @param {?} month - * @return {?} - */ - ThfCalendarComponent.prototype.onSelectMonth = /** - * @param {?} year - * @param {?} month - * @return {?} - */ - function (year, month) { - this.selectDay(); - this.updateDisplay(year, month); - }; - // Ao selecionar uma data - /** - * @param {?} date - * @return {?} - */ - ThfCalendarComponent.prototype.onSelectDate = /** - * @param {?} date - * @return {?} - */ - function (date) { - if (this.dateInRange(date)) { - this.date = date; - this.dateChange.emit(date); - this.submit.emit(this.date); - } - }; - // Obtém um array de todos os anos desta década - /** - * @param {?} year - * @return {?} - */ - ThfCalendarComponent.prototype.getArrayDecade = /** - * @param {?} year - * @return {?} - */ - function (year) { - this.displayDecade = Array(); - var /** @type {?} */ i; - if (year % 10 === 0) { - // Adiciona todos os anos à década - for (i = year; i < year + 10; i++) { - this.displayDecade.push(i); - } - this.displayStartDecade = year; - this.displayFinalDecade = year + 9; - } - else { - // Descobre o início da década - while (year % 10 !== 0) { - year--; - } - this.displayStartDecade = year; - this.displayFinalDecade = year + 9; - // Adiciona todos os anos à década - for (i = year; i < year + 10; i++) { - this.displayDecade.push(i); - } - } - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.getWordMonth = /** - * @return {?} - */ - function () { - return this.thfCalendarLangService.getWordMonth(); - }; - /** - * @return {?} - */ - ThfCalendarComponent.prototype.getWordYear = /** - * @return {?} - */ - function () { - return this.thfCalendarLangService.getWordYear(); - }; - ThfCalendarComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-calendar', template: "
    {{ displayMonth }} {{ displayYear }}
    {{ day.toLowerCase() }}
    {{ day.getDate() }}
    {{ displayYear }}
    {{ getWordMonth() }}
    {{ month }}
    {{ displayStartDecade }} - {{ displayFinalDecade }}
    {{ getWordYear() }}
    {{ year }}
    ", - providers: [__WEBPACK_IMPORTED_MODULE_3__thf_calendar_service__["a" /* ThfCalendarService */], __WEBPACK_IMPORTED_MODULE_2__thf_calendar_lang_service__["a" /* ThfCalendarLangService */]] - },] }, - ]; - /** @nocollapse */ - ThfCalendarComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_3__thf_calendar_service__["a" /* ThfCalendarService */], }, - { type: __WEBPACK_IMPORTED_MODULE_2__thf_calendar_lang_service__["a" /* ThfCalendarLangService */], }, - ]; }; - ThfCalendarComponent.propDecorators = { - "date": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-date',] },], - "dateChange": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-dateChange',] },], - "dateStart": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-start',] },], - "dateEnd": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-end',] },], - "locale": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-locale',] },], - "submit": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-submit',] },], - "elDays": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['days', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "elMonths": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['months', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "elYears": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['years', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - }; - return ThfCalendarComponent; -}()); - -function ThfCalendarComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfCalendarComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfCalendarComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfCalendarComponent.propDecorators; - /** @type {?} */ - ThfCalendarComponent.prototype.thfCalendarService; - /** @type {?} */ - ThfCalendarComponent.prototype.thfCalendarLangService; - /** @type {?} */ - ThfCalendarComponent.prototype._date; - /** @type {?} */ - ThfCalendarComponent.prototype.dateChange; - /** @type {?} */ - ThfCalendarComponent.prototype._dateStart; - /** @type {?} */ - ThfCalendarComponent.prototype._dateEnd; - /** @type {?} */ - ThfCalendarComponent.prototype._locale; - /** @type {?} */ - ThfCalendarComponent.prototype.submit; - /** @type {?} */ - ThfCalendarComponent.prototype.elDays; - /** @type {?} */ - ThfCalendarComponent.prototype.elMonths; - /** @type {?} */ - ThfCalendarComponent.prototype.elYears; - /** @type {?} */ - ThfCalendarComponent.prototype.today; - /** @type {?} */ - ThfCalendarComponent.prototype.isMobile; - /** @type {?} */ - ThfCalendarComponent.prototype.currentMonth; - /** @type {?} */ - ThfCalendarComponent.prototype.currentMonthNumber; - /** @type {?} */ - ThfCalendarComponent.prototype.currentYear; - /** @type {?} */ - ThfCalendarComponent.prototype.currentDay; - /** @type {?} */ - ThfCalendarComponent.prototype.currentDayOfWeek; - /** @type {?} */ - ThfCalendarComponent.prototype.displayMonth; - /** @type {?} */ - ThfCalendarComponent.prototype.displayMonthNumber; - /** @type {?} */ - ThfCalendarComponent.prototype.displayYear; - /** @type {?} */ - ThfCalendarComponent.prototype.displayDecade; - /** @type {?} */ - ThfCalendarComponent.prototype.displayStartDecade; - /** @type {?} */ - ThfCalendarComponent.prototype.displayFinalDecade; - /** @type {?} */ - ThfCalendarComponent.prototype.displayDays; - /** @type {?} */ - ThfCalendarComponent.prototype.displayMonths; - /** @type {?} */ - ThfCalendarComponent.prototype.displayWeedDays; - /** @type {?} */ - ThfCalendarComponent.prototype.lastDisplay; - /** @type {?} */ - ThfCalendarComponent.prototype.elementRef; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-calendar/thf-calendar.lang.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfCalendarLangService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -var ThfCalendarLangService = /** @class */ (function () { - function ThfCalendarLangService() { - this.months = [ - { - pt: 'Janeiro', - en: 'January', - es: 'Enero' - }, - { - pt: 'Fevereiro', - en: 'February', - es: 'Febrero' - }, - { - pt: 'Março', - en: 'March', - es: 'Marzo' - }, - { - pt: 'Abril', - en: 'April', - es: 'Abril' - }, - { - pt: 'Maio', - en: 'May', - es: 'Mayo' - }, - { - pt: 'Junho', - en: 'June', - es: 'Junio' - }, - { - pt: 'Julho', - en: 'July', - es: 'Julio' - }, - { - pt: 'Agosto', - en: 'August', - es: 'Agosto' - }, - { - pt: 'Setembro', - en: 'September', - es: 'Setiembre' - }, - { - pt: 'Outubro', - en: 'October', - es: 'Octubre' - }, - { - pt: 'Novembro', - en: 'November', - es: 'Noviembre' - }, - { - pt: 'Dezembro', - en: 'December', - es: 'Diciembre' - } - ]; - this.shortWeekDays = [ - { - pt: 'Dom', - en: 'Sun', - es: 'Dom' - }, - { - pt: 'Seg', - en: 'Mon', - es: 'Lun' - }, - { - pt: 'Ter', - en: 'Tue', - es: 'Mar' - }, - { - pt: 'Qua', - en: 'Wed', - es: 'Mié' - }, - { - pt: 'Qui', - en: 'Thu', - es: 'Jue' - }, - { - pt: 'Sex', - en: 'Fri', - es: 'Vie' - }, - { - pt: 'Sáb', - en: 'Sat', - es: 'Sáb' - } - ]; - this.wordMonth = { - pt: 'Mês', - en: 'Month', - es: 'Mes' - }; - this.wordYear = { - pt: 'Ano', - en: 'Year', - es: 'Año' - }; - this.lang = 'pt'; - } - /** - * @param {?} lang - * @return {?} - */ - ThfCalendarLangService.prototype.setLanguage = /** - * @param {?} lang - * @return {?} - */ - function (lang) { - if (lang) { - if (lang.length >= 2) { - lang = lang.toLowerCase().slice(0, 2); - this.lang = (lang === 'pt' || lang === 'en' || lang === 'es') ? lang : 'pt'; - } - } - }; - /** - * @return {?} - */ - ThfCalendarLangService.prototype.getWordMonth = /** - * @return {?} - */ - function () { - return this.wordMonth[this.lang]; - }; - /** - * @return {?} - */ - ThfCalendarLangService.prototype.getWordYear = /** - * @return {?} - */ - function () { - return this.wordYear[this.lang]; - }; - /** - * @param {?} month - * @return {?} - */ - ThfCalendarLangService.prototype.getMonth = /** - * @param {?} month - * @return {?} - */ - function (month) { - return this.months[month][this.lang]; - }; - /** - * @return {?} - */ - ThfCalendarLangService.prototype.getArrayMonths = /** - * @return {?} - */ - function () { - var /** @type {?} */ arrMonths = Array(); - for (var /** @type {?} */ i = 0; i < this.months.length; i++) { - arrMonths.push(this.months[i][this.lang]); - } - return arrMonths; - }; - /** - * @param {?} day - * @return {?} - */ - ThfCalendarLangService.prototype.getWeedDays = /** - * @param {?} day - * @return {?} - */ - function (day) { - return this.shortWeekDays[day][this.lang]; - }; - /** - * @return {?} - */ - ThfCalendarLangService.prototype.getArrayWeekDays = /** - * @return {?} - */ - function () { - var /** @type {?} */ arrWeekDays = Array(); - for (var /** @type {?} */ i = 0; i < this.shortWeekDays.length; i++) { - arrWeekDays.push(this.shortWeekDays[i][this.lang]); - } - return arrWeekDays; - }; - ThfCalendarLangService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, - ]; - /** @nocollapse */ - ThfCalendarLangService.ctorParameters = function () { return []; }; - return ThfCalendarLangService; -}()); - -function ThfCalendarLangService_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfCalendarLangService.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfCalendarLangService.ctorParameters; - /** @type {?} */ - ThfCalendarLangService.prototype.months; - /** @type {?} */ - ThfCalendarLangService.prototype.shortWeekDays; - /** @type {?} */ - ThfCalendarLangService.prototype.wordMonth; - /** @type {?} */ - ThfCalendarLangService.prototype.wordYear; - /** @type {?} */ - ThfCalendarLangService.prototype.lang; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-calendar/thf-calendar.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfCalendarService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -var ThfCalendarService = /** @class */ (function () { - function ThfCalendarService() { - this.firstWeekDay = 0; // 0 = sunday - } - /** - * @param {?} date - * @return {?} - */ - ThfCalendarService.prototype.weekStartDate = /** - * @param {?} date - * @return {?} - */ - function (date) { - var /** @type {?} */ startDate = new Date(date.getTime()); - while (startDate.getDay() !== this.firstWeekDay) { - startDate.setDate(startDate.getDate() - 1); - } - return startDate; - }; - /** - * @param {?} year - * @param {?} month - * @param {?=} dayFormatter - * @param {?=} weekFormatter - * @return {?} - */ - ThfCalendarService.prototype.monthDates = /** - * @param {?} year - * @param {?} month - * @param {?=} dayFormatter - * @param {?=} weekFormatter - * @return {?} - */ - function (year, month, dayFormatter, weekFormatter) { - if (dayFormatter === void 0) { dayFormatter = null; } - if (weekFormatter === void 0) { weekFormatter = null; } - if ((typeof month !== 'number') || (month < 0) || (month > 11)) { - throw Error(('month must be a number (Jan is 0)')); - } - var /** @type {?} */ weeks = []; - var /** @type {?} */ week = []; - var /** @type {?} */ i = 0; - var /** @type {?} */ date = this.weekStartDate(new Date(year, month, 1)); - do { - for (i = 0; i < 7; i++) { - week.push(dayFormatter ? dayFormatter(date) : date); - date = new Date(date.getTime()); - date.setDate(date.getDate() + 1); - } - weeks.push(weekFormatter ? weekFormatter(week) : week); - week = []; - } while ((date.getMonth() <= month) && (date.getFullYear() === year)); - return weeks; - }; - /** - * @param {?} year - * @param {?} month - * @return {?} - */ - ThfCalendarService.prototype.monthDays = /** - * @param {?} year - * @param {?} month - * @return {?} - */ - function (year, month) { - var /** @type {?} */ getDayOrZero = function (date) { - return date.getMonth() === month ? date : 0; - }; - return this.monthDates(year, month, getDayOrZero); - }; - ThfCalendarService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, - ]; - /** @nocollapse */ - ThfCalendarService.ctorParameters = function () { return []; }; - return ThfCalendarService; -}()); - -function ThfCalendarService_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfCalendarService.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfCalendarService.ctorParameters; - /** @type {?} */ - ThfCalendarService.prototype.firstWeekDay; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-chart/thf-chart-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfChartBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@description - * - * O componente de gráfico thf-chart deve ser utilizado para renderizar visualizações de dados de alta qualidade. - * - */ -var ThfChartBaseComponent = /** @class */ (function () { - function ThfChartBaseComponent() { - /** - * Altura do gráfico em pixels, por padrão é definido 400px. - */ - this.height = '400px'; - /** - * Evento que será disparado ao clicar nas séries. - */ - this.seriesClick = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento que será disparado ao posicionar o mouse sobre a série. - */ - this.seriesHover = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - Object.defineProperty(ThfChartBaseComponent.prototype, "setHeight", { - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ number = this.getValueAsNumber(value); - this.height = number && number > 0 ? number + "px" : '400px'; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfChartBaseComponent.prototype, "setMaxValue", { - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - this.maxValue = this.getValueAsNumber(value); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfChartBaseComponent.prototype, "setMinValue", { - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - this.minValue = this.getValueAsNumber(value); - }, - enumerable: true, - configurable: true - }); - /** - * @param {?} event - * @return {?} - */ - ThfChartBaseComponent.prototype.onSeriesClick = /** - * @param {?} event - * @return {?} - */ - function (event) { - this.seriesClick.emit(event); - }; - /** - * @param {?} event - * @return {?} - */ - ThfChartBaseComponent.prototype.onSeriesHover = /** - * @param {?} event - * @return {?} - */ - function (event) { - this.seriesHover.emit(event); - }; - /** - * @param {?} value - * @return {?} - */ - ThfChartBaseComponent.prototype.getValueAsNumber = /** - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ number = (typeof value === 'string') ? parseInt(value, null) : value; - return (number || number === 0) ? number : undefined; - }; - ThfChartBaseComponent.propDecorators = { - "title": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-title',] },], - "series": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-series',] },], - "categories": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-categories',] },], - "typeChart": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-type',] },], - "labelVisible": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label-visible',] },], - "setHeight": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-height',] },], - "setMaxValue": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-max-value',] },], - "setMinValue": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-min-value',] },], - "seriesClick": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-series-click',] },], - "seriesHover": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-series-hover',] },], - }; - return ThfChartBaseComponent; -}()); - -function ThfChartBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfChartBaseComponent.propDecorators; - /** - * Título do gráfico. - * @type {?} - */ - ThfChartBaseComponent.prototype.title; - /** - * Séries do gráfico, deve ser informado de acordo com o tipo de gráfico. - * @type {?} - */ - ThfChartBaseComponent.prototype.series; - /** - * Os nomes das categorias. O gráfico criará uma categoria para cada array de dados, exceto quando for pie, donut e funnel. - * @type {?} - */ - ThfChartBaseComponent.prototype.categories; - /** - * Tipo do gráfico, pode ser informado os seguintes tipos: - * area, bar, bubble, bullet, candlestick, column, donut, funnel, line, ohlc, pie, polarLine, rangeBar, scatter, scatterLine e waterfall. - * @type {?} - */ - ThfChartBaseComponent.prototype.typeChart; - /** - * Define se as labels das séries devem ser exibidas. O valor padrão é false. - * @type {?} - */ - ThfChartBaseComponent.prototype.labelVisible; - /** - * Altura do gráfico em pixels, por padrão é definido 400px. - * @type {?} - */ - ThfChartBaseComponent.prototype.height; - /** - * Valor máximo a ser apresentado no eixo y do gráfico. - * @type {?} - */ - ThfChartBaseComponent.prototype.maxValue; - /** - * Valor mínimo a ser apresentado no eixo y do gráfico. - * @type {?} - */ - ThfChartBaseComponent.prototype.minValue; - /** - * Evento que será disparado ao clicar nas séries. - * @type {?} - */ - ThfChartBaseComponent.prototype.seriesClick; - /** - * Evento que será disparado ao posicionar o mouse sobre a série. - * @type {?} - */ - ThfChartBaseComponent.prototype.seriesHover; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-chart/thf-chart-colors.constant.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfChartColors; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -// Array de cores para gráficos definido pela equipe de UX Totvs. -var /** @type {?} */ ThfChartColors = [ - ['#00CBE4'], - ['#00CBE4', '#32285C'], - ['#00CBE4', '#277099', '#32285C'], - ['#00CBE4', '#018DB0', '#325783', '#32285C'], - ['#00CBE4', '#009CBD', '#286F9B', '#354B7A', '#32285C'], - ['#00CBE4', '#00A5C5', '#0082A8', '#31628D', '#364473', '#32285C'], - ['#00CBE4', '#00AACB', '#018DAE', '#277099', '#325783', '#35426E', '#32285D'], - ['#00CBE4', '#00AFCE', '#0194B6', '#117FA2', '#0088AC', '#23789F', '#2B6992', '#32285C'], - ['#00CBE4', '#00BAD5', '#00A7C7', '#0197B8', '#0088AC', '#23789F', '#2B6992', '#315C87', '#32285C'], - ['#00CBE4', '#00BAD5', '#00A7C7', '#0197B8', '#0088AC', '#23789F', '#2B6992', '#315C87', '#364E7C', '#32285C'], - ['#00CBE4', '#00BAD5', '#00A7C7', '#0197B8', '#0088AC', '#23789F', '#2B6992', '#315C87', '#364E7C', '#36436F', '#32285C'], - ['#00CBE4', '#00BAD5', '#00A7C7', '#0197B8', '#0088AC', '#23789F', '#2B6992', '#315C87', '#364E7C', '#36436F', '#333565', '#32285C'], -]; - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-chart/thf-chart.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfChartComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_chart_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-chart/thf-chart-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_chart_colors_constant__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-chart/thf-chart-colors.constant.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfChartBaseComponent - * \@description - * - * Para o correto funcionamento do THF Chart deve ser importado o módulo ```BrowserAnimationsModule``` no módulo principal da sua aplicação. - * - * > Módulo da sua aplicação: - * - * - * ``` - * import { BrowserAnimationsModule } from '\@angular/platform-browser/animations'; - * - * ... - * - * \@NgModule({ - * imports: [ - * BrowserModule, - * BrowserAnimationsModule, - * ... - * ThfModule, - * ... - * ], - * declarations: [ - * AppComponent - * ], - * providers: [], - * bootstrap: [AppComponent] - * }) - * export class AppModule { } - * ``` - * - * No arquivo```angular-cli.json``` da sua aplicação você deve importar o arquivo ```all.css```, que pertence ao - * pacote ```\@progress/kendo-theme-default```. - * - * - * > Arquivo .angular-cli.json: - * - * - * ``` - * ... - * - * "styles": [ - * "../node_modules/\@progress/kendo-theme-default/dist/all.css" - * ] - * - * ... - * ``` - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfChartComponent = /** @class */ (function (_super) { - __extends(ThfChartComponent, _super); - function ThfChartComponent() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.label = { - color: '#fff', - background: '#0c9abe', - border: { - color: '#0c9abe' - } - }; - return _this; - } - /** - * @return {?} - */ - ThfChartComponent.prototype.getSeriesColor = /** - * @return {?} - */ - function () { - if (this.series) { - var /** @type {?} */ chart = this.typeChart; - var /** @type {?} */ index = this.series.length - 1; - if (chart === 'donut' || chart === 'funnel' || chart === 'pie') { - // Caso for donut, funnel ou pie utiliza a propriedade data para recuperar o index. - var /** @type {?} */ dataSeries = this.series[index].data; - var /** @type {?} */ dataSerieIndex = dataSeries.length - 1; - return __WEBPACK_IMPORTED_MODULE_2__thf_chart_colors_constant__["a" /* ThfChartColors */][dataSerieIndex]; - } - // Caso houver 12 ou mais series define o index como 11. - index = index >= 12 ? 11 : index; - return __WEBPACK_IMPORTED_MODULE_2__thf_chart_colors_constant__["a" /* ThfChartColors */][index]; - } - return __WEBPACK_IMPORTED_MODULE_2__thf_chart_colors_constant__["a" /* ThfChartColors */][11]; - }; - ThfChartComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-chart', - encapsulation: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_13" /* ViewEncapsulation */].None, template: " " - },] }, - ]; - /** @nocollapse */ - ThfChartComponent.ctorParameters = function () { return []; }; - return ThfChartComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_chart_base_component__["a" /* ThfChartBaseComponent */])); - -function ThfChartComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfChartComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfChartComponent.ctorParameters; - /** @type {?} */ - ThfChartComponent.prototype.label; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-chart/thf-chart.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfChartModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__progress_kendo_angular_charts__ = __webpack_require__("../../../../@progress/kendo-angular-charts/dist/es/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_chart_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-chart/thf-chart.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hammerjs__ = __webpack_require__("../../../../hammerjs/hammer.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hammerjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_hammerjs__); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - -/** - * \@description - * - * Módulo do componente thf-chart. - */ -var ThfChartModule = /** @class */ (function () { - function ThfChartModule() { - } - ThfChartModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_2__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_0__progress_kendo_angular_charts__["a" /* ChartModule */], - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_3__thf_chart_component__["a" /* ThfChartComponent */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_3__thf_chart_component__["a" /* ThfChartComponent */] - ] - },] }, - ]; - /** @nocollapse */ - ThfChartModule.ctorParameters = function () { return []; }; - return ThfChartModule; -}()); - -function ThfChartModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfChartModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfChartModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-code-editor/thf-code-editor-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfCodeEditorBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -var /** @type {?} */ THF_CODE_EDITOR_THEMES = ['vs-dark', 'vs', 'hc-black']; -var /** @type {?} */ THF_CODE_EDITOR_THEME_DEFAULT = 'vs'; -/** - * \@description - * - * O `thf-code-editor` é um componente para edição de código fonte baseado no Monaco Editor da Microsoft. - * - * Sendo assim, algumas configurações presentes no Monaco podem ser utilizadas aqui, como a escolha da liguagem - * (utilizando o highlight syntax específico), escolha do tema e opção de diff, além de ser muito similar ao Visual - * Studio Code, com autocomplete e fechamento automático de brackets. - * - * Este componente pode ser usado em qualquer situação que necessite de adição de códigos, como por exemplo, criar - * receitas utilizando Terraform para gerenciar topologias. - * É importante ressaltar que este não é um componente para edição de textos comuns. - * - * O [(ngModel)] deve ser usado para manipular o conteúdo do thf-code-editor, ou seja, tanto para incluir um conteúdo quanto - * para recuperar o conteúdo do thf-code-editor, utiliza-se uma variável passada por [(ngModel)]. - * - * Para utilização deste componente é preciso adicionar um asset ao arquivo .angular-cli.json, conforme exemplo abaixo: - * - *
    - * "assets": [
    - *    { "glob": "∗∗/∗", "input": "../node_modules/monaco-editor/min", "output": "./assets/monaco/" }
    - *  ]
    - * 
    - * - * @abstract - */ -var ThfCodeEditorBaseComponent = /** @class */ (function () { - function ThfCodeEditorBaseComponent() { - this._height = 150; - this._language = 'plainText'; - this._readonly = false; - this._showDiff = false; - this._theme = THF_CODE_EDITOR_THEME_DEFAULT; - this.modifiedValue = ''; - this.value = ''; - this.onTouched = function (value) { }; - this.onChangePropagate = function (value) { }; - } - Object.defineProperty(ThfCodeEditorBaseComponent.prototype, "language", { - get: /** - * @return {?} - */ - function () { - return this._language; - }, - set: /** - * \@optional - * - * \@description - * - * Linguagem na qual será apresentado o código fonte. - * Para saber quais são as linguagens compatíveis, consulte a documentação oficial do - * [**Monaco Editor**](https://microsoft.github.io/monaco-editor/) - * - * \@default `plainText` - * - * @param {?} language - * @return {?} - */ - function (language) { - this._language = language && language.length ? language.trim() : 'plainText'; - if (this.editor && this._language) { - this.setLanguage(this._language); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfCodeEditorBaseComponent.prototype, "readonly", { - get: /** - * @return {?} - */ - function () { - return this._readonly; - }, - set: /** - * \@optional - * - * \@description - * - * Indica se o editor será aberto em modo de leitura. - * - * Neste caso, não é possível editar o código inserido. - * - * Obs: Esta propriedade não refletirá efeito se alterada após o carregamento do componente. - * - * \@default `false` - * - * @param {?} readonly - * @return {?} - */ - function (readonly) { - this._readonly = /** @type {?} */ (readonly) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(readonly); - if (this.editor) { - this.setReadOnly(readonly); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfCodeEditorBaseComponent.prototype, "showDiff", { - get: /** - * @return {?} - */ - function () { - return this._showDiff; - }, - set: /** - * \@optional - * - * \@description - * - * Indica se o editor será aberto em modo de comparação. - * - * Caso esteja habilitada esta opção, então o [(ngModel)] deverá ser passado como um array, cuja primeira opção deve - * conter uma string com o código original e na segunda posição uma string código modificado para efeito de - * comparação. Neste caso, o usuário conseguirá editar apenas o código modificado e isso refletirá na segunda posição - * do array consequentemente. - * - * Obs: Esta propriedade não refletirá efeito se alterada após o carregamento do componente. - * - * \@default `false` - * - * @param {?} showDiff - * @return {?} - */ - function (showDiff) { - this._showDiff = /** @type {?} */ (showDiff) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(showDiff); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfCodeEditorBaseComponent.prototype, "theme", { - get: /** - * @return {?} - */ - function () { - return this._theme; - }, - set: /** - * \@optional - * - * \@description - * - * Define um tema para o editor. - * - * Temas válidos: - * - `vs-dark` - * - `vs` - * - `hc-black` - * - * É importante salientar que o tema será aplicados a todos os componentes thf-code-editor existentes na tela, - * ou seja, todas as instâncias do componente receberão o último tema atribuído ou o tema da última instância - * criada. - * - * \@default `vs` - * - * @param {?} theme - * @return {?} - */ - function (theme) { - this._theme = THF_CODE_EDITOR_THEMES.includes(theme) ? theme : THF_CODE_EDITOR_THEME_DEFAULT; - if (this.editor) { - this.setTheme(theme); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfCodeEditorBaseComponent.prototype, "height", { - get: /** - * @return {?} - */ - function () { - return this._height + "px"; - }, - set: /** - * \@optional - * - * \@description - * - * Define a altura do componente em pixels do thf-code-editor. - * Esta propriedade não poderá ser alterada após o componente ter sido iniciado. - * A altura mínima é 150 pixels. - * @param {?} height - * @return {?} - */ - function (height) { - this._height = parseFloat(height) >= 150 ? parseFloat(height) : 150; - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfCodeEditorBaseComponent.prototype.getOptions = /** - * @return {?} - */ - function () { - return { language: this.language, theme: this.theme, readOnly: this.readonly }; - }; - /** - * @param {?} fn - * @return {?} - */ - ThfCodeEditorBaseComponent.prototype.registerOnChange = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.onChangePropagate = fn; - }; - /** - * @param {?} fn - * @return {?} - */ - ThfCodeEditorBaseComponent.prototype.registerOnTouched = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.onTouched = fn; - }; - ThfCodeEditorBaseComponent.propDecorators = { - "language": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-language',] },], - "readonly": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-readonly',] },], - "showDiff": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-show-diff',] },], - "theme": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-theme',] },], - "height": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-height',] },], - }; - return ThfCodeEditorBaseComponent; -}()); - -function ThfCodeEditorBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfCodeEditorBaseComponent.propDecorators; - /** @type {?} */ - ThfCodeEditorBaseComponent.prototype._height; - /** @type {?} */ - ThfCodeEditorBaseComponent.prototype._language; - /** @type {?} */ - ThfCodeEditorBaseComponent.prototype._readonly; - /** @type {?} */ - ThfCodeEditorBaseComponent.prototype._showDiff; - /** @type {?} */ - ThfCodeEditorBaseComponent.prototype._theme; - /** @type {?} */ - ThfCodeEditorBaseComponent.prototype.editor; - /** @type {?} */ - ThfCodeEditorBaseComponent.prototype.modifiedValue; - /** @type {?} */ - ThfCodeEditorBaseComponent.prototype.value; - /** @type {?} */ - ThfCodeEditorBaseComponent.prototype.onTouched; - /** @type {?} */ - ThfCodeEditorBaseComponent.prototype.onChangePropagate; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfCodeEditorBaseComponent.prototype.writeValue = function (value) { }; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfCodeEditorBaseComponent.prototype.setLanguage = function (value) { }; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfCodeEditorBaseComponent.prototype.setTheme = function (value) { }; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfCodeEditorBaseComponent.prototype.setReadOnly = function (value) { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-code-editor/thf-code-editor.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfCodeEditorComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_code_editor_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-code-editor/thf-code-editor-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -var /** @type {?} */ loadedMonaco = false; -var /** @type {?} */ loadPromise; -/** - * \@docsExtends ThfCodeEditorBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfCodeEditorComponent = /** @class */ (function (_super) { - __extends(ThfCodeEditorComponent, _super); - function ThfCodeEditorComponent(zone, el) { - var _this = _super.call(this) || this; - _this.zone = zone; - _this.el = el; - _this.canLoad = false; - return _this; - } - /** - * @return {?} - */ - ThfCodeEditorComponent.prototype.ngAfterViewInit = /** - * @return {?} - */ - function () { - var _this = this; - if (loadedMonaco) { - loadPromise.then(function () { - setTimeout(function () { - if (_this.el.nativeElement.offsetWidth) { - _this.initMonaco(_this.getOptions()); - } - else { - _this.canLoad = true; - } - }); - }); - } - else { - loadedMonaco = true; - loadPromise = new Promise(function (resolve) { - var /** @type {?} */ onGotAmdLoader = function () { - (/** @type {?} */ (window)).require.config({ paths: { 'vs': '/assets/monaco/vs' } }); - (/** @type {?} */ (window)).require(['vs/editor/editor.main'], function () { - setTimeout(function () { - if (_this.el.nativeElement.offsetWidth) { - _this.initMonaco(_this.getOptions()); - } - else { - _this.canLoad = true; - } - resolve(); - }); - }); - }; - if (!(/** @type {?} */ (window)).require) { - var /** @type {?} */ loaderScript = document.createElement('script'); - loaderScript.type = 'text/javascript'; - loaderScript.src = '/assets/monaco/vs/loader.js'; - loaderScript.addEventListener('load', onGotAmdLoader); - document.body.appendChild(loaderScript); - } - }); - } - }; - /** - * @return {?} - */ - ThfCodeEditorComponent.prototype.ngDoCheck = /** - * @return {?} - */ - function () { - if (this.canLoad && this.el.nativeElement.offsetWidth) { - this.initMonaco(this.getOptions()); - this.canLoad = false; - } - }; - /** - * @param {?} language - * @return {?} - */ - ThfCodeEditorComponent.prototype.setLanguage = /** - * @param {?} language - * @return {?} - */ - function (language) { - if (this.showDiff) { - this.setMonacoLanguage(this.editor.getModel().original, language); - this.setMonacoLanguage(this.editor.getModel().modified, language); - } - else { - this.setMonacoLanguage(this.editor.getModel(), language); - } - }; - /** - * @param {?} theme - * @return {?} - */ - ThfCodeEditorComponent.prototype.setTheme = /** - * @param {?} theme - * @return {?} - */ - function (theme) { - monaco.editor.setTheme(theme); - }; - /** - * @param {?} readOnly - * @return {?} - */ - ThfCodeEditorComponent.prototype.setReadOnly = /** - * @param {?} readOnly - * @return {?} - */ - function (readOnly) { - this.editor.updateOptions({ readOnly: readOnly }); - }; - /** - * @param {?} value - * @return {?} - */ - ThfCodeEditorComponent.prototype.writeValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - var _this = this; - this.value = value && value instanceof Array ? value[0] : value; - this.modifiedValue = value && value instanceof Array && value.length > 0 ? value[1] : ''; - setTimeout(function () { - if (_this.editor) { - _this.editor.setValue(_this.value); - } - }); - }; - /** - * @param {?} options - * @return {?} - */ - ThfCodeEditorComponent.prototype.initMonaco = /** - * @param {?} options - * @return {?} - */ - function (options) { - var _this = this; - if (this.showDiff) { - this.editor = monaco.editor.createDiffEditor(this.editorContainer.nativeElement, options); - this.editor.setModel({ - original: monaco.editor.createModel(this.value), - modified: monaco.editor.createModel(this.modifiedValue) - }); - this.editor.onDidUpdateDiff(function (e) { - var /** @type {?} */ original = _this.editor.getModel().original.getValue(); - var /** @type {?} */ modified = _this.editor.getModel().modified.getValue(); - _this.onChangePropagate([original, modified]); - }); - } - else { - this.editor = monaco.editor.create(this.editorContainer.nativeElement, options); - this.editor.setValue(this.value); - this.editor.onDidChangeModelContent(function (e) { - var /** @type {?} */ value = _this.editor.getValue(); - _this.onChangePropagate(value); - _this.zone.run(function () { return _this.value = value; }); - }); - } - }; - /** - * @param {?} model - * @param {?} language - * @return {?} - */ - ThfCodeEditorComponent.prototype.setMonacoLanguage = /** - * @param {?} model - * @param {?} language - * @return {?} - */ - function (model, language) { - monaco.editor.setModelLanguage(model, language); - }; - ThfCodeEditorComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-code-editor', template: "
    ", - providers: [{ - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["f" /* NG_VALUE_ACCESSOR */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfCodeEditorComponent; }), - multi: true - }] - },] }, - ]; - /** @nocollapse */ - ThfCodeEditorComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["O" /* NgZone */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - ThfCodeEditorComponent.propDecorators = { - "editorContainer": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['editorContainer',] },], - }; - return ThfCodeEditorComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_code_editor_base_component__["a" /* ThfCodeEditorBaseComponent */])); - -function ThfCodeEditorComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfCodeEditorComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfCodeEditorComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfCodeEditorComponent.propDecorators; - /** @type {?} */ - ThfCodeEditorComponent.prototype.canLoad; - /** @type {?} */ - ThfCodeEditorComponent.prototype.editorContainer; - /** @type {?} */ - ThfCodeEditorComponent.prototype.zone; - /** @type {?} */ - ThfCodeEditorComponent.prototype.el; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-code-editor/thf-code-editor.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfCodeEditorModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_code_editor_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-code-editor/thf-code-editor.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * Módulo do componente thf-code-editor. - */ -var ThfCodeEditorModule = /** @class */ (function () { - function ThfCodeEditorModule() { - } - ThfCodeEditorModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [__WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */]], - declarations: [__WEBPACK_IMPORTED_MODULE_2__thf_code_editor_component__["a" /* ThfCodeEditorComponent */]], - exports: [__WEBPACK_IMPORTED_MODULE_2__thf_code_editor_component__["a" /* ThfCodeEditorComponent */]] - },] }, - ]; - /** @nocollapse */ - ThfCodeEditorModule.ctorParameters = function () { return []; }; - return ThfCodeEditorModule; -}()); - -function ThfCodeEditorModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfCodeEditorModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfCodeEditorModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-disclaimer-group/thf-disclaimer-group-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDisclaimerGroupBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_uuid__ = __webpack_require__("../../../../uuid/index.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_uuid___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_uuid__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsPrivate - * - * \@description - * - * O componente thf-disclaimer-group é responsável por representar grupos de tags que podem ser removidas pelo usuário. - * Seu uso é recomendado para visualizar os filtros escolhidos em uma pesquisa como por exemplo, na busca do thf-page-list. - * - */ -var ThfDisclaimerGroupBaseComponent = /** @class */ (function () { - function ThfDisclaimerGroupBaseComponent() { - this._hideRemoveAll = false; - this._disclaimers = []; - /** - * Toda vez que a lista de disclaimer é alterada esta função é disparada e retorna a nova lista. - */ - this.change = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - Object.defineProperty(ThfDisclaimerGroupBaseComponent.prototype, "hideRemoveAll", { - get: /** - * @return {?} - */ - function () { - return this._hideRemoveAll; - }, - set: /** - * \@description - * - * Esta propriedade esconde o botão que remove todos os disclaimers do grupo. - * - * \@optional - * - * \@default false - * @param {?} value - * @return {?} - */ - function (value) { - this._hideRemoveAll = /** @type {?} */ (value) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(value); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfDisclaimerGroupBaseComponent.prototype, "disclaimers", { - get: /** - * @return {?} - */ - function () { - return this._disclaimers; - }, - set: /** - * Lista para o grupo de disclaimers. - * @param {?} value - * @return {?} - */ - function (value) { - value.forEach(function (disclaimer) { - disclaimer['$id'] = Object(__WEBPACK_IMPORTED_MODULE_1_uuid__["v4"])(); - }); - this._disclaimers = value; - }, - enumerable: true, - configurable: true - }); - // Verifica se o botão para remover todos será exibido. - /** - * @return {?} - */ - ThfDisclaimerGroupBaseComponent.prototype.isRemoveAll = /** - * @return {?} - */ - function () { - return !this.hideRemoveAll && this.disclaimers.filter(function (c) { return !c.hideClose; }).length > 1; - }; - // Remove todos os disclaimers. - /** - * @return {?} - */ - ThfDisclaimerGroupBaseComponent.prototype.removeAllItems = /** - * @return {?} - */ - function () { - var _this = this; - var /** @type {?} */ removeItems = []; - this.disclaimers.forEach(function (disclaimer) { - if (!disclaimer.hideClose) { - removeItems.push(disclaimer); - } - }); - removeItems.forEach(function (d) { return _this.closeItem(d); }); - }; - // Fecha/remove um disclaimer. - /** - * @param {?} disclaimer - * @return {?} - */ - ThfDisclaimerGroupBaseComponent.prototype.closeItem = /** - * @param {?} disclaimer - * @return {?} - */ - function (disclaimer) { - var /** @type {?} */ itemIndex = this.disclaimers.findIndex(function (d) { return d['$id'] === disclaimer['$id']; }); - this.disclaimers.splice(itemIndex, 1); - }; - ThfDisclaimerGroupBaseComponent.propDecorators = { - "title": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-title',] },], - "hideRemoveAll": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-hide-remove-all',] },], - "disclaimers": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disclaimers',] },], - "change": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change',] },], - }; - return ThfDisclaimerGroupBaseComponent; -}()); - -function ThfDisclaimerGroupBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfDisclaimerGroupBaseComponent.propDecorators; - /** @type {?} */ - ThfDisclaimerGroupBaseComponent.prototype._hideRemoveAll; - /** @type {?} */ - ThfDisclaimerGroupBaseComponent.prototype._disclaimers; - /** - * Texto para título do grupo de disclaimers. - * @type {?} - */ - ThfDisclaimerGroupBaseComponent.prototype.title; - /** - * Toda vez que a lista de disclaimer é alterada esta função é disparada e retorna a nova lista. - * @type {?} - */ - ThfDisclaimerGroupBaseComponent.prototype.change; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-disclaimer-group/thf-disclaimer-group.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDisclaimerGroupComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_uuid__ = __webpack_require__("../../../../uuid/index.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_uuid___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_uuid__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_disclaimer_group_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-disclaimer-group/thf-disclaimer-group-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsPrivate - * - * \@docsExtends ThfDisclaimerGroupBaseComponent - * - * \@examplePrivate - * - * - * - * - * - */ -var ThfDisclaimerGroupComponent = /** @class */ (function (_super) { - __extends(ThfDisclaimerGroupComponent, _super); - function ThfDisclaimerGroupComponent(differs) { - var _this = _super.call(this) || this; - _this.differ = differs.find([]).create(null); - return _this; - } - /** - * @return {?} - */ - ThfDisclaimerGroupComponent.prototype.ngDoCheck = /** - * @return {?} - */ - function () { - var /** @type {?} */ change = this.differ.diff(this.disclaimers); - if (change) { - var /** @type {?} */ itemsWithoutId = this.disclaimers.filter(function (item) { return !item['$id']; }); - itemsWithoutId.forEach(function (item) { return item['$id'] = Object(__WEBPACK_IMPORTED_MODULE_1_uuid__["v4"])(); }); - this.change.emit(this.disclaimers); - } - }; - ThfDisclaimerGroupComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-disclaimer-group', template: "
    0\" >
    {{ title }}
    " - },] }, - ]; - /** @nocollapse */ - ThfDisclaimerGroupComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["F" /* IterableDiffers */], }, - ]; }; - return ThfDisclaimerGroupComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_disclaimer_group_base_component__["a" /* ThfDisclaimerGroupBaseComponent */])); - -function ThfDisclaimerGroupComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDisclaimerGroupComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDisclaimerGroupComponent.ctorParameters; - /** @type {?} */ - ThfDisclaimerGroupComponent.prototype.differ; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-disclaimer-group/thf-disclaimer-group.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDisclaimerGroupModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_disclaimer_thf_disclaimer_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-disclaimer/thf-disclaimer.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_disclaimer_group_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-disclaimer-group/thf-disclaimer-group.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_disclaimer_remove_thf_disclaimer_remove_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-disclaimer-group/thf-disclaimer-remove/thf-disclaimer-remove.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - -/** - * \@description - * - * Módulo do componente thf-disclaimer-group. - */ -var ThfDisclaimerGroupModule = /** @class */ (function () { - function ThfDisclaimerGroupModule() { - } - ThfDisclaimerGroupModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */], - __WEBPACK_IMPORTED_MODULE_2__thf_disclaimer_thf_disclaimer_module__["a" /* ThfDisclaimerModule */] - ], - declarations: [__WEBPACK_IMPORTED_MODULE_3__thf_disclaimer_group_component__["a" /* ThfDisclaimerGroupComponent */], __WEBPACK_IMPORTED_MODULE_4__thf_disclaimer_remove_thf_disclaimer_remove_component__["a" /* ThfDisclaimerRemoveComponent */]], - exports: [__WEBPACK_IMPORTED_MODULE_3__thf_disclaimer_group_component__["a" /* ThfDisclaimerGroupComponent */]] - },] }, - ]; - /** @nocollapse */ - ThfDisclaimerGroupModule.ctorParameters = function () { return []; }; - return ThfDisclaimerGroupModule; -}()); - -function ThfDisclaimerGroupModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDisclaimerGroupModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDisclaimerGroupModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-disclaimer-group/thf-disclaimer-remove/thf-disclaimer-remove.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDisclaimerRemoveComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * Este é um componente interno utilizado pelo thf-disclaimer-group, se comporta como um botão e recebe uma ação para remover todos os - * thf-disclaimers do grupo. - */ -var ThfDisclaimerRemoveComponent = /** @class */ (function () { - function ThfDisclaimerRemoveComponent() { - /** - * Ação para remover todos. - */ - this.removeAllAction = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - // Emite a ação de remover todos. - /** - * @return {?} - */ - ThfDisclaimerRemoveComponent.prototype.removeAction = /** - * @return {?} - */ - function () { - this.removeAllAction.emit(); - }; - ThfDisclaimerRemoveComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-disclaimer-remove', template: " " - },] }, - ]; - /** @nocollapse */ - ThfDisclaimerRemoveComponent.ctorParameters = function () { return []; }; - ThfDisclaimerRemoveComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "removeAllAction": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-remove-all-action',] },], - }; - return ThfDisclaimerRemoveComponent; -}()); - -function ThfDisclaimerRemoveComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDisclaimerRemoveComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDisclaimerRemoveComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfDisclaimerRemoveComponent.propDecorators; - /** - * Texto exibido. - * @type {?} - */ - ThfDisclaimerRemoveComponent.prototype.label; - /** - * Ação para remover todos. - * @type {?} - */ - ThfDisclaimerRemoveComponent.prototype.removeAllAction; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-disclaimer/thf-disclaimer-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDisclaimerBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -var /** @type {?} */ THF_DISCLAIMER_TYPES = ['default', 'danger']; -var /** @type {?} */ THF_DISCLAIMER_DEFAULT_TYPE = 'default'; -/** - * \@docsPrivate - * - * \@description - * - * O componente thf-disclaimer é responsável por representar tags. - * Seu uso é recomendado em buscas e em campos onde é necessário representar objetos selecionados, - * como por exemplo, no thf-multi-select. - * - */ -var ThfDisclaimerBaseComponent = /** @class */ (function () { - function ThfDisclaimerBaseComponent() { - this._type = 'default'; - this._hideClose = false; - this.showDisclaimer = true; - /** - * Evento disparado ao fechar o disclaimer. - * Para este evento será passado como parâmetro um objeto com value, label e property. - */ - this.closeAction = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - Object.defineProperty(ThfDisclaimerBaseComponent.prototype, "hideClose", { - get: /** - * @return {?} - */ - function () { - return this._hideClose; - }, - set: /** - * \@description - * - * Esta propriedade esconde o botão para fechamento do thf-disclaimer, ao utilizar esta propriedade - * sem passar valor a mesma é setada como false, onde o botão de fechamento está visível. - * - * \@default false - * @param {?} value - * @return {?} - */ - function (value) { - this._hideClose = /** @type {?} */ (value) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(value); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfDisclaimerBaseComponent.prototype, "type", { - get: /** - * @return {?} - */ - function () { - return this._type; - }, - set: /** - * \@description - * - * Tipo do thf-disclaimer. Pode ser 'default' ou 'danger'. - * - * \@default default - * \@optional - * @param {?} type - * @return {?} - */ - function (type) { - this._type = THF_DISCLAIMER_TYPES.includes(type) ? type : THF_DISCLAIMER_DEFAULT_TYPE; - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfDisclaimerBaseComponent.prototype.close = /** - * @return {?} - */ - function () { - this.showDisclaimer = false; - this.closeAction.emit({ value: this.value, label: this.label, property: this.property }); - }; - /** - * @return {?} - */ - ThfDisclaimerBaseComponent.prototype.getLabel = /** - * @return {?} - */ - function () { - return this.label ? this.label : this.value; - }; - ThfDisclaimerBaseComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "value": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-value',] },], - "property": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-property',] },], - "hideClose": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-hide-close',] },], - "closeAction": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-close-action',] },], - "type": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-type',] },], - }; - return ThfDisclaimerBaseComponent; -}()); - -function ThfDisclaimerBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfDisclaimerBaseComponent.propDecorators; - /** @type {?} */ - ThfDisclaimerBaseComponent.prototype._type; - /** @type {?} */ - ThfDisclaimerBaseComponent.prototype._hideClose; - /** @type {?} */ - ThfDisclaimerBaseComponent.prototype.showDisclaimer; - /** - * Label que aparecerá dentro do thf-disclaimer. - * Quando não for definido um label será apresentada a propriedade t-value. - * @type {?} - */ - ThfDisclaimerBaseComponent.prototype.label; - /** - * Valor do thf-disclaimer. - * @type {?} - */ - ThfDisclaimerBaseComponent.prototype.value; - /** - * Nome da propriedade vinculada à este thf-disclaimer. - * @type {?} - */ - ThfDisclaimerBaseComponent.prototype.property; - /** - * Evento disparado ao fechar o disclaimer. - * Para este evento será passado como parâmetro um objeto com value, label e property. - * @type {?} - */ - ThfDisclaimerBaseComponent.prototype.closeAction; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-disclaimer/thf-disclaimer.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDisclaimerComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_disclaimer_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-disclaimer/thf-disclaimer-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsPrivate - * - * \@docsExtends ThfDisclaimerBaseComponent - * - * \@examplePrivate - * - * - * - * - * - */ -var ThfDisclaimerComponent = /** @class */ (function (_super) { - __extends(ThfDisclaimerComponent, _super); - function ThfDisclaimerComponent() { - return _super !== null && _super.apply(this, arguments) || this; - } - ThfDisclaimerComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-disclaimer', template: "
    {{ getLabel() }}
    " - },] }, - ]; - /** @nocollapse */ - ThfDisclaimerComponent.ctorParameters = function () { return []; }; - return ThfDisclaimerComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_disclaimer_base_component__["a" /* ThfDisclaimerBaseComponent */])); - -function ThfDisclaimerComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDisclaimerComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDisclaimerComponent.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-disclaimer/thf-disclaimer.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDisclaimerModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_disclaimer_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-disclaimer/thf-disclaimer.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * Módulo do componente thf-disclaimer. - */ -var ThfDisclaimerModule = /** @class */ (function () { - function ThfDisclaimerModule() { - } - ThfDisclaimerModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */] - ], - declarations: [__WEBPACK_IMPORTED_MODULE_2__thf_disclaimer_component__["a" /* ThfDisclaimerComponent */]], - exports: [__WEBPACK_IMPORTED_MODULE_2__thf_disclaimer_component__["a" /* ThfDisclaimerComponent */]] - },] }, - ]; - /** @nocollapse */ - ThfDisclaimerModule.ctorParameters = function () { return []; }; - return ThfDisclaimerModule; -}()); - -function ThfDisclaimerModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDisclaimerModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDisclaimerModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-dropdown/thf-dropdown.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDropdownComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@description - * - * O componente `thf-dropdown` pode ser utilizado como um agrupador de ações e / ou opções. - * - * > Caso não haja configuração de rotas em sua aplicação, se faz necessário importar o `RouterModule` - * no módulo principal para o correto funcionamento deste componente: - * - * ``` - * import { RouterModule } from '\@angular/router'; - * - * \@NgModule({ - * imports: [ - * ... - * RouterModule.forRoot([]), - * ThfModule - * ], - * declarations: [ - * AppComponent - * ], - * exports: [], - * providers: [], - * bootstrap: [ - * AppComponent - * ] - * }) - * export class AppModule { } - * ``` - * > Para maiores dúvidas referente à configuração de rotas, acesse em nosso portal /Guias /Começando - * [/Configurando as rotas do thf-menu](/guides/getting-started). - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfDropdownComponent = /** @class */ (function () { - function ThfDropdownComponent(_element, _view, _router) { - this._element = _element; - this._router = _router; - this._open = false; - this.icon = 'thf-icon-arrow-down'; - this._parentRef = _view['_view']['component']; - this._addListenerCloseDropdown(); - } - /** - * @return {?} - */ - ThfDropdownComponent.prototype.toggleButton = /** - * @return {?} - */ - function () { - this.icon = this._open ? 'thf-icon-arrow-down' : 'thf-icon-arrow-up'; - if (this.actions && this.actions.length) { - this._selector('.dropdown').classList.toggle('t-show'); - } - this._open = !this._open; - }; - /** - * @param {?} item - * @return {?} - */ - ThfDropdownComponent.prototype.onClick = /** - * @param {?} item - * @return {?} - */ - function (item) { - if (item.url) { - var /** @type {?} */ url = item.url, /** @type {?} */ - regexUrl = /(http(s?))\:\/\//gi; - if (regexUrl.test(url)) { - window.open(url, '_blank'); - } - else { - this._router.navigate([url]); - } - } - else if (item.action) { - this._callAction(item.action); - } - }; - /** - * @return {?} - */ - ThfDropdownComponent.prototype._addListenerCloseDropdown = /** - * @return {?} - */ - function () { - var /** @type {?} */ _this = this; - window.onclick = function (event) { - var /** @type {?} */ value = event.target && event.target.getAttribute('class'); - if (value !== 'button-dropdown' && _this._open) { - _this.toggleButton(); - } - }; - }; - /** - * @param {?} _function - * @return {?} - */ - ThfDropdownComponent.prototype._callAction = /** - * @param {?} _function - * @return {?} - */ - function (_function) { - this._callActionOfContext(_function, this._parentRef); - }; - /** - * @param {?} _function - * @param {?} _context - * @return {?} - */ - ThfDropdownComponent.prototype._callActionOfContext = /** - * @param {?} _function - * @param {?} _context - * @return {?} - */ - function (_function, _context) { - if (this._isTypeof(_function, 'function')) { - _function.call(_context); - } - else { - _context[_function](); - } - }; - /** - * @param {?} query - * @return {?} - */ - ThfDropdownComponent.prototype._selector = /** - * @param {?} query - * @return {?} - */ - function (query) { - return this._element.nativeElement.querySelector(query); - }; - /** - * @param {?} object - * @param {?} type - * @return {?} - */ - ThfDropdownComponent.prototype._isTypeof = /** - * @param {?} object - * @param {?} type - * @return {?} - */ - function (object, type) { - return typeof object === type; - }; - ThfDropdownComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-dropdown', template: " " - },] }, - ]; - /** @nocollapse */ - ThfDropdownComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_1__angular_router__["b" /* Router */], }, - ]; }; - ThfDropdownComponent.propDecorators = { - "disabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled',] },], - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "actions": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-actions',] },], - }; - return ThfDropdownComponent; -}()); - -function ThfDropdownComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDropdownComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDropdownComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfDropdownComponent.propDecorators; - /** @type {?} */ - ThfDropdownComponent.prototype._open; - /** @type {?} */ - ThfDropdownComponent.prototype._parentRef; - /** @type {?} */ - ThfDropdownComponent.prototype.icon; - /** - * Desabilita o dropdown na página. - * @type {?} - */ - ThfDropdownComponent.prototype.disabled; - /** - * Adiciona a label no dropdown - * @type {?} - */ - ThfDropdownComponent.prototype.label; - /** - * Nesta propriedade deve ser definido um array de objetos que implementam a interface `ThfDropdownAction`. - * @type {?} - */ - ThfDropdownComponent.prototype.actions; - /** @type {?} */ - ThfDropdownComponent.prototype._element; - /** @type {?} */ - ThfDropdownComponent.prototype._router; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-dropdown/thf-dropdown.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDropdownModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_dropdown_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-dropdown/thf-dropdown.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * Módulo do componente thf-dropdown. - */ -var ThfDropdownModule = /** @class */ (function () { - function ThfDropdownModule() { - } - ThfDropdownModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_0__angular_common__["b" /* CommonModule */] - ], - declarations: [__WEBPACK_IMPORTED_MODULE_2__thf_dropdown_component__["a" /* ThfDropdownComponent */]], - exports: [__WEBPACK_IMPORTED_MODULE_2__thf_dropdown_component__["a" /* ThfDropdownComponent */]] - },] }, - ]; - /** @nocollapse */ - ThfDropdownModule.ctorParameters = function () { return []; }; - return ThfDropdownModule; -}()); - -function ThfDropdownModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDropdownModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDropdownModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDynamicFormBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_dynamic_form_field_type_enum__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form-field-type.enum.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsPrivate - * - * \@description - * - * Componente para criação de formulários dinâmicos a partir de uma lista de objetos. - * Componente de uso interno. - */ -var ThfDynamicFormBaseComponent = /** @class */ (function () { - function ThfDynamicFormBaseComponent(fb) { - this.fb = fb; - /** - * Coleção de objetos que implementam a interface ThfDynamicFormField, para definição dos campos que serão criados - * dinamicamente. - */ - this._fields = []; - } - Object.defineProperty(ThfDynamicFormBaseComponent.prototype, "fields", { - get: /** - * @return {?} - */ - function () { - return this._fields; - }, - set: /** - * @param {?} fields - * @return {?} - */ - function (fields) { - var _this = this; - fields.forEach(function (field) { - if (_this.existsProperty(_this._fields, field.property)) { - _this.printError('"thf-dynamic-form" O property "' + field.property + '" está duplicado. Interface: ThfDynamicFormField.'); - return; - } - if (!field['property']) { - _this.printError('"thf-dynamic-form" É obrigatório ser especificado um property.'); - return; - } - if ((!field['type'] && field['type'] !== 0) || field['type'] > (Object.keys(__WEBPACK_IMPORTED_MODULE_2__thf_dynamic_form_field_type_enum__["a" /* ThfDynamicFormFieldType */]).length / 2) - 1) { - _this.printError('"thf-dynamic-form" Type não encontrado no enum "ThfDynamicFormFieldType". Property: "' + field.property + '".'); - return; - } - _this._fields.push(field); - }); - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfDynamicFormBaseComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - if (!this.form) { - this.form = this.fb.group({}); - } - }; - /** - * @param {?} fields - * @param {?} property - * @return {?} - */ - ThfDynamicFormBaseComponent.prototype.existsProperty = /** - * @param {?} fields - * @param {?} property - * @return {?} - */ - function (fields, property) { - return fields.some(function (field) { - return field.property === property; - }); - }; - /** - * @param {?} error - * @return {?} - */ - ThfDynamicFormBaseComponent.prototype.printError = /** - * @param {?} error - * @return {?} - */ - function (error) { - console.error(error); - }; - ThfDynamicFormBaseComponent.propDecorators = { - "fields": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-fields',] },], - "form": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-form',] },], - }; - return ThfDynamicFormBaseComponent; -}()); - -function ThfDynamicFormBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfDynamicFormBaseComponent.propDecorators; - /** - * Coleção de objetos que implementam a interface ThfDynamicFormField, para definição dos campos que serão criados - * dinamicamente. - * @type {?} - */ - ThfDynamicFormBaseComponent.prototype._fields; - /** - * FormGroup que será usado para incluir os novos campos. - * Esta propriedade deve receber um form reativo vazio ou já contendo outros campos. - * @type {?} - */ - ThfDynamicFormBaseComponent.prototype.form; - /** @type {?} */ - ThfDynamicFormBaseComponent.prototype.fb; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form-field-type.enum.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDynamicFormFieldType; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** @enum {number} */ -var ThfDynamicFormFieldType = { - /** Referente ao thf-datepicker. */ - Datepicker: 0, - /** Referente ao thf-email. */ - Email: 1, - /** Referente ao thf-input. */ - Input: 2, - /** Referente ao thf-number. */ - Number: 3, - /** Referente ao thf-select. */ - Select: 4, - /** Referente ao thf-url. */ - Url: 5, -}; - -ThfDynamicFormFieldType[ThfDynamicFormFieldType.Datepicker] = "Datepicker"; -ThfDynamicFormFieldType[ThfDynamicFormFieldType.Email] = "Email"; -ThfDynamicFormFieldType[ThfDynamicFormFieldType.Input] = "Input"; -ThfDynamicFormFieldType[ThfDynamicFormFieldType.Number] = "Number"; -ThfDynamicFormFieldType[ThfDynamicFormFieldType.Select] = "Select"; -ThfDynamicFormFieldType[ThfDynamicFormFieldType.Url] = "Url"; - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form-field.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDynamicFormFieldComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_dynamic_form_field_type_enum__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form-field-type.enum.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -var ThfDynamicFormFieldComponent = /** @class */ (function () { - function ThfDynamicFormFieldComponent() { - this._size = 12; - this.required = false; - this.mask = ''; - } - Object.defineProperty(ThfDynamicFormFieldComponent.prototype, "size", { - get: /** - * @return {?} - */ - function () { - return this._size; - }, - set: /** - * @param {?} size - * @return {?} - */ - function (size) { - this._size = (!size || size < 1 || size > 12) ? 12 : size; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfDynamicFormFieldComponent.prototype, "type", { - get: /** - * @return {?} - */ - function () { - return this._type; - }, - set: /** - * @param {?} type - * @return {?} - */ - function (type) { - switch (type) { - case __WEBPACK_IMPORTED_MODULE_2__thf_dynamic_form_field_type_enum__["a" /* ThfDynamicFormFieldType */].Datepicker: - this._type = 'datepicker'; - break; - case __WEBPACK_IMPORTED_MODULE_2__thf_dynamic_form_field_type_enum__["a" /* ThfDynamicFormFieldType */].Email: - this._type = 'email'; - break; - case __WEBPACK_IMPORTED_MODULE_2__thf_dynamic_form_field_type_enum__["a" /* ThfDynamicFormFieldType */].Input: - this._type = 'input'; - break; - case __WEBPACK_IMPORTED_MODULE_2__thf_dynamic_form_field_type_enum__["a" /* ThfDynamicFormFieldType */].Number: - this._type = 'number'; - break; - case __WEBPACK_IMPORTED_MODULE_2__thf_dynamic_form_field_type_enum__["a" /* ThfDynamicFormFieldType */].Select: - this._type = 'select'; - break; - case __WEBPACK_IMPORTED_MODULE_2__thf_dynamic_form_field_type_enum__["a" /* ThfDynamicFormFieldType */].Url: - this._type = 'url'; - break; - } - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfDynamicFormFieldComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - if (!this.form) { - this.form = new __WEBPACK_IMPORTED_MODULE_1__angular_forms__["c" /* FormGroup */]({}); - } - }; - /** - * @param {?} type - * @param {?} compareTo - * @return {?} - */ - ThfDynamicFormFieldComponent.prototype.isType = /** - * @param {?} type - * @param {?} compareTo - * @return {?} - */ - function (type, compareTo) { - return type === compareTo; - }; - /** - * @return {?} - */ - ThfDynamicFormFieldComponent.prototype.getClasses = /** - * @return {?} - */ - function () { - return "thf-xs-12 thf-sm-12 thf-md-12 thf-lg-" + this.size + " thf-xl-" + this.size; - }; - ThfDynamicFormFieldComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-dynamic-form-field', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfDynamicFormFieldComponent.ctorParameters = function () { return []; }; - return ThfDynamicFormFieldComponent; -}()); - -function ThfDynamicFormFieldComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDynamicFormFieldComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDynamicFormFieldComponent.ctorParameters; - /** @type {?} */ - ThfDynamicFormFieldComponent.prototype._size; - /** @type {?} */ - ThfDynamicFormFieldComponent.prototype._type; - /** @type {?} */ - ThfDynamicFormFieldComponent.prototype.form; - /** @type {?} */ - ThfDynamicFormFieldComponent.prototype.controlName; - /** @type {?} */ - ThfDynamicFormFieldComponent.prototype.label; - /** @type {?} */ - ThfDynamicFormFieldComponent.prototype.required; - /** @type {?} */ - ThfDynamicFormFieldComponent.prototype.maxlength; - /** @type {?} */ - ThfDynamicFormFieldComponent.prototype.minlength; - /** @type {?} */ - ThfDynamicFormFieldComponent.prototype.dateStart; - /** @type {?} */ - ThfDynamicFormFieldComponent.prototype.dateEnd; - /** @type {?} */ - ThfDynamicFormFieldComponent.prototype.pattern; - /** @type {?} */ - ThfDynamicFormFieldComponent.prototype.mask; - /** @type {?} */ - ThfDynamicFormFieldComponent.prototype.options; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDynamicFormComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_dynamic_form_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_dynamic_form_field_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form-field.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsPrivate - * - * \@docsExtends ThfDynamicFormBaseComponent - */ -var ThfDynamicFormComponent = /** @class */ (function (_super) { - __extends(ThfDynamicFormComponent, _super); - function ThfDynamicFormComponent(resolver, fb) { - var _this = _super.call(this, fb) || this; - _this.resolver = resolver; - return _this; - } - /** - * @return {?} - */ - ThfDynamicFormComponent.prototype.ngAfterContentInit = /** - * @return {?} - */ - function () { - var _this = this; - var /** @type {?} */ ComponentFactory = this.resolver.resolveComponentFactory(__WEBPACK_IMPORTED_MODULE_3__thf_dynamic_form_field_component__["a" /* ThfDynamicFormFieldComponent */]); - this.fields.forEach(function (field) { - // Adiciona o campo ao FormGroup e adiciona o valor inicial ao campo - // Adiciona o campo ao FormGroup e adiciona o valor inicial ao campo - _this.form.addControl(field.property, new __WEBPACK_IMPORTED_MODULE_1__angular_forms__["b" /* FormControl */](field.value)); - var /** @type {?} */ component = _this.container.createComponent(ComponentFactory); - component.instance.required = (field.required === true); - component.instance.controlName = field.property; - component.instance.size = field.size; - component.instance.label = field.label; - component.instance.type = field.type; - component.instance.dateEnd = field.dateEnd; - component.instance.dateStart = field.dateStart; - component.instance.options = field.options; - component.instance.form = _this.form; - }); - }; - ThfDynamicFormComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-dynamic-form', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfDynamicFormComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["p" /* ComponentFactoryResolver */], }, - { type: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["a" /* FormBuilder */], }, - ]; }; - ThfDynamicFormComponent.propDecorators = { - "container": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['container', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */] },] },], - }; - return ThfDynamicFormComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_dynamic_form_base_component__["a" /* ThfDynamicFormBaseComponent */])); - -function ThfDynamicFormComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDynamicFormComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDynamicFormComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfDynamicFormComponent.propDecorators; - /** @type {?} */ - ThfDynamicFormComponent.prototype.container; - /** @type {?} */ - ThfDynamicFormComponent.prototype.resolver; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDynamicFormModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_dynamic_form_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_dynamic_form_field_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form-field.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__thf_field_thf_field_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-field.module.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - -/** - * \@description - * Módulo do componente thf-dynamic-form - */ -var ThfDynamicFormModule = /** @class */ (function () { - function ThfDynamicFormModule() { - } - ThfDynamicFormModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_forms__["h" /* ReactiveFormsModule */], - __WEBPACK_IMPORTED_MODULE_5__thf_field_thf_field_module__["a" /* ThfFieldModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_3__thf_dynamic_form_component__["a" /* ThfDynamicFormComponent */], - __WEBPACK_IMPORTED_MODULE_4__thf_dynamic_form_field_component__["a" /* ThfDynamicFormFieldComponent */] - ], - entryComponents: [ - __WEBPACK_IMPORTED_MODULE_4__thf_dynamic_form_field_component__["a" /* ThfDynamicFormFieldComponent */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_3__thf_dynamic_form_component__["a" /* ThfDynamicFormComponent */] - ], - providers: [] - },] }, - ]; - /** @nocollapse */ - ThfDynamicFormModule.ctorParameters = function () { return []; }; - return ThfDynamicFormModule; -}()); - -function ThfDynamicFormModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDynamicFormModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDynamicFormModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-checkbox-group/thf-checkbox-group-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfCheckboxGroupBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * - * O componente `thf-checkbox-group` exibe uma lista de múltipla escolha onde o usuário pode marcar e desmarcar várias opções. - * - * > Para seleção única, utilize o [**Totvs Radio Group**](/documentation/thf-radio-group). - * - * Por padrão, o thf-checkbox-group retorna um array com os valores dos itens selecionados para o model. - * - * ``` - * favorites = ['THF', 'Angular']; - * ``` - * - * Na maioria das situações, o array com os objetos setados já atende as necessidades mas, caso o desenvolvedor - * tenha necessidade de usar um valor indeterminado (`null`), ou seja, nem marcado (`true`) e nem desmarcado (`false`), - * deve setar a propriedade `t-indeterminate` como `true`. - * - * Nesse caso, o thf-checkbox-group vai retornar um objeto com todas as opções disponíveis e seus valores. - * - * ``` - * favorites = { - * THF: true, - * Angular: true, - * VueJS: false, - * React: null // indeterminado - * }; - * ``` - * - * Importante: - * - Caso o thf-checkbox-group não esteja dentro de um form, é preciso adicionar `ngDefaultControl` ao componente. - */ -var ThfCheckboxGroupBaseComponent = /** @class */ (function () { - function ThfCheckboxGroupBaseComponent(ngControl) { - /** - * Indica que o campo será obrigatório - */ - this.required = false; - /** - * Caso exista a necessidade de usar o valor indeterminado (`null`) dentro da lista de opções, é necessário setar - * a propriedade `t-indeterminate` como `true`, por padrão essa propriedade vem desabilitada (`false`). - * - * Quando essa propriedade é setada como `true`, o *thf-checkbox-group* passa a devolver um objeto completo para o - * `ngModel`, diferente do array que contém apenas os valores selecionados. - */ - this.indeterminate = false; - /** - * Lista de opções que serão exibidas - * Nesta propriedade deve ser definido um array de objetos que implementam a interface ThfCheckboxGroupOption - */ - this.options = []; - /** - * Evento ao alterar valor do campo - */ - this.change = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */]; - // Função para atualizar o `ngModel` do componente, necessário quando não for utilizado dentro da tag form. - this.ngModelChange = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - this.checkedOptions = {}; - this.checkedOptionsList = []; - this.ngControl = ngControl; - } - Object.defineProperty(ThfCheckboxGroupBaseComponent.prototype, "setRequired", { - set: /** - * @param {?} required - * @return {?} - */ - function (required) { - this.required = (required === '') ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(required); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfCheckboxGroupBaseComponent.prototype, "setIndeterminate", { - set: /** - * @param {?} indeterminate - * @return {?} - */ - function (indeterminate) { - this.indeterminate = (indeterminate === '') ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(indeterminate); - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfCheckboxGroupBaseComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - if (this.ngControl) { - this.ngControl.valueAccessor = this; - if (this.required) { - this.ngControl.control.setValidators([__WEBPACK_IMPORTED_MODULE_1__angular_forms__["i" /* Validators */].required]); - } - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfCheckboxGroupBaseComponent.prototype.checkOption = /** - * @param {?} value - * @return {?} - */ - function (value) { - this.checkOptionModel(value); - this.changeValue(value); - }; - /** - * @param {?} value - * @return {?} - */ - ThfCheckboxGroupBaseComponent.prototype.changeValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (this.propagateChange) { - this.propagateChange(this.indeterminate ? this.checkedOptions : this.checkedOptionsList); - } - else { - this.ngModelChange.emit(this.indeterminate ? this.checkedOptions : this.checkedOptionsList); - } - this.change.emit(this.indeterminate ? this.checkedOptions : this.checkedOptionsList); - }; - /** - * @param {?} optionsModel - * @return {?} - */ - ThfCheckboxGroupBaseComponent.prototype.writeValue = /** - * @param {?} optionsModel - * @return {?} - */ - function (optionsModel) { - if (optionsModel && this.checkedOptions !== optionsModel) { - this.generateCheckOptions(optionsModel); - this.removeDuplicatedOptions(); - if (this.propagateChange) { - this.propagateChange(this.checkedOptions); - } - this.change.emit(this.checkedOptions); - } - }; - /** - * @param {?} fn - * @return {?} - */ - ThfCheckboxGroupBaseComponent.prototype.registerOnChange = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.propagateChange = fn; - }; - /** - * @param {?} fn - * @return {?} - */ - ThfCheckboxGroupBaseComponent.prototype.registerOnTouched = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.propagateChange = fn; - }; - /** - * @param {?} optionClicked - * @return {?} - */ - ThfCheckboxGroupBaseComponent.prototype.checkOptionModel = /** - * @param {?} optionClicked - * @return {?} - */ - function (optionClicked) { - var /** @type {?} */ optionModel = this.options.find(function (optionFind) { return optionFind === optionClicked; }); - if (!optionModel.disabled) { - this.checkedOptions[optionModel.value] = !this.checkedOptions[optionModel.value]; - if (!this.indeterminate) { - var /** @type {?} */ optionChecked = this.checkedOptionsList.includes(optionModel.value); - optionChecked ? this.checkedOptionsList.splice(this.checkedOptionsList.indexOf(optionModel.value), 1) - : this.checkedOptionsList.push(optionModel.value); - } - } - }; - /** - * @return {?} - */ - ThfCheckboxGroupBaseComponent.prototype.removeDuplicatedOptions = /** - * @return {?} - */ - function () { - var _this = this; - this.options.forEach(function (option, index) { - var /** @type {?} */ duplicatedIndex = _this.options.findIndex(function (optionFind) { return optionFind.value === option.value; }) === index; - if (!duplicatedIndex) { - _this.options.splice(_this.options.indexOf(option), 1); - } - }); - }; - /** - * @param {?} optionsModel - * @return {?} - */ - ThfCheckboxGroupBaseComponent.prototype.generateCheckOptions = /** - * @param {?} optionsModel - * @return {?} - */ - function (optionsModel) { - var _this = this; - this.checkedOptions = {}; - if (optionsModel instanceof Array) { - this.checkedOptionsList = optionsModel; - this.options.forEach(function (option) { - _this.checkedOptions[option.value] = optionsModel.includes(option.value); - }); - } - else { - this.options.forEach(function (option) { - optionsModel[option.value] = optionsModel[option.value] === undefined ? false : optionsModel[option.value]; - _this.checkedOptions = optionsModel; - }); - } - }; - /** @nocollapse */ - ThfCheckboxGroupBaseComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["g" /* NgControl */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["P" /* Optional */] },] }, - ]; }; - ThfCheckboxGroupBaseComponent.propDecorators = { - "name": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['name',] },], - "setRequired": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-required',] },], - "setIndeterminate": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-indeterminate',] },], - "options": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-options',] },], - "change": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change',] },], - "ngModelChange": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['ngModelChange',] },], - }; - return ThfCheckboxGroupBaseComponent; -}()); - -function ThfCheckboxGroupBaseComponent_tsickle_Closure_declarations() { - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfCheckboxGroupBaseComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfCheckboxGroupBaseComponent.propDecorators; - /** - * Nome dos checkboxes - * @type {?} - */ - ThfCheckboxGroupBaseComponent.prototype.name; - /** - * Indica que o campo será obrigatório - * @type {?} - */ - ThfCheckboxGroupBaseComponent.prototype.required; - /** - * Caso exista a necessidade de usar o valor indeterminado (`null`) dentro da lista de opções, é necessário setar - * a propriedade `t-indeterminate` como `true`, por padrão essa propriedade vem desabilitada (`false`). - * - * Quando essa propriedade é setada como `true`, o *thf-checkbox-group* passa a devolver um objeto completo para o - * `ngModel`, diferente do array que contém apenas os valores selecionados. - * @type {?} - */ - ThfCheckboxGroupBaseComponent.prototype.indeterminate; - /** - * Lista de opções que serão exibidas - * Nesta propriedade deve ser definido um array de objetos que implementam a interface ThfCheckboxGroupOption - * @type {?} - */ - ThfCheckboxGroupBaseComponent.prototype.options; - /** - * Evento ao alterar valor do campo - * @type {?} - */ - ThfCheckboxGroupBaseComponent.prototype.change; - /** @type {?} */ - ThfCheckboxGroupBaseComponent.prototype.ngModelChange; - /** @type {?} */ - ThfCheckboxGroupBaseComponent.prototype.ngControl; - /** @type {?} */ - ThfCheckboxGroupBaseComponent.prototype.propagateChange; - /** @type {?} */ - ThfCheckboxGroupBaseComponent.prototype.checkedOptions; - /** @type {?} */ - ThfCheckboxGroupBaseComponent.prototype.checkedOptionsList; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-checkbox-group/thf-checkbox-group.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfCheckboxGroupComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_checkbox_group_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-checkbox-group/thf-checkbox-group-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfCheckboxGroupBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfCheckboxGroupComponent = /** @class */ (function (_super) { - __extends(ThfCheckboxGroupComponent, _super); - function ThfCheckboxGroupComponent(changeDetector, ngControl) { - var _this = _super.call(this, ngControl) || this; - _this.changeDetector = changeDetector; - return _this; - } - /** - * @return {?} - */ - ThfCheckboxGroupComponent.prototype.ngAfterViewChecked = /** - * @return {?} - */ - function () { - this.changeDetector.detectChanges(); - }; - ThfCheckboxGroupComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-checkbox-group', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfCheckboxGroupComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["k" /* ChangeDetectorRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["g" /* NgControl */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["P" /* Optional */] },] }, - ]; }; - ThfCheckboxGroupComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "help": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-help',] },], - }; - return ThfCheckboxGroupComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_checkbox_group_base_component__["a" /* ThfCheckboxGroupBaseComponent */])); - -function ThfCheckboxGroupComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfCheckboxGroupComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfCheckboxGroupComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfCheckboxGroupComponent.propDecorators; - /** - * Label do campo - * @type {?} - */ - ThfCheckboxGroupComponent.prototype.label; - /** - * Texto de apoio do campo - * @type {?} - */ - ThfCheckboxGroupComponent.prototype.help; - /** @type {?} */ - ThfCheckboxGroupComponent.prototype.changeDetector; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-clean/thf-clean-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfCleanBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * Este componente é de uso interno utilizado por componentes de entrada de dados com o objetivo de resetar as informações do model. - * - * Por padrão limpa o valor do campo e executa o método onChangePropagate, caso tenha a necessidade de tratar a função de limpar o campo, - * deve implementar a interface ThfClean. - * @abstract - */ -var ThfCleanBaseComponent = /** @class */ (function () { - function ThfCleanBaseComponent() { - /** - * Valor que será atribuído ao campo quando for clicado no thf-clean. - */ - this.defaultValue = ''; - /** - * Evento disparado quando executada ação do thf-clean. - * Este evento deve ser usado para avisar para o componente que está usando o thf-clean, que o botão foi disparado, - * e provavelmente será preciso emitir o evento para atualizar o model. - */ - this.changeEvent = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - /** - * @return {?} - */ - ThfCleanBaseComponent.prototype.clear = /** - * @return {?} - */ - function () { - this.setInputValue(this.defaultValue); - this.changeEvent.emit(this.defaultValue); - }; - /** - * @return {?} - */ - ThfCleanBaseComponent.prototype.showIcon = /** - * @return {?} - */ - function () { - return this.defaultValue !== this.getInputValue() && this.hasCleanAttr() && !this.isDisabled() && !this.isReadonly(); - }; - /** - * @return {?} - */ - ThfCleanBaseComponent.prototype.hasCleanAttr = /** - * @return {?} - */ - function () { - return this.parentComponent.clean; - }; - /** - * @return {?} - */ - ThfCleanBaseComponent.prototype.isDisabled = /** - * @return {?} - */ - function () { - return this.parentComponent.disabled; - }; - /** - * @return {?} - */ - ThfCleanBaseComponent.prototype.isReadonly = /** - * @return {?} - */ - function () { - return this.parentComponent.readonly; - }; - ThfCleanBaseComponent.propDecorators = { - "inputRef": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-element-ref',] },], - "defaultValue": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-default-value',] },], - "changeEvent": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change-event',] },], - }; - return ThfCleanBaseComponent; -}()); - -function ThfCleanBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfCleanBaseComponent.propDecorators; - /** - * Nesta propriedade deve-se informar o elementRef do campo de entrada que utilizará o thf-clean. - * @type {?} - */ - ThfCleanBaseComponent.prototype.inputRef; - /** - * Valor que será atribuído ao campo quando for clicado no thf-clean. - * @type {?} - */ - ThfCleanBaseComponent.prototype.defaultValue; - /** - * Evento disparado quando executada ação do thf-clean. - * Este evento deve ser usado para avisar para o componente que está usando o thf-clean, que o botão foi disparado, - * e provavelmente será preciso emitir o evento para atualizar o model. - * @type {?} - */ - ThfCleanBaseComponent.prototype.changeEvent; - /** @type {?} */ - ThfCleanBaseComponent.prototype.parentComponent; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfCleanBaseComponent.prototype.setInputValue = function (value) { }; - /** - * @abstract - * @return {?} - */ - ThfCleanBaseComponent.prototype.getInputValue = function () { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-clean/thf-clean.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfCleanComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_clean_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-clean/thf-clean-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsPrivate - * - * \@docsExtends ThfCleanBaseComponent - * - * \@examplePrivate - * - * - * - * - * - */ -var ThfCleanComponent = /** @class */ (function (_super) { - __extends(ThfCleanComponent, _super); - function ThfCleanComponent(viewRef) { - var _this = _super.call(this) || this; - _this.viewRef = viewRef; - _this.parentComponent = _this.viewRef['_view']['component']; - return _this; - } - /** - * @param {?=} value - * @return {?} - */ - ThfCleanComponent.prototype.setInputValue = /** - * @param {?=} value - * @return {?} - */ - function (value) { - if (this.inputRef && this.inputRef.nativeElement) { - this.inputRef.nativeElement.value = value; - } - }; - /** - * @return {?} - */ - ThfCleanComponent.prototype.getInputValue = /** - * @return {?} - */ - function () { - if (this.inputRef && this.inputRef.nativeElement) { - return this.inputRef.nativeElement.value; - } - }; - ThfCleanComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-clean', template: " " - },] }, - ]; - /** @nocollapse */ - ThfCleanComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - ]; }; - return ThfCleanComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_clean_base_component__["a" /* ThfCleanBaseComponent */])); - -function ThfCleanComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfCleanComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfCleanComponent.ctorParameters; - /** @type {?} */ - ThfCleanComponent.prototype.viewRef; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-combo/thf-combo-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfComboBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_combo_filter_mode_enum__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-combo/thf-combo-filter-mode.enum.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -var /** @type {?} */ THF_COMBO_DEBOUNCE_TIME_DEFAULT = 400; -var /** @type {?} */ THF_COMBO_FIELD_LABEL_DEFAULT = 'label'; -var /** @type {?} */ THF_COMBO_FIELD_VALUE_DEFAULT = 'value'; -/** - * \@description - * - * O thf-combo, semelhante ao thf-select, exibe uma lista de valores e permite ao usuário fazer a seleção de um desses valores, - * mas no caso do thf-combo, o usuário ainda consegue filtrar os valores disponibilizados para seleção. - * - * Também há a possibilidade de usar serviço no thf-combo, através da propriedade t-filter-service. - * - * O comportamento do thf-combo permite ao usuário: - * - selecionar um item através do mouse; - * - navegar pelos itens utilizando as setas do teclado confirmando a seleção com "Enter"; - * - pesquisar os itens da lista de seleção e em seguida navegar com as setas ou com o mouse; - * - digitar a descrição completa. - * - * O thf-combo guarda o último valor caso o usuário desista de uma busca, deixando o campo ou teclando "ESC". - * Caso seja digitado no campo de busca a descrição completa de um item, então a seleção será automaticamente efetuada - * ao deixar o campo ou pressionando "Enter". - * - * É necessário que os itens da lista de selecão contenham sempre valor (value) e descrição (label) para que os itens apareçam corretamente - * no thf-combo, itens que não estejam implementando corretamenta a interface ThfComboOption, serão descartados. - * - * O thf-combo ainda permite definir o modo que será feito o filtro, através da propriedade t-filter-mode. - * @abstract - */ -var ThfComboBaseComponent = /** @class */ (function () { - function ThfComboBaseComponent(ngControl) { - this._debounceTime = 400; - this._disabledInitFilter = false; - this._fieldLabel = 'label'; - this._fieldValue = 'value'; - this._filterMinlength = 0; - this._filterMode = __WEBPACK_IMPORTED_MODULE_2__thf_combo_filter_mode_enum__["a" /* ThfComboFilterMode */].startsWith; - this.cacheOptions = []; - this.cacheStaticOptions = []; - this.firstInWriteValue = true; - this.isFirstFilter = true; - this.visibleOptions = []; - /** - * Mensagem apresentada enquanto o campo estiver vazio. - */ - this.placeholder = ''; - /** - * Indica que o campo será obrigatório. - */ - this.required = false; - /** - * Indica que o campo será desabilitado. - */ - this.disabled = false; - /** - * Indica que a lista definida na propriedade t-options será ordenada pela descrição. - */ - this.sort = false; - /** - * Deve ser informada uma função que será disparada quando houver alterações no ngModel. - */ - this.change = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - // Função para atualizar o ngModel do componente, necessário quando não for utilizado dentro da tag form. - this.ngModelChange = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - this.ngControl = ngControl; - } - Object.defineProperty(ThfComboBaseComponent.prototype, "filterService", { - get: /** - * @return {?} - */ - function () { - return this._filterService; - }, - set: /** - * \@optional - * - * \@description - * Nesta propriedade deve ser informada a URL do serviço em que será realizado o filtro para carregamento da lista de - * itens no componente. - * Caso haja a necessidade de customização, então pode ser informado um serviço implementando a interface ThfComboFilter. - * - * Caso utilizado uma URL, o serviço deve ser retornado no padrão API TOTVS e utiliza as propriedades - * `t-field-label` e `t-field-value` para a construção da lista de itens. - * - * Quando utilizada uma URL de serviço, então será concateanada nesta URL o valor que deseja-se filtrar da seguinte forma: - * ``` - * url + ?filter=Peter - * ``` - * @param {?} service - * @return {?} - */ - function (service) { - this._filterService = service; - this.configAfterSetFilterService(service); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfComboBaseComponent.prototype, "debounceTime", { - get: /** - * @return {?} - */ - function () { - return this._debounceTime; - }, - set: /** - * \@optional - * - * \@description - * Esta propriedade define em quanto tempo (em milissegundos), aguarda para acionar o evento de filtro após cada pressionamento de tecla. - * Será utilizada apenas quando houver serviço (`t-filter-service`). - * - * \@default `400` - * - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ parsedValue = parseInt(/** @type {?} */ (value), 10); - this._debounceTime = !isNaN(parsedValue) && parsedValue > 0 ? parsedValue : THF_COMBO_DEBOUNCE_TIME_DEFAULT; - this.unsubscribeKeyupObservable(); - this.initInputObservable(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfComboBaseComponent.prototype, "disabledInitFilter", { - get: /** - * @return {?} - */ - function () { - return this._disabledInitFilter; - }, - set: /** - * \@optional - * - * \@description - * Desabilita o filtro inicial no serviço, que é executado no primeiro clique no campo. - * - * \@default `false` - * - * @param {?} value - * @return {?} - */ - function (value) { - this._disabledInitFilter = Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["d" /* convertToBoolean */])(value); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfComboBaseComponent.prototype, "fieldValue", { - get: /** - * @return {?} - */ - function () { - return this._fieldValue; - }, - set: /** - * \@optional - * - * \@description - * Deve ser informado o nome da propriedade do objeto que será utilizado para a conversão dos itens apresentados na lista do componente - * (`t-options`), esta propriedade será responsável pelo valor de cada item da lista. - * - * Necessário quando informar o serviço como URL e o mesmo não estiver retornando uma lista de objetos no padrão da interface - * ThfComboOption. - * - * \@default `value` - * @param {?} value - * @return {?} - */ - function (value) { - this._fieldValue = value || THF_COMBO_FIELD_VALUE_DEFAULT; - if (Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["i" /* isTypeof */])(this.filterService, 'string') && this.service) { - this.service.fieldValue = this._fieldValue; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfComboBaseComponent.prototype, "fieldLabel", { - get: /** - * @return {?} - */ - function () { - return this._fieldLabel; - }, - set: /** - * \@optional - * - * \@description - * Deve ser informado o nome da propriedade do objeto que será utilizado para a conversão dos itens apresentados na lista do componente - * (`t-options`), esta propriedade será responsável pelo texto de apresentação de cada item da lista. - * - * Necessário quando informar o serviço como URL e o mesmo não estiver retornando uma lista de objetos no padrão da interface - * ThfComboOption. - * - * \@default `label` - * @param {?} value - * @return {?} - */ - function (value) { - this._fieldLabel = value || THF_COMBO_FIELD_LABEL_DEFAULT; - if (Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["i" /* isTypeof */])(this.filterService, 'string') && this.service) { - this.service.fieldLabel = this._fieldLabel; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfComboBaseComponent.prototype, "filterMinlength", { - get: /** - * @return {?} - */ - function () { - return this._filterMinlength; - }, - set: /** - * \@optional - * - * \@description - * Valor mínimo de caracteres para realizar o filtro no serviço. - * - * \@default `0` - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ parseValue = (typeof value === 'string') ? parseInt(value, 10) : value; - this._filterMinlength = Number.isInteger(parseValue) ? parseValue : 0; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfComboBaseComponent.prototype, "setRequired", { - set: /** - * @param {?} required - * @return {?} - */ - function (required) { - this.required = required === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["d" /* convertToBoolean */])(required); - // Atualiza Validador do campo - this.setValidators(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfComboBaseComponent.prototype, "setDisabled", { - set: /** - * @param {?} disabled - * @return {?} - */ - function (disabled) { - this.disabled = disabled === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["d" /* convertToBoolean */])(disabled); - // Atualiza Validador do campo - this.setValidators(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfComboBaseComponent.prototype, "setOptions", { - set: /** - * @param {?} options - * @return {?} - */ - function (options) { - this.options = options; - this.cacheStaticOptions = options; - this.validAndSortOptions(); - Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["k" /* removeDuplicatedOptions */])(this.options); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfComboBaseComponent.prototype, "setSort", { - set: /** - * @param {?} sort - * @return {?} - */ - function (sort) { - this.sort = sort === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["d" /* convertToBoolean */])(sort); - this.validAndSortOptions(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfComboBaseComponent.prototype, "filterMode", { - get: /** - * @return {?} - */ - function () { - return this._filterMode; - }, - set: /** - * \@optional - * - * \@description - * - * Define o modo de pesquisa utilizado no filtro da lista de seleção: `startsWith`, `contains` ou `endsWith`. - * - * \@default `startsWith` - * - * @param {?} filterMode - * @return {?} - */ - function (filterMode) { - this._filterMode = (filterMode in __WEBPACK_IMPORTED_MODULE_2__thf_combo_filter_mode_enum__["a" /* ThfComboFilterMode */]) ? filterMode : __WEBPACK_IMPORTED_MODULE_2__thf_combo_filter_mode_enum__["a" /* ThfComboFilterMode */].startsWith; - switch (this._filterMode.toString()) { - case 'startsWith': - this._filterMode = __WEBPACK_IMPORTED_MODULE_2__thf_combo_filter_mode_enum__["a" /* ThfComboFilterMode */].startsWith; - break; - case 'contains': - this._filterMode = __WEBPACK_IMPORTED_MODULE_2__thf_combo_filter_mode_enum__["a" /* ThfComboFilterMode */].contains; - break; - case 'endsWith': - this._filterMode = __WEBPACK_IMPORTED_MODULE_2__thf_combo_filter_mode_enum__["a" /* ThfComboFilterMode */].endsWith; - break; - } - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfComboBaseComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - this.onInit(); - this.useServiceOrComboList(this.filterService); - }; - /** - * @return {?} - */ - ThfComboBaseComponent.prototype.onInit = /** - * @return {?} - */ - function () { - if (this.ngControl) { - this.ngControl.valueAccessor = this; - this.setValidators(); - } - }; - /** - * @return {?} - */ - ThfComboBaseComponent.prototype.onInitService = /** - * @return {?} - */ - function () { - if (this.filterService) { - this.setService(this.filterService); - this.initInputObservable(); - } - }; - /** - * @param {?} service - * @return {?} - */ - ThfComboBaseComponent.prototype.setService = /** - * @param {?} service - * @return {?} - */ - function (service) { - if (service) { - if (Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["i" /* isTypeof */])(service, 'object')) { - this.service = /** @type {?} */ (service); - } - else { - this.service = this.defaultService; - this.service.configProperties(/** @type {?} */ (service), this.fieldLabel, this.fieldValue); - } - } - }; - /** - * @return {?} - */ - ThfComboBaseComponent.prototype.setValidators = /** - * @return {?} - */ - function () { - if (this.ngControl) { - this.ngControl.control.setValidators(this.getValidatorRequired()); - this.ngControl.control.updateValueAndValidity(); - } - }; - /** - * @return {?} - */ - ThfComboBaseComponent.prototype.getValidatorRequired = /** - * @return {?} - */ - function () { - return (!this.disabled && this.required) ? [__WEBPACK_IMPORTED_MODULE_1__angular_forms__["i" /* Validators */].required] : []; - }; - /** - * @return {?} - */ - ThfComboBaseComponent.prototype.validAndSortOptions = /** - * @return {?} - */ - function () { - if (this.options && this.options.length > 0) { - // Remove os objetos que não contém valor e atribui o valor ao label caso este esteja vazio - for (var /** @type {?} */ i = 0; i < this.options.length; i++) { - if (!Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["n" /* validValue */])(this.options[i]['value'])) { - this.options.splice(i, 1); - } - else if (!this.options[i]['label']) { - this.options[i]['label'] = this.options[i]['value'].toString(); - } - } - } - this.sortOptions(); - }; - /** - * @return {?} - */ - ThfComboBaseComponent.prototype.sortOptions = /** - * @return {?} - */ - function () { - if (this.options && this.options.length > 0 && this.sort) { - this.options.sort(this.compareOptions); - } - }; - /** - * @param {?} a - * @param {?} b - * @return {?} - */ - ThfComboBaseComponent.prototype.compareOptions = /** - * @param {?} a - * @param {?} b - * @return {?} - */ - function (a, b) { - if (a.label.toString().toLowerCase() < b.label.toString().toLowerCase()) { - return -1; - } - if (a.label.toString().toLowerCase() > b.label.toString().toLowerCase()) { - return 1; - } - return 0; - }; - /** - * @param {?} option - * @return {?} - */ - ThfComboBaseComponent.prototype.updateSelectedValue = /** - * @param {?} option - * @return {?} - */ - function (option) { - if (option) { - this.selectedView = option; - this.selectedValue = option.value; - this.setInputValue(option.label); - this.callModelChange(option.value); - } - else { - this.selectedView = null; - this.selectedValue = null; - this.setInputValue(''); - this.callModelChange(undefined); - } - }; - /** - * @param {?} search - * @param {?} option - * @param {?} filterMode - * @return {?} - */ - ThfComboBaseComponent.prototype.compareMethod = /** - * @param {?} search - * @param {?} option - * @param {?} filterMode - * @return {?} - */ - function (search, option, filterMode) { - switch (filterMode) { - case __WEBPACK_IMPORTED_MODULE_2__thf_combo_filter_mode_enum__["a" /* ThfComboFilterMode */].startsWith: - return this.startsWith(search, option); - case __WEBPACK_IMPORTED_MODULE_2__thf_combo_filter_mode_enum__["a" /* ThfComboFilterMode */].contains: - return this.contains(search, option); - case __WEBPACK_IMPORTED_MODULE_2__thf_combo_filter_mode_enum__["a" /* ThfComboFilterMode */].endsWith: - return this.endsWith(search, option); - } - }; - /** - * @param {?} search - * @param {?} option - * @return {?} - */ - ThfComboBaseComponent.prototype.startsWith = /** - * @param {?} search - * @param {?} option - * @return {?} - */ - function (search, option) { - return option.label.toLowerCase().startsWith(search.toLowerCase()); - }; - /** - * @param {?} search - * @param {?} option - * @return {?} - */ - ThfComboBaseComponent.prototype.contains = /** - * @param {?} search - * @param {?} option - * @return {?} - */ - function (search, option) { - return option.label.toLowerCase().indexOf(search.toLowerCase()) > -1; - }; - /** - * @param {?} search - * @param {?} option - * @return {?} - */ - ThfComboBaseComponent.prototype.endsWith = /** - * @param {?} search - * @param {?} option - * @return {?} - */ - function (search, option) { - return option.label.toLowerCase().endsWith(search.toLowerCase()); - }; - /** - * @param {?} value - * @param {?} options - * @return {?} - */ - ThfComboBaseComponent.prototype.getOptionFromValue = /** - * @param {?} value - * @param {?} options - * @return {?} - */ - function (value, options) { - var _this = this; - return (options) ? options.find(function (option) { return _this.isEqual(option.value, value); }) : null; - }; - /** - * @param {?} label - * @param {?} options - * @return {?} - */ - ThfComboBaseComponent.prototype.getOptionFromLabel = /** - * @param {?} label - * @param {?} options - * @return {?} - */ - function (label, options) { - if (options) { - return options.find(function (option) { - return option.label.toString().toLowerCase() === label.toString().toLowerCase(); - }); - } - else { - return null; - } - }; - /** - * @param {?} option - * @return {?} - */ - ThfComboBaseComponent.prototype.updateModel = /** - * @param {?} option - * @return {?} - */ - function (option) { - this.selectedView = option; - this.selectedValue = option.value; - this.callModelChange(option.value); - this.setInputValue(option.label); - this.onChange(); - }; - /** - * @param {?} value - * @return {?} - */ - ThfComboBaseComponent.prototype.callModelChange = /** - * @param {?} value - * @return {?} - */ - function (value) { - // Caso o componente estiver dentro de um form, terá acesso ao método onModelChange. - return (this.onModelChange) ? this.onModelChange(value) : this.ngModelChange.emit(value); - }; - /** - * @param {?} value - * @param {?} inputValue - * @return {?} - */ - ThfComboBaseComponent.prototype.isEqual = /** - * @param {?} value - * @param {?} inputValue - * @return {?} - */ - function (value, inputValue) { - if ((value || value === 0) && inputValue) { - return value.toString() === inputValue.toString(); - } - if ((value === null && inputValue !== null) || - (value === undefined && inputValue !== undefined)) { - value = "" + value; // Transformando em string - } - return value === inputValue; - }; - /** - * @param {?} search - * @param {?} options - * @param {?} filterMode - * @return {?} - */ - ThfComboBaseComponent.prototype.searchForLabel = /** - * @param {?} search - * @param {?} options - * @param {?} filterMode - * @return {?} - */ - function (search, options, filterMode) { - var _this = this; - if (search && options && options.length) { - var /** @type {?} */ newOptions_1 = []; - options.forEach(function (option) { - if (option.label && (_this.compareMethod(search, option, filterMode) || _this.service)) { - newOptions_1.push(option); - } - }); - this.selectedView = newOptions_1[0]; - this.updateComboList(newOptions_1); - } - else { - this.updateComboList(this.options); - } - }; - /** - * @param {?} options - * @return {?} - */ - ThfComboBaseComponent.prototype.updateComboList = /** - * @param {?} options - * @return {?} - */ - function (options) { - if (options) { - this.visibleOptions = options; - if (!this.selectedView && this.visibleOptions.length) { - this.selectedView = this.visibleOptions[0]; - } - } - }; - /** - * @param {?} value - * @param {?} options - * @param {?=} reverse - * @return {?} - */ - ThfComboBaseComponent.prototype.getNextOption = /** - * @param {?} value - * @param {?} options - * @param {?=} reverse - * @return {?} - */ - function (value, options, reverse) { - if (reverse === void 0) { reverse = false; } - var /** @type {?} */ newOptions = [].concat(options); - var /** @type {?} */ optionFound = null; - var /** @type {?} */ found = false; - if (reverse) { - newOptions.reverse(); - } - for (var /** @type {?} */ i = 0; i < newOptions.length; i++) { - var /** @type {?} */ option = newOptions[i]; - if (!optionFound) { - optionFound = option; - } - if (found) { - return option; - } - if (this.isEqual(option.value, value)) { - found = true; - } - } - return optionFound; - }; - /** - * @return {?} - */ - ThfComboBaseComponent.prototype.getIndexSelectedView = /** - * @return {?} - */ - function () { - for (var /** @type {?} */ i = 0; i < this.visibleOptions.length; i++) { - if (this.compareObjects(this.visibleOptions[i], this.selectedView)) { - return i; - } - } - return null; - }; - /** - * @param {?} obj1 - * @param {?} obj2 - * @return {?} - */ - ThfComboBaseComponent.prototype.compareObjects = /** - * @param {?} obj1 - * @param {?} obj2 - * @return {?} - */ - function (obj1, obj2) { - return JSON.stringify(obj1) === JSON.stringify(obj2); - }; - /** - * @return {?} - */ - ThfComboBaseComponent.prototype.verifyValidOption = /** - * @return {?} - */ - function () { - var /** @type {?} */ labelInput = this.getInputValue(); - var /** @type {?} */ optionFound = this.getOptionFromLabel(labelInput, this.options); - if (optionFound) { - this.updateModel(optionFound); - } - else { - if (this.selectedValue && labelInput) { - var /** @type {?} */ oldOption = this.getOptionFromValue(this.selectedValue, this.options); - if (oldOption && oldOption.label) { - this.setInputValue(oldOption.label); - } - else { - this.setInputValue(''); - } - } - else { - this.updateSelectedValue(null); - } - this.updateComboList(this.options); - } - }; - /** - * @return {?} - */ - ThfComboBaseComponent.prototype.onChange = /** - * @return {?} - */ - function () { - this.change.emit(null); - }; - // Recebe as alterações do model - /** - * @param {?} value - * @return {?} - */ - ThfComboBaseComponent.prototype.writeValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (this.firstInWriteValue) { - this.firstInWriteValue = false; - return; - } - if (Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["n" /* validValue */])(value) && !this.service && this.options && this.options.length) { - var /** @type {?} */ option = this.getOptionFromValue(value, this.options); - if (option) { - this.selectedView = option; - this.selectedValue = option.value; - this.setInputValue(option.label); - } - else { - this.updateSelectedValue(null); - } - } - // Se houver serviço busca pelo model. - if (value && this.service) { - this.getObjectByValue(value); - } - if (!Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["n" /* validValue */])(value)) { - this.updateSelectedValue(null); - } - }; - /** - * @param {?} fn - * @return {?} - */ - ThfComboBaseComponent.prototype.registerOnChange = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.onModelChange = fn; - }; - /** - * @param {?} fn - * @return {?} - */ - ThfComboBaseComponent.prototype.registerOnTouched = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.onModelTouched = fn; - }; - /** - * @param {?} service - * @return {?} - */ - ThfComboBaseComponent.prototype.configAfterSetFilterService = /** - * @param {?} service - * @return {?} - */ - function (service) { - if (service) { - this.options = []; - } - else { - this.options = this.cacheStaticOptions; - } - this.visibleOptions = []; - this.isFirstFilter = true; - this.unsubscribeKeyupObservable(); - this.useServiceOrComboList(service); - }; - /** - * @return {?} - */ - ThfComboBaseComponent.prototype.unsubscribeKeyupObservable = /** - * @return {?} - */ - function () { - if (this.keyupSubscribe) { - this.keyupSubscribe.unsubscribe(); - } - }; - /** - * @param {?} filterService - * @return {?} - */ - ThfComboBaseComponent.prototype.useServiceOrComboList = /** - * @param {?} filterService - * @return {?} - */ - function (filterService) { - if (filterService) { - this.onInitService(); - } - else { - this.service = undefined; - this.updateComboList(this.options); - } - }; - /** @nocollapse */ - ThfComboBaseComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["g" /* NgControl */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["P" /* Optional */] },] }, - ]; }; - ThfComboBaseComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "help": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-help',] },], - "placeholder": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-placeholder',] },], - "name": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['name',] },], - "filterService": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-filter-service',] },], - "debounceTime": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-debounce-time',] },], - "disabledInitFilter": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled-init-filter',] },], - "fieldValue": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-field-value',] },], - "fieldLabel": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-field-label',] },], - "filterMinlength": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-filter-minlength',] },], - "setRequired": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-required',] },], - "setDisabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled',] },], - "setOptions": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-options',] },], - "setSort": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-sort',] },], - "filterMode": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-filter-mode',] },], - "change": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change',] },], - "ngModelChange": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['ngModelChange',] },], - }; - return ThfComboBaseComponent; -}()); - -function ThfComboBaseComponent_tsickle_Closure_declarations() { - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfComboBaseComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfComboBaseComponent.propDecorators; - /** @type {?} */ - ThfComboBaseComponent.prototype._debounceTime; - /** @type {?} */ - ThfComboBaseComponent.prototype._disabledInitFilter; - /** @type {?} */ - ThfComboBaseComponent.prototype._fieldLabel; - /** @type {?} */ - ThfComboBaseComponent.prototype._fieldValue; - /** @type {?} */ - ThfComboBaseComponent.prototype._filterMinlength; - /** @type {?} */ - ThfComboBaseComponent.prototype._filterMode; - /** @type {?} */ - ThfComboBaseComponent.prototype._filterService; - /** @type {?} */ - ThfComboBaseComponent.prototype.cacheOptions; - /** @type {?} */ - ThfComboBaseComponent.prototype.cacheStaticOptions; - /** @type {?} */ - ThfComboBaseComponent.prototype.defaultService; - /** @type {?} */ - ThfComboBaseComponent.prototype.service; - /** @type {?} */ - ThfComboBaseComponent.prototype.firstInWriteValue; - /** @type {?} */ - ThfComboBaseComponent.prototype.isFirstFilter; - /** @type {?} */ - ThfComboBaseComponent.prototype.keyupSubscribe; - /** @type {?} */ - ThfComboBaseComponent.prototype.selectedValue; - /** @type {?} */ - ThfComboBaseComponent.prototype.selectedView; - /** @type {?} */ - ThfComboBaseComponent.prototype.visibleOptions; - /** @type {?} */ - ThfComboBaseComponent.prototype.onModelChange; - /** @type {?} */ - ThfComboBaseComponent.prototype.onModelTouched; - /** @type {?} */ - ThfComboBaseComponent.prototype.ngControl; - /** - * Label no componente. - * @type {?} - */ - ThfComboBaseComponent.prototype.label; - /** - * Texto de apoio para o campo. - * @type {?} - */ - ThfComboBaseComponent.prototype.help; - /** - * Mensagem apresentada enquanto o campo estiver vazio. - * @type {?} - */ - ThfComboBaseComponent.prototype.placeholder; - /** - * Nome do componente. - * @type {?} - */ - ThfComboBaseComponent.prototype.name; - /** - * Indica que o campo será obrigatório. - * @type {?} - */ - ThfComboBaseComponent.prototype.required; - /** - * Indica que o campo será desabilitado. - * @type {?} - */ - ThfComboBaseComponent.prototype.disabled; - /** - * Nesta propriedade deve ser definida uma lista de objetos que implementam a interface ThfComboOption. - * Esta lista conterá os valores e as descrições que serão apresentados na tela. - * - * @type {?} - */ - ThfComboBaseComponent.prototype.options; - /** - * Indica que a lista definida na propriedade t-options será ordenada pela descrição. - * @type {?} - */ - ThfComboBaseComponent.prototype.sort; - /** - * Deve ser informada uma função que será disparada quando houver alterações no ngModel. - * @type {?} - */ - ThfComboBaseComponent.prototype.change; - /** @type {?} */ - ThfComboBaseComponent.prototype.ngModelChange; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfComboBaseComponent.prototype.setInputValue = function (value) { }; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfComboBaseComponent.prototype.applyFilter = function (value) { }; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfComboBaseComponent.prototype.getObjectByValue = function (value) { }; - /** - * @abstract - * @return {?} - */ - ThfComboBaseComponent.prototype.getInputValue = function () { }; - /** - * @abstract - * @return {?} - */ - ThfComboBaseComponent.prototype.initInputObservable = function () { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-combo/thf-combo-filter-mode.enum.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfComboFilterMode; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** @enum {number} */ -var ThfComboFilterMode = { - /** Verifica se o texto *inicia* com o valor pesquisado. Caso não seja especificado um tipo, será esse o utilizado. */ - startsWith: 0, - /** Verifica se o texto *contém* o valor pesquisado. */ - contains: 1, - /** Verifica se o texto *finaliza* com o valor pesquisado. */ - endsWith: 2, -}; - -ThfComboFilterMode[ThfComboFilterMode.startsWith] = "startsWith"; -ThfComboFilterMode[ThfComboFilterMode.contains] = "contains"; -ThfComboFilterMode[ThfComboFilterMode.endsWith] = "endsWith"; - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-combo/thf-combo-filter.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfComboFilterService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsPrivate - * - * \@description - * - * Serviço padrão utilizado para filtrar os dados do componente thf-combo. - */ -var ThfComboFilterService = /** @class */ (function () { - function ThfComboFilterService(http) { - this.http = http; - this.fieldLabel = 'label'; - this.fieldValue = 'value'; - } - Object.defineProperty(ThfComboFilterService.prototype, "url", { - get: /** - * @return {?} - */ - function () { return this._url; }, - enumerable: true, - configurable: true - }); - /** - * @param {?} param - * @return {?} - */ - ThfComboFilterService.prototype.getFilteredData = /** - * @param {?} param - * @return {?} - */ - function (param) { - var _this = this; - var /** @type {?} */ value = param.value; - var /** @type {?} */ params = new __WEBPACK_IMPORTED_MODULE_0__angular_common_http__["f" /* HttpParams */]({ - fromString: "filter=" + value - }); - return this.http.get("" + this.url, { responseType: 'json', params: params }) - .map(function (response) { return _this.parseToArrayComboOption(response.items); }); - }; - /** - * @param {?} value - * @return {?} - */ - ThfComboFilterService.prototype.getObjectByValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - var _this = this; - return this.http.get(this.url + "/" + value).map(function (item) { return _this.parseToComboOption(item); }); - }; - /** - * @param {?} url - * @param {?} fieldLabel - * @param {?} fieldValue - * @return {?} - */ - ThfComboFilterService.prototype.configProperties = /** - * @param {?} url - * @param {?} fieldLabel - * @param {?} fieldValue - * @return {?} - */ - function (url, fieldLabel, fieldValue) { - this._url = url; - this.fieldLabel = fieldLabel; - this.fieldValue = fieldValue; - }; - /** - * @param {?} items - * @return {?} - */ - ThfComboFilterService.prototype.parseToArrayComboOption = /** - * @param {?} items - * @return {?} - */ - function (items) { - var _this = this; - if (items && items.length > 0) { - return items.map(function (item) { - return _this.parseToComboOption(item); - }); - } - return []; - }; - /** - * @param {?} item - * @return {?} - */ - ThfComboFilterService.prototype.parseToComboOption = /** - * @param {?} item - * @return {?} - */ - function (item) { - if (item && item[this.fieldValue]) { - var /** @type {?} */ label = item[this.fieldLabel]; - var /** @type {?} */ value = item[this.fieldValue]; - return { label: label, value: value }; - } - }; - ThfComboFilterService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["B" /* Injectable */] }, - ]; - /** @nocollapse */ - ThfComboFilterService.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_common_http__["b" /* HttpClient */], }, - ]; }; - return ThfComboFilterService; -}()); - -function ThfComboFilterService_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfComboFilterService.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfComboFilterService.ctorParameters; - /** @type {?} */ - ThfComboFilterService.prototype._url; - /** @type {?} */ - ThfComboFilterService.prototype.fieldLabel; - /** @type {?} */ - ThfComboFilterService.prototype.fieldValue; - /** @type {?} */ - ThfComboFilterService.prototype.http; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-combo/thf-combo.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfComboComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser__ = __webpack_require__("../../../platform-browser/esm5/platform-browser.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_rxjs_Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_rxjs_add_operator_debounceTime__ = __webpack_require__("../../../../rxjs/_esm5/add/operator/debounceTime.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__thf_combo_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-combo/thf-combo-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__thf_combo_filter_service__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-combo/thf-combo-filter.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__thf_combo_filter_mode_enum__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-combo/thf-combo-filter-mode.enum.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - - - - -/** - * \@docsExtends ThfComboBaseComponent - * - * \@description - * Utilizando thf-combo com serviço, é possivel digitar um valor no campo de entrada e pressionar a tecla 'tab' para que o componente - * faça uma requisição à URL informada passando o valor digitado no campo. Se encontrado o valor, então o mesmo será selecionado, caso - * não seja encontrado, então a lista de itens voltará para o estado inicial. - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfComboComponent = /** @class */ (function (_super) { - __extends(ThfComboComponent, _super); - function ThfComboComponent(element, renderer, differs, defaultService, sanitized, ngControl) { - var _this = _super.call(this, ngControl) || this; - _this.element = element; - _this.differs = differs; - _this.defaultService = defaultService; - _this.sanitized = sanitized; - _this.comboOpen = false; - _this.comboIcon = 'thf-icon-arrow-down'; - _this.isFiltering = false; - _this.isServerSearching = false; - _this.shouldMarkLetters = true; - _this.isProcessingGetObjectByValue = false; - _this.scrollTop = 0; - _this.differ = differs.find([]).create(null); - renderer.listenGlobal('document', 'click', function (event) { - _this.wasClickedOnToggle(event); - }); - return _this; - } - /** - * @return {?} - */ - ThfComboComponent.prototype.ngDoCheck = /** - * @return {?} - */ - function () { - var /** @type {?} */ change = this.differ.diff(this.options); - if (change) { - this.validAndSortOptions(); - Object(__WEBPACK_IMPORTED_MODULE_5__utils_util__["k" /* removeDuplicatedOptions */])(this.options); - } - }; - /** - * @param {?=} event - * @return {?} - */ - ThfComboComponent.prototype.onKeyDown = /** - * @param {?=} event - * @return {?} - */ - function (event) { - // busca um registro quando acionar o tab - if (this.service && event.keyCode === 9 && event.target.value) { - this.controlComboVisibility(false); - return this.getObjectByValue(event.target.value); - } - // Teclas "up" e "down" - if (event.keyCode === 38 || event.keyCode === 40) { - event.preventDefault(); - this.shouldMarkLetters = false; - if (this.comboOpen) { - if (event.keyCode === 38) { - this.selectPreviousOption(); - } - else { - this.selectNextOption(); - } - } - this.controlComboVisibility(true); - this.isFiltering = false; - return; - } - // Teclas "tab" ou "esc" - if (event.keyCode === 9 || event.keyCode === 27) { - this.controlComboVisibility(false); - this.verifyValidOption(); - if (!this.service) { - this.updateComboList(this.options); - } - return; - } - // Tecla "enter" - if (event.keyCode === 13 && this.selectedView && this.comboOpen) { - this.controlComboVisibility(false); - this.updateSelectedValue(this.selectedView); - if (!this.service) { - this.updateComboList(this.options); - } - return; - } - this.controlComboVisibility(true); - }; - /** - * @param {?=} event - * @return {?} - */ - ThfComboComponent.prototype.onKeyUp = /** - * @param {?=} event - * @return {?} - */ - function (event) { - var /** @type {?} */ inputValue = event.target.value; - if (inputValue) { - if ((event.keyCode >= 48 && event.keyCode <= 57) || - (event.keyCode >= 65 && event.keyCode <= 90) || - event.keyCode === 8 || event.keyCode === 46) { - if (!this.service) { - this.shouldMarkLetters = true; - this.isFiltering = true; - this.searchForLabel(inputValue, this.options, this.filterMode); - } - } - } - else { - this.updateSelectedValue(null); - if (!this.service) { - this.updateComboList(this.options); - } - } - }; - /** - * @return {?} - */ - ThfComboComponent.prototype.initInputObservable = /** - * @return {?} - */ - function () { - var _this = this; - if (this.service) { - var /** @type {?} */ keyupObservable = __WEBPACK_IMPORTED_MODULE_3_rxjs_Observable__["a" /* Observable */] - .fromEvent(this.inputElement.nativeElement, 'keyup') - .filter(function (e) { return _this.isValidCharacterToSearch(e.keyCode); }) - .map(function (e) { return e.currentTarget.value; }) - .distinctUntilChanged() - .do(function () { - _this.shouldMarkLetters = false; - }) - .debounceTime(this.debounceTime); - this.keyupSubscribe = keyupObservable.subscribe(function (value) { - if (value.length >= _this.filterMinlength || !value) { - _this.controlApplyFilter(value); - } - }); - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfComboComponent.prototype.controlApplyFilter = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (!this.isProcessingGetObjectByValue) { - this.applyFilter(value); - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfComboComponent.prototype.applyFilter = /** - * @param {?} value - * @return {?} - */ - function (value) { - var _this = this; - this.isServerSearching = true; - this.controlComboVisibility(false); - var /** @type {?} */ param = { property: this.fieldLabel, value: value }; - this.service.getFilteredData(param).subscribe(function (items) { return _this.setOptionsByApplyFilter(value, items); }); - }; - /** - * @param {?} value - * @param {?} items - * @return {?} - */ - ThfComboComponent.prototype.setOptionsByApplyFilter = /** - * @param {?} value - * @param {?} items - * @return {?} - */ - function (value, items) { - this.shouldMarkLetters = true; - this.isServerSearching = false; - this.options = items; - this.searchForLabel(value, items, this.filterMode); - this.controlComboVisibility(true); - if (this.isFirstFilter) { - this.isFirstFilter = !this.isFirstFilter; - this.cacheOptions = this.options; - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfComboComponent.prototype.getObjectByValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - var _this = this; - if (!this.selectedValue) { - this.isProcessingGetObjectByValue = true; - this.service.getObjectByValue(value).subscribe(function (item) { return _this.updateOptionByFilteredValue(item); }); - } - }; - /** - * @param {?} item - * @return {?} - */ - ThfComboComponent.prototype.updateOptionByFilteredValue = /** - * @param {?} item - * @return {?} - */ - function (item) { - var _this = this; - if (item) { - this.options = [item]; - this.onOptionClick(item); - } - else { - this.updateSelectedValue(null); - } - setTimeout(function () { _this.isProcessingGetObjectByValue = false; }, this.debounceTime); - }; - /** - * @return {?} - */ - ThfComboComponent.prototype.selectPreviousOption = /** - * @return {?} - */ - function () { - if (this.selectedValue) { - this.updateSelectedValue(this.getNextOption(this.selectedValue, this.visibleOptions, true)); - } - else if (this.visibleOptions.length) { - this.updateSelectedValue(this.visibleOptions[this.visibleOptions.length - 1]); - } - }; - /** - * @return {?} - */ - ThfComboComponent.prototype.selectNextOption = /** - * @return {?} - */ - function () { - if (this.selectedValue) { - this.updateSelectedValue(this.getNextOption(this.selectedValue, this.visibleOptions)); - } - else if (this.visibleOptions.length) { - this.updateSelectedValue(this.visibleOptions[0]); - } - }; - /** - * @return {?} - */ - ThfComboComponent.prototype.toggleComboVisibility = /** - * @return {?} - */ - function () { - if (this.disabled) { - return; - } - if (this.service && !this.disabledInitFilter) { - this.applyFilterInFirstClick(); - } - this.controlComboVisibility(!this.comboOpen); - }; - /** - * @return {?} - */ - ThfComboComponent.prototype.applyFilterInFirstClick = /** - * @return {?} - */ - function () { - if (this.isFirstFilter && !this.selectedValue) { - this.applyFilter(''); - } - }; - /** - * @param {?} toOpen - * @return {?} - */ - ThfComboComponent.prototype.controlComboVisibility = /** - * @param {?} toOpen - * @return {?} - */ - function (toOpen) { - this.comboIcon = toOpen ? 'thf-icon-arrow-up' : 'thf-icon-arrow-down'; - if (this.options && this.options.length) { - if (toOpen && !this.selector('.thf-combo-content').classList.contains('thf-combo-show')) { - this.selector('.thf-combo-content').classList.add('thf-combo-show'); - } - else if (!toOpen && this.selector('.thf-combo-content').classList.contains('thf-combo-show')) { - this.selector('.thf-combo-content').classList.remove('thf-combo-show'); - } - } - this.comboOpen = toOpen; - if (toOpen) { - this.inputElement.nativeElement.focus(); - this.scrollTo(this.getIndexSelectedView()); - } - else { - this.isFiltering = false; - } - }; - /** - * @param {?} option - * @return {?} - */ - ThfComboComponent.prototype.onOptionClick = /** - * @param {?} option - * @return {?} - */ - function (option) { - this.updateModel(option); - this.updateComboList(this.options); - this.shouldMarkLetters = false; - }; - /** - * @param {?} index - * @return {?} - */ - ThfComboComponent.prototype.scrollTo = /** - * @param {?} index - * @return {?} - */ - function (index) { - this.scrollTop = (index <= 2) ? 0 : (index * 44) - 88; - }; - /** - * @return {?} - */ - ThfComboComponent.prototype.getInputValue = /** - * @return {?} - */ - function () { - return this.inputElement.nativeElement.value; - }; - /** - * @param {?} value - * @return {?} - */ - ThfComboComponent.prototype.setInputValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - this.inputElement.nativeElement.value = value; - }; - /** - * @param {?} query - * @return {?} - */ - ThfComboComponent.prototype.selector = /** - * @param {?} query - * @return {?} - */ - function (query) { - return this.element.nativeElement.querySelector(query); - }; - /** - * @param {?} event - * @return {?} - */ - ThfComboComponent.prototype.wasClickedOnToggle = /** - * @param {?} event - * @return {?} - */ - function (event) { - if (!this.inputElement.nativeElement.contains(event.target) && - !this.iconElement.nativeElement.contains(event.target) && - this.comboOpen) { - // Esconde Content do Combo quando for clicado fora - this.controlComboVisibility(false); - this.verifyValidOption(); - this.updateComboList(this.options); - } - }; - /** - * @param {?} label - * @return {?} - */ - ThfComboComponent.prototype.getLabelFormatted = /** - * @param {?} label - * @return {?} - */ - function (label) { - var /** @type {?} */ format = label; - if (this.isFiltering || - (this.service && this.getInputValue() && !this.compareObjects(this.cacheOptions, this.visibleOptions) && this.shouldMarkLetters)) { - var /** @type {?} */ labelInput = this.getInputValue().toString().toLowerCase(); - var /** @type {?} */ labelLowerCase = label.toLowerCase(); - var /** @type {?} */ openTagBold = ''; - var /** @type {?} */ closeTagBold = ''; - var /** @type {?} */ startString = void 0; - var /** @type {?} */ middleString = void 0; - var /** @type {?} */ endString = void 0; - switch (this.filterMode) { - case __WEBPACK_IMPORTED_MODULE_8__thf_combo_filter_mode_enum__["a" /* ThfComboFilterMode */].startsWith: - case __WEBPACK_IMPORTED_MODULE_8__thf_combo_filter_mode_enum__["a" /* ThfComboFilterMode */].contains: - startString = label.substring(0, labelLowerCase.indexOf(labelInput)); - middleString = label.substring(labelLowerCase.indexOf(labelInput), labelLowerCase.indexOf(labelInput) + labelInput.length); - endString = label.substring(labelLowerCase.indexOf(labelInput) + labelInput.length); - format = startString + openTagBold + middleString + closeTagBold + endString; - break; - case __WEBPACK_IMPORTED_MODULE_8__thf_combo_filter_mode_enum__["a" /* ThfComboFilterMode */].endsWith: - startString = label.substring(0, labelLowerCase.lastIndexOf(labelInput)); - middleString = label.substring(labelLowerCase.lastIndexOf(labelInput)); - format = startString + openTagBold + middleString + closeTagBold; - break; - } - } - return this.safeHtml(format); - }; - /** - * @param {?} value - * @return {?} - */ - ThfComboComponent.prototype.safeHtml = /** - * @param {?} value - * @return {?} - */ - function (value) { - return this.sanitized.bypassSecurityTrustHtml(value); - }; - /** - * @param {?} keyCode - * @return {?} - */ - ThfComboComponent.prototype.isValidCharacterToSearch = /** - * @param {?} keyCode - * @return {?} - */ - function (keyCode) { - return (keyCode !== 9 && // tab - // tab - keyCode !== 13 && // entet - // entet - keyCode !== 16 && // shift - // shift - keyCode !== 17 && // ctrl - // ctrl - keyCode !== 18 && // alt - // alt - keyCode !== 20 && // capslock - // capslock - keyCode !== 27 && // esc - // esc - keyCode !== 37 && // seta - // seta - keyCode !== 38 && // seta - // seta - keyCode !== 39 && // seta - // seta - keyCode !== 40 && // seta - // seta - keyCode !== 93); // windows menu - }; - ThfComboComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-combo', template: "
    ", - providers: [__WEBPACK_IMPORTED_MODULE_7__thf_combo_filter_service__["a" /* ThfComboFilterService */]] - },] }, - ]; - /** @nocollapse */ - ThfComboComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["W" /* Renderer */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["F" /* IterableDiffers */], }, - { type: __WEBPACK_IMPORTED_MODULE_7__thf_combo_filter_service__["a" /* ThfComboFilterService */], }, - { type: __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser__["c" /* DomSanitizer */], }, - { type: __WEBPACK_IMPORTED_MODULE_2__angular_forms__["g" /* NgControl */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["P" /* Optional */] },] }, - ]; }; - ThfComboComponent.propDecorators = { - "iconElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['icon', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "inputElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['inputElement', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - }; - return ThfComboComponent; -}(__WEBPACK_IMPORTED_MODULE_6__thf_combo_base_component__["a" /* ThfComboBaseComponent */])); - -function ThfComboComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfComboComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfComboComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfComboComponent.propDecorators; - /** @type {?} */ - ThfComboComponent.prototype.iconElement; - /** @type {?} */ - ThfComboComponent.prototype.inputElement; - /** @type {?} */ - ThfComboComponent.prototype.comboOpen; - /** @type {?} */ - ThfComboComponent.prototype.comboIcon; - /** @type {?} */ - ThfComboComponent.prototype.isFiltering; - /** @type {?} */ - ThfComboComponent.prototype.isServerSearching; - /** @type {?} */ - ThfComboComponent.prototype.shouldMarkLetters; - /** @type {?} */ - ThfComboComponent.prototype.isProcessingGetObjectByValue; - /** @type {?} */ - ThfComboComponent.prototype.service; - /** @type {?} */ - ThfComboComponent.prototype.scrollTop; - /** @type {?} */ - ThfComboComponent.prototype.differ; - /** @type {?} */ - ThfComboComponent.prototype.element; - /** @type {?} */ - ThfComboComponent.prototype.differs; - /** @type {?} */ - ThfComboComponent.prototype.defaultService; - /** @type {?} */ - ThfComboComponent.prototype.sanitized; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-datepicker/thf-datepicker-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDatepickerBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__validators__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/validators.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_input_thf_mask__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-input/thf-mask.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@description - * - * O `thf-datepicker` é um componente específico para manipulação de datas permitindo a digitação e / ou seleção. - * - * O formato de exibição da data, ou seja, o formato que é apresentado ao usuário é o dd/mm/yyyy, - * mas podem ser definidos outros padrões (veja mais na propriedade `t-format`). - * - * O idioma padrão do calendário será exibido de acordo com o navegador, caso tenha necessidade de alterar - * use a propriedade `t-locale`. - * - * O datepicker aceita apenas dois formatos de data o ISO-8601 extendido e o Date padrão do Javascript. - * Exemplo: - * - * ``` - * this.date = '2017-11-28T00:00:00-02:00' - * - * this.date = new Date(2017, 10, 28); - * ``` - * - * > O thf-datepicker usa o padrão ISO-8601 extendido internamente, ou seja, o model estará nesse padrão. - * - * Importante: - * - * - Caso a data seja inválida, o model receberá: 'Data inválida'. - * - Caso a data esteja fora do período estabelecido pelas propriedades `t-start` e `t-end`, - * então o model receberá: 'Data fora do período'. - * - Caso o `input` não esteja dentro de um `form`, é preciso adicionar `ngDefaultControl` ao componente, - * por exemplo: - * - * ``` - * - * - * ``` - * - * - Caso o `input` esteja passando um `[(ngModel)]`, mas não tenha um `name`, então irá ocorrer um erro - * do próprio Angular (`[ngModelOptions]="{standalone: true}"`). - * - * Exemplo: - * - * ``` - * - * ``` - * - * > Não esqueça de importar o `FormsModule` em seu módulo, tal como para utilizar o `input default`. - * @abstract - */ -var ThfDatepickerBaseComponent = /** @class */ (function () { - function ThfDatepickerBaseComponent() { - /** - * Mensagem que aparecerá enquanto o campo não estiver preenchido. - */ - this.placeholder = ''; - /** - * Desabilita o campo. - */ - this.disabled = false; - /** - * Torna o elemento somente leitura. - */ - this.readonly = false; - /** - * Faz com que o campo seja obrigatório. - */ - this.required = false; - /** - * Aplica foco ao elemento ao ser iniciado. - */ - this.focus = false; - /** - * Habilita ação para limpar o campo. - */ - this.clean = false; - /** - * Mensagem apresentada quando a data for inválida ou fora do período. - * - * > Esta mensagem não é apresentada quando o campo estiver vazio, mesmo que ele seja obrigatório. - */ - this.errorPattern = ''; - /** - * Evento disparado ao sair do campo. - */ - this.onblur = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento disparado ao alterar valor do campo. - */ - this.onchange = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - this.onChangeModel = null; - this.onTouchedModel = null; - this.firstStart = true; - this.hour = 'T00:00:01-00:00'; - this.readyToValidation = false; - } - Object.defineProperty(ThfDatepickerBaseComponent.prototype, "setDisabled", { - set: /** - * @param {?} disabled - * @return {?} - */ - function (disabled) { - this.disabled = disabled === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(disabled); - this.updateModelToValidate(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfDatepickerBaseComponent.prototype, "setReadonly", { - set: /** - * @param {?} readonly - * @return {?} - */ - function (readonly) { - this.readonly = readonly === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(readonly); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfDatepickerBaseComponent.prototype, "setRequired", { - set: /** - * @param {?} required - * @return {?} - */ - function (required) { - this.required = required === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(required); - this.updateModelToValidate(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfDatepickerBaseComponent.prototype, "setFocus", { - set: /** - * @param {?} focus - * @return {?} - */ - function (focus) { - this.focus = focus === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(focus); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfDatepickerBaseComponent.prototype, "setClean", { - set: /** - * @param {?} clean - * @return {?} - */ - function (clean) { - this.clean = clean === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(clean); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfDatepickerBaseComponent.prototype, "setDateStart", { - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - if (value instanceof Date) { - this.start = new Date(value.getFullYear(), value.getMonth(), value.getDate(), 0, 0, 0); - } - else { - this.start = Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["c" /* convertIsoToDate */])(value, true, false); - } - this.updateModelToValidate(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfDatepickerBaseComponent.prototype, "setDateEnd", { - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - if (value instanceof Date) { - this.end = new Date(value.getFullYear(), value.getMonth(), value.getDate(), 23, 59, 59); - } - else { - this.end = Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["c" /* convertIsoToDate */])(value, false, true); - } - this.updateModelToValidate(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfDatepickerBaseComponent.prototype, "setFormat", { - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - if (value) { - value = value.toLowerCase(); - if (value.match(/dd/) && value.match(/mm/) && value.match(/yyyy/)) { - this.format = value; - return; - } - } - this.format = 'dd/mm/yyyy'; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfDatepickerBaseComponent.prototype, "locale", { - get: /** - * @return {?} - */ - function () { - return this._locale || navigator.language; - }, - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - if (value) { - this._locale = (value && value.length >= 2) ? value : 'pt'; - } - else { - this._locale = navigator.language; - } - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfDatepickerBaseComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - if (!this.format) { - this.format = 'dd/mm/yyyy'; - } - // Classe de máscara - this.objMask = this.buildMask(); - }; - /** - * @return {?} - */ - ThfDatepickerBaseComponent.prototype.ngAfterViewChecked = /** - * @return {?} - */ - function () { - // Seta esta variável para indicar que a tela já foi carregada e podem ser aplicadas as validações a partir desse momento - // A partir desse momento, toda vez que uma propriedade que interfere na validação, for alterada, o model será atualizado - // para que o campo seja validado novamente. - this.readyToValidation = true; - }; - /** - * @return {?} - */ - ThfDatepickerBaseComponent.prototype.updateModelToValidate = /** - * @return {?} - */ - function () { - var _this = this; - if (this.readyToValidation) { - // Este timeout é necessário para quando for atualizado o model e uma propriedade do Datepicker ao mesmo tempo. - // Caso contrário, o writeValue não é disparado, não atualizando o model do componente. - setTimeout(function () { - _this.controlModel(_this.date); - }); - } - }; - // Converte um objeto string em Date - /** - * @param {?} dateString - * @return {?} - */ - ThfDatepickerBaseComponent.prototype.getDateFromString = /** - * @param {?} dateString - * @return {?} - */ - function (dateString) { - var /** @type {?} */ day = parseInt(dateString.substring(this.format.indexOf('d'), this.format.indexOf('d') + 2), 10); - var /** @type {?} */ month = parseInt(dateString.substring(this.format.indexOf('m'), this.format.indexOf('m') + 2), 10) - 1; - var /** @type {?} */ year = parseInt(dateString.substring(this.format.indexOf('y'), this.format.indexOf('y') + 4), 10); - var /** @type {?} */ date = new Date(year, month, day); - return (date.getFullYear() === year && date.getMonth() === month && date.getDate() === day) ? date : null; - }; - // Formata a data. - /** - * @param {?} value - * @return {?} - */ - ThfDatepickerBaseComponent.prototype.formatToDate = /** - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ dateFormatted = this.format; - dateFormatted = dateFormatted.replace('dd', ('0' + value.getDate()).slice(-2)); - dateFormatted = dateFormatted.replace('mm', ('0' + (value.getMonth() + 1)).slice(-2)); - dateFormatted = dateFormatted.replace('yyyy', String(value.getFullYear())); - return dateFormatted; - }; - // Método responsável por controlar o modelo. - /** - * @param {?} date - * @return {?} - */ - ThfDatepickerBaseComponent.prototype.controlModel = /** - * @param {?} date - * @return {?} - */ - function (date) { - if (date) { - if (this.start && this.end) { - this.validateModel((date >= this.start && date <= this.end), date); - } - if (this.start && !this.end) { - this.validateModel((date >= this.start), date); - } - if (this.end && !this.start) { - this.validateModel((date <= this.end), date); - } - if (!this.start && !this.end) { - this.date = date; - this.callOnChange(Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["b" /* convertDateToISOExtended */])(this.date, this.hour)); - } - } - else { - this.date = date; - if (date === undefined) { - this.callOnChange(''); - } - else { - this.callOnChange('Data Inválida'); - } - } - }; - /** - * @param {?} dateValid - * @param {?} date - * @return {?} - */ - ThfDatepickerBaseComponent.prototype.validateModel = /** - * @param {?} dateValid - * @param {?} date - * @return {?} - */ - function (dateValid, date) { - if (dateValid) { - this.date = date; - this.callOnChange(Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["b" /* convertDateToISOExtended */])(this.date, this.hour)); - } - else { - this.date = date; - this.callOnChange('Data fora do período'); - } - }; - // Executa a função onChange - /** - * @param {?} value - * @return {?} - */ - ThfDatepickerBaseComponent.prototype.callOnChange = /** - * @param {?} value - * @return {?} - */ - function (value) { - // Quando o input não possui um formulário, então esta função não é registrada - if (this.onChangeModel) { - this.onChangeModel(value); - } - }; - // Função implementada do ControlValueAccessor - // Usada para interceptar as mudanças e não atualizar automaticamente o Model - /** - * @param {?} func - * @return {?} - */ - ThfDatepickerBaseComponent.prototype.registerOnChange = /** - * @param {?} func - * @return {?} - */ - function (func) { - this.onChangeModel = func; - }; - // Função implementada do ControlValueAccessor - // Usada para interceptar as mudanças e não atualizar automaticamente o Model - /** - * @param {?} func - * @return {?} - */ - ThfDatepickerBaseComponent.prototype.registerOnTouched = /** - * @param {?} func - * @return {?} - */ - function (func) { - this.onTouchedModel = func; - }; - // Retorna um objeto do tipo ThfMask com a mascara configurada. - /** - * @return {?} - */ - ThfDatepickerBaseComponent.prototype.buildMask = /** - * @return {?} - */ - function () { - var /** @type {?} */ mask = this.format.toUpperCase(); - mask = mask.replace(/DD/g, '99'); - mask = mask.replace(/MM/g, '99'); - mask = mask.replace(/YYYY/g, '9999'); - return new __WEBPACK_IMPORTED_MODULE_3__thf_input_thf_mask__["a" /* ThfMask */](mask, true); - }; - /** - * @param {?} c - * @return {?} - */ - ThfDatepickerBaseComponent.prototype.validate = /** - * @param {?} c - * @return {?} - */ - function (c) { - if (Object(__WEBPACK_IMPORTED_MODULE_1__validators__["a" /* dateFailed */])(c.value)) { - return { date: { - valid: false, - } }; - } - if (Object(__WEBPACK_IMPORTED_MODULE_1__validators__["g" /* requiredFailed */])(this.required, this.disabled, c.value)) { - return { required: { - valid: false, - } }; - } - return null; - }; - ThfDatepickerBaseComponent.propDecorators = { - "name": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['name',] },], - "placeholder": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-placeholder',] },], - "setDisabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled',] },], - "setReadonly": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-readonly',] },], - "setRequired": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-required',] },], - "setFocus": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-focus',] },], - "setClean": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-clean',] },], - "errorPattern": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-error-pattern',] },], - "setDateStart": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-start',] },], - "setDateEnd": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-end',] },], - "setFormat": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-format',] },], - "locale": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-locale',] },], - "onblur": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-blur',] },], - "onchange": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change',] },], - }; - return ThfDatepickerBaseComponent; -}()); - -function ThfDatepickerBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfDatepickerBaseComponent.propDecorators; - /** @type {?} */ - ThfDatepickerBaseComponent.prototype.name; - /** - * Mensagem que aparecerá enquanto o campo não estiver preenchido. - * @type {?} - */ - ThfDatepickerBaseComponent.prototype.placeholder; - /** - * Desabilita o campo. - * @type {?} - */ - ThfDatepickerBaseComponent.prototype.disabled; - /** - * Torna o elemento somente leitura. - * @type {?} - */ - ThfDatepickerBaseComponent.prototype.readonly; - /** - * Faz com que o campo seja obrigatório. - * @type {?} - */ - ThfDatepickerBaseComponent.prototype.required; - /** - * Aplica foco ao elemento ao ser iniciado. - * @type {?} - */ - ThfDatepickerBaseComponent.prototype.focus; - /** - * Habilita ação para limpar o campo. - * @type {?} - */ - ThfDatepickerBaseComponent.prototype.clean; - /** - * Mensagem apresentada quando a data for inválida ou fora do período. - * - * > Esta mensagem não é apresentada quando o campo estiver vazio, mesmo que ele seja obrigatório. - * @type {?} - */ - ThfDatepickerBaseComponent.prototype.errorPattern; - /** - * Atribui uma data mínima. - * @type {?} - */ - ThfDatepickerBaseComponent.prototype.start; - /** - * Atribui uma data máxima. - * @type {?} - */ - ThfDatepickerBaseComponent.prototype.end; - /** - * Formato de exibição da data. - * - * Valores válidos: - * - `dd/mm/yyyy` - * - `mm/dd/yyyy` - * - `yyyy/mm/dd` - * @type {?} - */ - ThfDatepickerBaseComponent.prototype.format; - /** - * \@optional - * - * \@description - * - * Idioma do Datepicker. - * - * Valores válidos: - * - `pt` - * - `en` - * - `es` - * @type {?} - */ - ThfDatepickerBaseComponent.prototype._locale; - /** - * Evento disparado ao sair do campo. - * @type {?} - */ - ThfDatepickerBaseComponent.prototype.onblur; - /** - * Evento disparado ao alterar valor do campo. - * @type {?} - */ - ThfDatepickerBaseComponent.prototype.onchange; - /** @type {?} */ - ThfDatepickerBaseComponent.prototype.date; - /** @type {?} */ - ThfDatepickerBaseComponent.prototype.onChangeModel; - /** @type {?} */ - ThfDatepickerBaseComponent.prototype.onTouchedModel; - /** @type {?} */ - ThfDatepickerBaseComponent.prototype.objMask; - /** @type {?} */ - ThfDatepickerBaseComponent.prototype.firstStart; - /** @type {?} */ - ThfDatepickerBaseComponent.prototype.hour; - /** @type {?} */ - ThfDatepickerBaseComponent.prototype.readyToValidation; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfDatepickerBaseComponent.prototype.writeValue = function (value) { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-datepicker/thf-datepicker.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDatepickerComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_datepicker_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-datepicker/thf-datepicker-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_calendar_thf_calendar_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-calendar/thf-calendar.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - -/** - * \@docsExtends ThfDatepickerBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfDatepickerComponent = /** @class */ (function (_super) { - __extends(ThfDatepickerComponent, _super); - function ThfDatepickerComponent(renderer, el) { - var _this = _super.call(this) || this; - _this.date = new Date(); - _this.isoRegex = new RegExp('^(?:19|20)\\d{2}-' + - '(?:0[1-9]|1[0-2])-' + - '(?:0[1-9]|[12]\\d|3[01])' + - 'T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:Z|-0[1-9]|-1\\d|-2[0-3]|' + - '-00:?(?:0[1-9]|[1-5]\\d)|\\+[01]\\d|\\+2[0-3])' + - '(?:|:?[0-5]\\d)$'); - _this.el = el; - _this.clickListener = renderer.listenGlobal('document', 'click', function (event) { return _this.wasClickedOnPicker(event); }); - return _this; - } - /** - * @return {?} - */ - ThfDatepickerComponent.prototype.ngAfterViewInit = /** - * @return {?} - */ - function () { - // Põe o foco no Input, setado pelo t-focus - if (this.focus) { - this.inputEl.nativeElement.focus(); - } - this.setPaddingInput(); - }; - /** - * @return {?} - */ - ThfDatepickerComponent.prototype.setPaddingInput = /** - * @return {?} - */ - function () { - var _this = this; - setTimeout(function () { - var /** @type {?} */ selectorIcons = '.thf-field-icon-container:not(.thf-field-icon-container-left) > .thf-icon'; - var /** @type {?} */ icons = _this.el.nativeElement.querySelectorAll(selectorIcons).length; - if (_this.clean) { - icons++; - } - if (icons) { - _this.inputEl.nativeElement.style.paddingRight = icons * 36 + "px"; - } - }); - }; - /** - * @return {?} - */ - ThfDatepickerComponent.prototype.ngOnDestroy = /** - * @return {?} - */ - function () { - this.clickListener(); - }; - /** - * @return {?} - */ - ThfDatepickerComponent.prototype.togglePicker = /** - * @return {?} - */ - function () { - var /** @type {?} */ datepickerEl = this.dialogPicker.nativeElement; - if (this.disabled || this.readonly) { - return; - } - if (datepickerEl.classList.contains('thf-invisible')) { - var /** @type {?} */ scrollInit = document.body.scrollWidth; - // Primeiro joga o Datepicker na posição inicial - // Em seguida, verifica se vai estourar o tamanho da tela - datepickerEl.style.marginLeft = '0px'; - datepickerEl.classList.remove('thf-invisible'); - this.picker.init(); - // Se estourar o tamanho da tela, então alinha o Datepicker à direita do componente - /* istanbul ignore if */ - if (document.body.scrollWidth !== scrollInit) { - // Ignorado teste devido a necessidade de testar em uma tela menor - datepickerEl.style.marginLeft = (this.inputEl.nativeElement.offsetWidth - 288) + 'px'; - } - } - else { - datepickerEl.classList.add('thf-invisible'); - this.inputEl.nativeElement.disabled = false; - } - }; - /** - * @return {?} - */ - ThfDatepickerComponent.prototype.dateSelected = /** - * @return {?} - */ - function () { - this.inputEl.nativeElement.focus(); - this.inputEl.nativeElement.value = this.formatToDate(this.date); - this.callOnChange(Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["b" /* convertDateToISOExtended */])(this.date, this.hour)); - this.dialogPicker.nativeElement.classList.add('thf-invisible'); - }; - // Esconde Picker quando for clicado fora - /** - * @param {?} event - * @return {?} - */ - ThfDatepickerComponent.prototype.wasClickedOnPicker = /** - * @param {?} event - * @return {?} - */ - function (event) { - if (!this.dialogPicker || !this.iconDatepicker) { - return; - } - /* istanbul ignore else */ - if ((!this.dialogPicker.nativeElement.contains(event.target) || this.hasOverlayClass(event.target)) && - !this.iconDatepicker.nativeElement.contains(event.target)) { - this.dialogPicker.nativeElement.classList.add('thf-invisible'); - } - }; - /** - * @param {?} $event - * @return {?} - */ - ThfDatepickerComponent.prototype.onKeyup = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - if (this.readonly) { - return; - } - this.objMask.keyup($event); - // Controla a atualização do model, verificando se a data é valida - if (this.objMask.valueToModel || this.objMask.valueToModel === '') { - if (this.objMask.valueToModel.length >= 10) { - this.controlModel(this.getDateFromString(this.inputEl.nativeElement.value)); - this.date = this.getDateFromString(this.inputEl.nativeElement.value); - } - else { - this.date = undefined; - this.controlModel(this.date); - } - } - else { - this.date = undefined; - } - }; - /** - * @param {?=} $event - * @return {?} - */ - ThfDatepickerComponent.prototype.onKeydown = /** - * @param {?=} $event - * @return {?} - */ - function ($event) { - if (this.readonly) { - return; - } - this.objMask.keydown($event); - }; - /** - * @return {?} - */ - ThfDatepickerComponent.prototype.hasInvalidClass = /** - * @return {?} - */ - function () { - return (this.el.nativeElement.classList.contains('ng-invalid') && - this.el.nativeElement.classList.contains('ng-dirty') && - this.inputEl.nativeElement.value !== ''); - }; - /** - * @return {?} - */ - ThfDatepickerComponent.prototype.getErrorPattern = /** - * @return {?} - */ - function () { - return (this.errorPattern !== '' && this.hasInvalidClass()) ? this.errorPattern : ''; - }; - // Função disparada quando clicado no thf-clean. - // Atualiza o model para vazio - /** - * @return {?} - */ - ThfDatepickerComponent.prototype.clear = /** - * @return {?} - */ - function () { - this.callOnChange(''); - this.date = undefined; - if (this.required) { - this.controlModel(this.date); - } - this.controlChangeEmitter(); - }; - /** - * @param {?} $event - * @return {?} - */ - ThfDatepickerComponent.prototype.eventOnBlur = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - if (!Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["h" /* isMobile */])()) { - this.objMask.blur($event); - this.onblur.emit(); - this.controlChangeEmitter(); - if (this.objMask.valueToModel) { - if (this.objMask.valueToModel.length >= 10) { - this.controlModel(this.getDateFromString(this.inputEl.nativeElement.value)); - this.date = this.getDateFromString(this.inputEl.nativeElement.value); - } - else { - this.date = undefined; - this.controlModel(this.date); - } - } - else { - this.date = undefined; - } - } - }; - /** - * @param {?} $event - * @return {?} - */ - ThfDatepickerComponent.prototype.eventOnChange = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - if (Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["h" /* isMobile */])()) { - this.controlModel(this.inputEl.nativeElement.value); - this.callOnChange(this.inputEl.nativeElement.value); - } - this.onchange.emit(); - }; - /** - * @param {?} $event - * @return {?} - */ - ThfDatepickerComponent.prototype.eventOnClick = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - var _this = this; - if (Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["h" /* isMobile */])()) { - $event.target.blur(); - // abre o calendar quando clicar no input somente no mobile - setTimeout(function () { return _this.togglePicker(); }, 0); - } - else { - // Atualiza a posição do cursor ao clicar - this.objMask.click($event); - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfDatepickerComponent.prototype.formatToDate = /** - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ dateFormatted = this.format; - dateFormatted = dateFormatted.replace('dd', ('0' + value.getDate()).slice(-2)); - dateFormatted = dateFormatted.replace('mm', ('0' + (value.getMonth() + 1)).slice(-2)); - dateFormatted = dateFormatted.replace('yyyy', String(value.getFullYear())); - return dateFormatted; - }; - // Função implementada do ControlValueAccessor - /** - * @param {?} value - * @return {?} - */ - ThfDatepickerComponent.prototype.writeValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (this.inputEl && value) { - if (value instanceof Date) { - var /** @type {?} */ dateString = value.toString(); - this.hour = 'T' + dateString.substring(16, 24) + dateString.substring(28, 31) + ':' + dateString.substring(31, 33); - this.date = value; - this.inputEl.nativeElement.value = this.formatToDate(value); - } - else if (this.isValidExtendedIso(value)) { - this.hour = value.substring(10, 25); - var /** @type {?} */ day = parseInt(value.substring(8, 10), 10); - var /** @type {?} */ month = parseInt(value.substring(5, 7), 10) - 1; - var /** @type {?} */ year = parseInt(value.substring(0, 4), 10); - var /** @type {?} */ dateTemp = new Date(year, month, day); - this.date = dateTemp; - this.inputEl.nativeElement.value = this.formatToDate(dateTemp); - } - else { - this.inputEl.nativeElement.value = ''; - this.date = undefined; - } - this.controlModel(this.date); - } - else if (this.inputEl) { - this.inputEl.nativeElement.value = ''; - this.date = undefined; - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfDatepickerComponent.prototype.isValidExtendedIso = /** - * @param {?} value - * @return {?} - */ - function (value) { - return this.isoRegex.test(value); - }; - /** - * @param {?} element - * @return {?} - */ - ThfDatepickerComponent.prototype.hasOverlayClass = /** - * @param {?} element - * @return {?} - */ - function (element) { - return element.classList.contains('thf-calendar-overlay'); - }; - /** - * @param {?} $event - * @return {?} - */ - ThfDatepickerComponent.prototype.eventOnFocus = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - this.valueBeforeChange = this.inputEl.nativeElement.value; - }; - /** - * @return {?} - */ - ThfDatepickerComponent.prototype.controlChangeEmitter = /** - * @return {?} - */ - function () { - var _this = this; - if (this.inputEl.nativeElement.value !== this.valueBeforeChange) { - clearTimeout(this.timeoutChange); - this.timeoutChange = setTimeout(function () { - _this.onchange.emit(); - }, 200); - } - }; - ThfDatepickerComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-datepicker', template: "
    ", - providers: [ - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["f" /* NG_VALUE_ACCESSOR */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfDatepickerComponent; }), - multi: true, - }, - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["e" /* NG_VALIDATORS */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfDatepickerComponent; }), - multi: true, - } - ] - },] }, - ]; - /** @nocollapse */ - ThfDatepickerComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["W" /* Renderer */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - ThfDatepickerComponent.propDecorators = { - "dialogPicker": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['dialogPicker', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "iconDatepicker": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['iconDatepicker', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "inputEl": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['inp', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "picker": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['picker',] },], - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "help": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-help',] },], - "onKeyup": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["z" /* HostListener */], args: ['keyup', ['$event'],] },], - "onKeydown": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["z" /* HostListener */], args: ['keydown', ['$event'],] },], - }; - return ThfDatepickerComponent; -}(__WEBPACK_IMPORTED_MODULE_3__thf_datepicker_base_component__["a" /* ThfDatepickerBaseComponent */])); - -function ThfDatepickerComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDatepickerComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDatepickerComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfDatepickerComponent.propDecorators; - /** @type {?} */ - ThfDatepickerComponent.prototype.date; - /** @type {?} */ - ThfDatepickerComponent.prototype.el; - /** @type {?} */ - ThfDatepickerComponent.prototype.hour; - /** @type {?} */ - ThfDatepickerComponent.prototype.clickListener; - /** @type {?} */ - ThfDatepickerComponent.prototype.isoRegex; - /** @type {?} */ - ThfDatepickerComponent.prototype.timeoutChange; - /** @type {?} */ - ThfDatepickerComponent.prototype.valueBeforeChange; - /** @type {?} */ - ThfDatepickerComponent.prototype.dialogPicker; - /** @type {?} */ - ThfDatepickerComponent.prototype.iconDatepicker; - /** @type {?} */ - ThfDatepickerComponent.prototype.inputEl; - /** @type {?} */ - ThfDatepickerComponent.prototype.picker; - /** - * Rótulo do campo. - * @type {?} - */ - ThfDatepickerComponent.prototype.label; - /** - * Texto de apoio do campo. - * @type {?} - */ - ThfDatepickerComponent.prototype.help; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-decimal/thf-decimal.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDecimalComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_input_thf_input_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-input/thf-input-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -var /** @type {?} */ THF_DECIMAL_DEFAULT_DECIMALS_LENGTH = 2; -var /** @type {?} */ THF_DECIMAL_DEFAULT_THOUSAND_MAXLENGTH = 13; -/** - * - * \@docsExtends ThfInputBaseComponent - * - * \@description - * - * thf-decimal é um input específico para receber apenas números decimais. - * Quando utilizado, o componente terá comportamento de um campo de 'text' com algumas características: - * - * - Aceita apenas números; - * - Utiliza ',' como separador de decimal; - * - Utiliza '.' para separação de milhar; - * - É possível configurar a quantidade de casas decimais e a quantidade de digitos do campo. - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfDecimalComponent = /** @class */ (function (_super) { - __extends(ThfDecimalComponent, _super); - function ThfDecimalComponent(el) { - var _this = _super.call(this) || this; - _this.el = el; - _this._decimalsLength = THF_DECIMAL_DEFAULT_DECIMALS_LENGTH; - _this._thousandMaxlength = THF_DECIMAL_DEFAULT_THOUSAND_MAXLENGTH; - _this.decimalSeparator = ','; - _this.fireChange = false; - _this.isKeyboardAndroid = false; - _this.minusSign = '-'; - _this.oldDotsLength = null; - _this.thousandSeparator = '.'; - _this.regex = { - thousand: new RegExp('\\' + '.', 'g'), - decimal: new RegExp('\\' + ',', 'g') - }; - _this.isKeyboardAndroid = !!navigator.userAgent.match(/Android/i); - return _this; - } - Object.defineProperty(ThfDecimalComponent.prototype, "decimalsLength", { - get: /** - * @return {?} - */ - function () { - return this._decimalsLength; - }, - set: /** - * \@optional - * - * \@description - * - * Quantidade máxima de casas decimais. - * - * \@default `2` - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ decimalsLength = Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["e" /* convertToInt */])(value); - this._decimalsLength = decimalsLength || decimalsLength === 0 ? decimalsLength : THF_DECIMAL_DEFAULT_DECIMALS_LENGTH; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfDecimalComponent.prototype, "thousandMaxlength", { - get: /** - * @return {?} - */ - function () { - return this._thousandMaxlength; - }, - set: /** - * \@optional - * - * \@description - * - * Número máximo de dígitos antes do separador de decimal. O valor máximo possível deve ser menor ou igual a 13. - * - * \@default `13` - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ thousandMaxlength = Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["e" /* convertToInt */])(value); - var /** @type {?} */ isInteger = Number.isInteger(thousandMaxlength); - this._thousandMaxlength = isInteger && thousandMaxlength <= THF_DECIMAL_DEFAULT_THOUSAND_MAXLENGTH ? - thousandMaxlength : THF_DECIMAL_DEFAULT_THOUSAND_MAXLENGTH; - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfDecimalComponent.prototype.ngAfterViewInit = /** - * @return {?} - */ - function () { - this.putFocus(); - this.setPaddingInput(); - }; - /** - * @param {?} value - * @return {?} - */ - ThfDecimalComponent.prototype.clear = /** - * @param {?} value - * @return {?} - */ - function (value) { - this.callOnChange(value); - this.controlChangeEmitter(); - }; - /** - * @param {?} c - * @return {?} - */ - ThfDecimalComponent.prototype.extraValidation = /** - * @param {?} c - * @return {?} - */ - function (c) { - return null; - }; - /** - * @return {?} - */ - ThfDecimalComponent.prototype.getScreenValue = /** - * @return {?} - */ - function () { - return (this.inputEl) ? this.inputEl.nativeElement.value : ''; - }; - /** - * @return {?} - */ - ThfDecimalComponent.prototype.hasInvalidClass = /** - * @return {?} - */ - function () { - return (this.el.nativeElement.classList.contains('ng-invalid') && - this.el.nativeElement.classList.contains('ng-dirty') && - this.getScreenValue() !== ''); - }; - /** - * @param {?=} value - * @return {?} - */ - ThfDecimalComponent.prototype.hasLetters = /** - * @param {?=} value - * @return {?} - */ - function (value) { - if (value === void 0) { value = ''; } - return value.match(/[a-zA-Z:;+=_´^~"'@#$%¨&*()/\\|]+/); - }; - /** - * @param {?} event - * @return {?} - */ - ThfDecimalComponent.prototype.isValidNumber = /** - * @param {?} event - * @return {?} - */ - function (event) { - // - event.key não existia em alguns browsers, como Samsung browser e Firefox. - var /** @type {?} */ keyValue = /** @type {?} */ (String.fromCharCode(event.which)); - var /** @type {?} */ validKey = event.which !== 8 && event.which !== 0; - return !this.hasLetters(keyValue) && validKey; - }; - // função responsável por adicionar os zeroes com as casa decimais ao sair do campo. - /** - * @param {?} e - * @return {?} - */ - ThfDecimalComponent.prototype.onBlur = /** - * @param {?} e - * @return {?} - */ - function (e) { - var /** @type {?} */ value = e.target.value; - if (value) { - if (this.hasLetters(value)) { - this.setViewValue(''); - this.callOnChange(undefined); - return; - } - var /** @type {?} */ valueWithoutThousandSeparator = this.formatValueWithoutThousandSeparator(value); - this.setViewValue(this.formatToViewValue(valueWithoutThousandSeparator)); - } - this.blur.emit(); - this.controlChangeEmitter(); - }; - /** - * @param {?} e - * @return {?} - */ - ThfDecimalComponent.prototype.onFocus = /** - * @param {?} e - * @return {?} - */ - function (e) { - // Atualiza valor da variável que será usada para verificar se o campo teve alteração - this.valueBeforeChange = this.getScreenValue(); - // Dispara evento quando o usuário entrar no campo - // Este evento também é disparado quando o campo inicia com foco. - this.enter.emit(); - }; - /** - * @param {?} event - * @return {?} - */ - ThfDecimalComponent.prototype.onInput = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ selectionStart = event.target.selectionStart; - var /** @type {?} */ selectionEnd = event.target.selectionEnd; - var /** @type {?} */ modelValue; - var /** @type {?} */ viewValue; - // - Browsers nativos do Android ex: Samsung Browser. - if (this.isKeyboardAndroid) { - this.onInputKeyboardAndroid(event); - } - modelValue = this.formatValueWithoutThousandSeparator(event.target.value); - modelValue = this.addZeroBefore(modelValue); - viewValue = this.formatMask(modelValue); - this.setViewValue(viewValue); - this.setCursorInput(event, selectionStart, selectionEnd); - this.callOnChange(this.formatToModelValue(modelValue)); - }; - /** - * @param {?} event - * @return {?} - */ - ThfDecimalComponent.prototype.onInputKeyboardAndroid = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ inputValue = event.target.value; - var /** @type {?} */ selectionStart = event.target.selectionStart; - var /** @type {?} */ hasLetters = this.hasLetters(inputValue); - if (hasLetters) { - this.setViewValue(inputValue.replace(hasLetters[0], '')); - return event.preventDefault(); - } - else { - var /** @type {?} */ position = selectionStart - 1; - var /** @type {?} */ key = inputValue.charAt(position); - this.setPositionValue(event); - if (this.isValidKey(event, key)) { - this.setViewValue(inputValue); - } - } - }; - /** - * @param {?} e - * @return {?} - */ - ThfDecimalComponent.prototype.onKeyPress = /** - * @param {?} e - * @return {?} - */ - function (e) { - this.isValidKey(e); - }; - /** - * @return {?} - */ - ThfDecimalComponent.prototype.setPaddingInput = /** - * @return {?} - */ - function () { - var _this = this; - setTimeout(function () { - var /** @type {?} */ selectorIcons = '.thf-field-icon-container:not(.thf-field-icon-container-left) > .thf-icon'; - var /** @type {?} */ icons = _this.el.nativeElement.querySelectorAll(selectorIcons).length; - if (_this.clean) { - icons++; - } - if (icons) { - _this.inputEl.nativeElement.style.paddingRight = icons * 36 + "px"; - } - }); - }; - /** - * @param {?} value - * @return {?} - */ - ThfDecimalComponent.prototype.writeValueModel = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (this.inputEl) { - if (value || value === 0) { - var /** @type {?} */ formatedViewValue = this.formatToViewValue(value); - this.setViewValue(formatedViewValue); - } - else { - this.setViewValue(''); - } - } - if (value) { - this.change.emit(); - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfDecimalComponent.prototype.addZeroBefore = /** - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ isDecimalSeparator = value === this.decimalSeparator; - return isDecimalSeparator ? "0" + value : value; - }; - /** - * @param {?} value - * @return {?} - */ - ThfDecimalComponent.prototype.containsComma = /** - * @param {?} value - * @return {?} - */ - function (value) { - return value.includes(this.decimalSeparator); - }; - /** - * @return {?} - */ - ThfDecimalComponent.prototype.controlChangeEmitter = /** - * @return {?} - */ - function () { - var _this = this; - // Emite o evento change manualmente quando o campo é alterado - // Este evento é controlado manualmente devido ao preventDefault existente na máscara - // e devido ao controle do t-clean, que também precisa emitir change - if (this.getScreenValue() !== this.valueBeforeChange) { - this.fireChange = true; - setTimeout(function () { - if (_this.fireChange) { - _this.change.emit(); - } - }, 200); - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfDecimalComponent.prototype.formatMask = /** - * @param {?} value - * @return {?} - */ - function (value) { - // necessário para não adicionar . nas casa decimais. - // por exemplo: 12.345,123.45 (errado) - // 12.345,12345 (correto) - if (value.match(this.regex.decimal)) { - var /** @type {?} */ regex = new RegExp('(\\d)(?=(\\d{3})+(?!\\d),)', 'g'); - return value.toString().replace(regex, '$1.'); - } - return value.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1.'); - }; - /** - * @param {?} value - * @return {?} - */ - ThfDecimalComponent.prototype.formatToModelValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ formattedValue = this.replaceCommaToDot(value); - var /** @type {?} */ parsedValue = parseFloat(formattedValue); - var /** @type {?} */ modelValue = parsedValue === 0 || parsedValue ? parsedValue : undefined; - return modelValue; - }; - /** - * @param {?} value - * @return {?} - */ - ThfDecimalComponent.prototype.formatToViewValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ formatedNumber, /** @type {?} */ - numberValue, /** @type {?} */ - valueBeforeDot, /** @type {?} */ - valueAfterDot; - // - Necessário para tratar valores que contenham decimalSeparator - value = this.replaceCommaToDot(value); - numberValue = Number(value).toFixed(this.decimalsLength); - valueBeforeDot = this.getValueBeforeSeparator(numberValue, this.thousandSeparator); - valueAfterDot = this.getValueAfterSeparator(numberValue, this.thousandSeparator); - formatedNumber = this.formatMask(valueBeforeDot); - if (this.decimalsLength === 0) { - return formatedNumber; - } - else { - return formatedNumber + this.decimalSeparator + valueAfterDot; - } - }; - /** - * @param {?=} value - * @return {?} - */ - ThfDecimalComponent.prototype.formatValueWithoutThousandSeparator = /** - * @param {?=} value - * @return {?} - */ - function (value) { - if (value === void 0) { value = ''; } - return value.toString().replace(this.regex.thousand, ''); - }; - /** - * @param {?=} value - * @param {?=} separator - * @return {?} - */ - ThfDecimalComponent.prototype.getValueAfterSeparator = /** - * @param {?=} value - * @param {?=} separator - * @return {?} - */ - function (value, separator) { - if (value === void 0) { value = ''; } - return value.split(separator)[1] || ''; - }; - /** - * @param {?=} value - * @param {?=} separator - * @return {?} - */ - ThfDecimalComponent.prototype.getValueBeforeSeparator = /** - * @param {?=} value - * @param {?=} separator - * @return {?} - */ - function (value, separator) { - if (value === void 0) { value = ''; } - return value.split(separator)[0] || ''; - }; - /** - * @param {?} value - * @return {?} - */ - ThfDecimalComponent.prototype.hasLessDot = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (value) { - var /** @type {?} */ dots = value.match(this.regex.thousand), /** @type {?} */ - dotsLength = dots && dots.length; - if (dotsLength < this.oldDotsLength) { - this.oldDotsLength = dotsLength; - return true; - } - } - if (!value) { - this.oldDotsLength = null; - } - return false; - }; - /** - * @param {?} value - * @return {?} - */ - ThfDecimalComponent.prototype.hasMoreDot = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (value) { - var /** @type {?} */ dots = value.match(this.regex.thousand), /** @type {?} */ - dotsLength = dots && dots.length; - if (dotsLength > this.oldDotsLength) { - this.oldDotsLength = dotsLength; - return true; - } - } - if (!value) { - this.oldDotsLength = null; - } - return false; - }; - /** - * @param {?} event - * @return {?} - */ - ThfDecimalComponent.prototype.hasMinusSignInvalidPosition = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ keyIsMinusSign = event.key === this.minusSign; - var /** @type {?} */ selectionStart = event.target.selectionStart; - return keyIsMinusSign && selectionStart !== 0; - }; - /** - * @param {?} event - * @return {?} - */ - ThfDecimalComponent.prototype.isKeyDecimalSeparator = /** - * @param {?} event - * @return {?} - */ - function (event) { - return event.key === this.decimalSeparator || event.char === this.decimalSeparator; - }; - /** - * @param {?} positionCursor - * @param {?} value - * @return {?} - */ - ThfDecimalComponent.prototype.isPositionAfterDecimalSeparator = /** - * @param {?} positionCursor - * @param {?} value - * @return {?} - */ - function (positionCursor, value) { - var /** @type {?} */ indexComma = value && value.indexOf(this.decimalSeparator); - if (indexComma && this.decimalsLength > 0) { - return positionCursor > indexComma; - } - }; - /** - * @param {?} target - * @return {?} - */ - ThfDecimalComponent.prototype.isSelectionStartDifferentSelectionEnd = /** - * @param {?} target - * @return {?} - */ - function (target) { - return target.selectionStart !== target.selectionEnd; - }; - /** - * @param {?} event - * @param {?=} key - * @return {?} - */ - ThfDecimalComponent.prototype.isValidKey = /** - * @param {?} event - * @param {?=} key - * @return {?} - */ - function (event, key) { - var /** @type {?} */ isInvalidNumber = !this.isValidNumber(event); - var /** @type {?} */ validKey = event.which === 8 || event.which === 0; - if (validKey && !this.isKeyboardAndroid) { - return; - } - if (key) { - event.key = key; - } - if (this.verifyInsertComma(event) || this.verifyThousandLength(event) || - this.verifyValueAfterComma(event) || this.verifyInsertMinusSign(event) || - this.hasMinusSignInvalidPosition(event) || isInvalidNumber || - this.validateCursorPositionBeforeSeparator(event)) { - event.preventDefault(); - return false; - } - return true; - }; - /** - * @return {?} - */ - ThfDecimalComponent.prototype.putFocus = /** - * @return {?} - */ - function () { - if (this.focus) { - this.inputEl.nativeElement.focus(); - } - }; - /** - * @param {?} target - * @param {?} selectionStart - * @param {?} selectionEnd - * @return {?} - */ - ThfDecimalComponent.prototype.setInitialSelectionRange = /** - * @param {?} target - * @param {?} selectionStart - * @param {?} selectionEnd - * @return {?} - */ - function (target, selectionStart, selectionEnd) { - if (selectionStart === 1 && selectionEnd === 1) { - return target.setSelectionRange(selectionStart + 1, selectionEnd + 1); - } - return target.setSelectionRange(selectionStart - 1, selectionEnd - 1); - }; - /** - * @param {?} value - * @param {?} index - * @param {?} replace - * @return {?} - */ - ThfDecimalComponent.prototype.replaceAt = /** - * @param {?} value - * @param {?} index - * @param {?} replace - * @return {?} - */ - function (value, index, replace) { - return value.substring(0, index) + replace + value.substring(index + 1); - }; - /** - * @param {?=} value - * @return {?} - */ - ThfDecimalComponent.prototype.replaceCommaToDot = /** - * @param {?=} value - * @return {?} - */ - function (value) { - if (value === void 0) { value = ''; } - return value.toString().replace(this.regex.decimal, '.'); - }; - /** - * @param {?} event - * @param {?} selectionStart - * @param {?} selectionEnd - * @return {?} - */ - ThfDecimalComponent.prototype.setCursorInput = /** - * @param {?} event - * @param {?} selectionStart - * @param {?} selectionEnd - * @return {?} - */ - function (event, selectionStart, selectionEnd) { - var /** @type {?} */ target = event.target; - var /** @type {?} */ viewValue = target.value; - // Caso houver mais . do que anteriormente soma o valor com 1. - if (this.hasMoreDot(viewValue) || viewValue === ('0' + this.decimalSeparator)) { - return target.setSelectionRange(selectionStart + 1, selectionEnd + 1); - } - // Caso houver menos . do que anteriormente subtrai o valor por 1. - if (this.hasLessDot(viewValue)) { - this.setInitialSelectionRange(target, selectionStart, selectionEnd); - } - return target.setSelectionRange(selectionStart, selectionEnd); - }; - /** - * @param {?} event - * @return {?} - */ - ThfDecimalComponent.prototype.setPositionValue = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ value = event.target.value; - var /** @type {?} */ position = event.target.selectionStart - 1; - if (position > 0 && event.key === this.minusSign) { - event.target.value = value.substring(0, position) + value.substr(position + 1); - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfDecimalComponent.prototype.setViewValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - this.inputEl.nativeElement.value = value; - }; - /** - * @param {?} event - * @return {?} - */ - ThfDecimalComponent.prototype.validateCursorPositionBeforeSeparator = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ target = event.target; - var /** @type {?} */ originalValue = this.formatValueWithoutThousandSeparator(target.value); - var /** @type {?} */ valueBeforeSeparator = this.getValueBeforeSeparator(target.value, this.decimalSeparator); - var /** @type {?} */ valueBeforeSeparatorOriginal = this.getValueBeforeSeparator(originalValue, this.decimalSeparator); - if (this.isSelectionStartDifferentSelectionEnd(target)) { - return false; - } - return target.selectionStart <= valueBeforeSeparator.length && - valueBeforeSeparatorOriginal.length === this.thousandMaxlength && - !this.isKeyDecimalSeparator(event); - }; - /** - * @param {?} event - * @return {?} - */ - ThfDecimalComponent.prototype.verifyThousandLength = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ target = event.target; - var /** @type {?} */ originalValue = this.formatValueWithoutThousandSeparator(target.value); - var /** @type {?} */ valueBeforeSeparator = this.getValueBeforeSeparator(target.value, this.decimalSeparator); - var /** @type {?} */ valueBeforeSeparatorOriginal = this.getValueBeforeSeparator(originalValue, this.decimalSeparator); - if (this.isSelectionStartDifferentSelectionEnd(target)) { - return false; - } - return valueBeforeSeparatorOriginal.length >= this.thousandMaxlength && - !this.isKeyDecimalSeparator(event) && - this.isPositionAfterDecimalSeparator(target.selectionStart - this.decimalsLength, target.value); - }; - /** - * @param {?} e - * @return {?} - */ - ThfDecimalComponent.prototype.verifyInsertComma = /** - * @param {?} e - * @return {?} - */ - function (e) { - var /** @type {?} */ hasComma = this.containsComma(e.target.value); - return hasComma && e.key === this.decimalSeparator; - }; - /** - * @param {?} event - * @return {?} - */ - ThfDecimalComponent.prototype.verifyInsertMinusSign = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ value = event.target.value; - var /** @type {?} */ indexMinusSign = (value.lastIndexOf(this.minusSign) !== -1); - var /** @type {?} */ positionMinusSign = value.lastIndexOf('-'); - var /** @type {?} */ occurancesMinusSign = value.match(new RegExp('-', 'g')); - if (this.isKeyboardAndroid && indexMinusSign && occurancesMinusSign.length > 1) { - event.target.value = this.replaceAt(value, positionMinusSign, ''); - } - return indexMinusSign && event.key === this.minusSign; - }; - /** - * @param {?} event - * @return {?} - */ - ThfDecimalComponent.prototype.verifyValueAfterComma = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ value = event.target.value; - var /** @type {?} */ selectionStart = event.target.selectionStart; - var /** @type {?} */ valueAfterSeparator = this.getValueAfterSeparator(value, this.decimalSeparator); - return this.isPositionAfterDecimalSeparator(selectionStart, value) && valueAfterSeparator.length >= this.decimalsLength; - }; - ThfDecimalComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-decimal', template: "
    ", - providers: [ - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["f" /* NG_VALUE_ACCESSOR */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfDecimalComponent; }), - multi: true, - }, - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["e" /* NG_VALIDATORS */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfDecimalComponent; }), - multi: true, - } - ] - },] }, - ]; - /** @nocollapse */ - ThfDecimalComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - ThfDecimalComponent.propDecorators = { - "inputEl": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['inp', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "decimalsLength": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-decimals-length',] },], - "thousandMaxlength": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-thousand-maxlength',] },], - }; - return ThfDecimalComponent; -}(__WEBPACK_IMPORTED_MODULE_3__thf_input_thf_input_base_component__["a" /* ThfInputBaseComponent */])); - -function ThfDecimalComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDecimalComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDecimalComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfDecimalComponent.propDecorators; - /** @type {?} */ - ThfDecimalComponent.prototype._decimalsLength; - /** @type {?} */ - ThfDecimalComponent.prototype._thousandMaxlength; - /** @type {?} */ - ThfDecimalComponent.prototype.decimalSeparator; - /** @type {?} */ - ThfDecimalComponent.prototype.fireChange; - /** @type {?} */ - ThfDecimalComponent.prototype.isKeyboardAndroid; - /** @type {?} */ - ThfDecimalComponent.prototype.minusSign; - /** @type {?} */ - ThfDecimalComponent.prototype.oldDotsLength; - /** @type {?} */ - ThfDecimalComponent.prototype.thousandSeparator; - /** @type {?} */ - ThfDecimalComponent.prototype.valueBeforeChange; - /** @type {?} */ - ThfDecimalComponent.prototype.regex; - /** @type {?} */ - ThfDecimalComponent.prototype.inputEl; - /** @type {?} */ - ThfDecimalComponent.prototype.el; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-email/thf-email.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfEmailComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_input_generic_thf_input_generic__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-input-generic/thf-input-generic.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfInputBaseComponent - * - * \@description - * - * thf-email é um input específico para receber E-mail, com o pattern já configurado. - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfEmailComponent = /** @class */ (function (_super) { - __extends(ThfEmailComponent, _super); - function ThfEmailComponent(el) { - var _this = _super.call(this, el) || this; - _this.maxlength = 254; - _this.type = 'email'; - _this.pattern = '^([\\w-]+(?:\\.[\\w-]+)*)@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([a-z]{2,6}(?:\\.[a-z]{2})?)$'; - _this.mask = ''; - return _this; - } - /** - * @param {?} c - * @return {?} - */ - ThfEmailComponent.prototype.extraValidation = /** - * @param {?} c - * @return {?} - */ - function (c) { - return null; - }; - ThfEmailComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-email', template: "
    ", - providers: [ - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["f" /* NG_VALUE_ACCESSOR */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfEmailComponent; }), - multi: true, - }, - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["e" /* NG_VALIDATORS */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfEmailComponent; }), - multi: true, - } - ] - },] }, - ]; - /** @nocollapse */ - ThfEmailComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - return ThfEmailComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_input_generic_thf_input_generic__["a" /* ThfInputGeneric */])); - -function ThfEmailComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfEmailComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfEmailComponent.ctorParameters; - /** @type {?} */ - ThfEmailComponent.prototype.maxlength; - /** @type {?} */ - ThfEmailComponent.prototype.type; - /** @type {?} */ - ThfEmailComponent.prototype.pattern; - /** @type {?} */ - ThfEmailComponent.prototype.mask; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-field-container/thf-field-container-bottom/thf-field-container-bottom.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfFieldContainerBottomComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * Componente de uso interno, responsável por gerar uma margem inferior nos componentes que utilizam o thf-field-container. - * Essa margem inferior pode conter uma mensagem de erro. - */ -var ThfFieldContainerBottomComponent = /** @class */ (function () { - function ThfFieldContainerBottomComponent() { - /** - * Mensagem que será apresentada quando o pattern ou a máscara não for satisfeita. - * Obs: Esta mensagem não é apresentada quando o campo estiver vazio, mesmo que ele seja requerido. - */ - this.errorPattern = ''; - } - ThfFieldContainerBottomComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-field-container-bottom', template: "
    {{ errorPattern }}
    " - },] }, - ]; - /** @nocollapse */ - ThfFieldContainerBottomComponent.ctorParameters = function () { return []; }; - ThfFieldContainerBottomComponent.propDecorators = { - "errorPattern": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-error-pattern',] },], - }; - return ThfFieldContainerBottomComponent; -}()); - -function ThfFieldContainerBottomComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfFieldContainerBottomComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfFieldContainerBottomComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfFieldContainerBottomComponent.propDecorators; - /** - * Mensagem que será apresentada quando o pattern ou a máscara não for satisfeita. - * Obs: Esta mensagem não é apresentada quando o campo estiver vazio, mesmo que ele seja requerido. - * @type {?} - */ - ThfFieldContainerBottomComponent.prototype.errorPattern; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-field-container/thf-field-container.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfFieldContainerComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -var ThfFieldContainerComponent = /** @class */ (function () { - function ThfFieldContainerComponent() { - this.optional = { - pt: '(Opcional)', - en: '(Optional)', - es: '(Opcional)' - }; - } - /** - * @return {?} - */ - ThfFieldContainerComponent.prototype.getOptional = /** - * @return {?} - */ - function () { - var /** @type {?} */ lang = (navigator.language) ? navigator.language.toLowerCase().slice(0, 2) : 'pt'; - return (this.optional[lang]) ? this.optional[lang] : ''; - }; - /** - * @return {?} - */ - ThfFieldContainerComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - }; - ThfFieldContainerComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-field-container', template: "
    {{label}} {{getOptional()}}
    {{help}}
    " - },] }, - ]; - /** @nocollapse */ - ThfFieldContainerComponent.ctorParameters = function () { return []; }; - ThfFieldContainerComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "help": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-help',] },], - "opcional": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-opcional',] },], - }; - return ThfFieldContainerComponent; -}()); - -function ThfFieldContainerComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfFieldContainerComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfFieldContainerComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfFieldContainerComponent.propDecorators; - /** - * Label do campo - * @type {?} - */ - ThfFieldContainerComponent.prototype.label; - /** - * Texto de apoio do campo - * @type {?} - */ - ThfFieldContainerComponent.prototype.help; - /** - * Label do campo - * @type {?} - */ - ThfFieldContainerComponent.prototype.opcional; - /** @type {?} */ - ThfFieldContainerComponent.prototype.optional; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-field.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfFieldModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_thf_button_index__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button/index.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__thf_disclaimer_thf_disclaimer_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-disclaimer/thf-disclaimer.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_thf_loading_index__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-loading/index.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__components_thf_modal_thf_modal_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-modal/thf-modal.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__components_thf_table_thf_table_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-table/thf-table.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__thf_calendar_thf_calendar_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-calendar/thf-calendar.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__thf_checkbox_group_thf_checkbox_group_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-checkbox-group/thf-checkbox-group.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__thf_clean_thf_clean_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-clean/thf-clean.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__thf_combo_thf_combo_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-combo/thf-combo.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__thf_datepicker_thf_datepicker_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-datepicker/thf-datepicker.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__thf_decimal_thf_decimal_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-decimal/thf-decimal.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__thf_email_thf_email_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-email/thf-email.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__thf_field_container_thf_field_container_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-field-container/thf-field-container.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__thf_field_container_thf_field_container_bottom_thf_field_container_bottom_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-field-container/thf-field-container-bottom/thf-field-container-bottom.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__thf_login_thf_login_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-login/thf-login.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__thf_lookup_thf_lookup_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-lookup/thf-lookup.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__thf_lookup_thf_lookup_modal_thf_lookup_modal_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-lookup/thf-lookup-modal/thf-lookup-modal.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__thf_multiselect_thf_multiselect_dropdown_thf_multiselect_dropdown_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-multiselect/thf-multiselect-dropdown/thf-multiselect-dropdown.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__thf_multiselect_thf_multiselect_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-multiselect/thf-multiselect.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__thf_multiselect_thf_multiselect_item_thf_multiselect_item_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-multiselect/thf-multiselect-item/thf-multiselect-item.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__thf_multiselect_thf_multiselect_search_thf_multiselect_search_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-multiselect/thf-multiselect-search/thf-multiselect-search.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__thf_input_thf_input_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-input/thf-input.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__thf_number_thf_number_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-number/thf-number.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__thf_password_thf_password_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-password/thf-password.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__thf_radio_group_thf_radio_group_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-radio-group/thf-radio-group.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__thf_select_thf_select_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-select/thf-select.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__thf_switch_thf_switch_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-switch/thf-switch.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__thf_textarea_thf_textarea_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-textarea/thf-textarea.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__thf_upload_thf_upload_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-upload/thf-upload.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__thf_url_thf_url_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-url/thf-url.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/** - * \@description - * - * Módulo dos componentes thf-combo, thf-checkbox-group, thf-datepicker, thf-email, thf-input, thf-lookup, thf-number, - * thf-multiselect, thf-password, thf-radio-group, thf-select, thf-switch, thf-textarea, thf-upload e thf-url. - */ -var ThfFieldModule = /** @class */ (function () { - function ThfFieldModule() { - } - ThfFieldModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_forms__["d" /* FormsModule */], - __WEBPACK_IMPORTED_MODULE_3__angular_common_http__["c" /* HttpClientModule */], - __WEBPACK_IMPORTED_MODULE_4__components_thf_button_index__["a" /* ThfButtonModule */], - __WEBPACK_IMPORTED_MODULE_5__thf_disclaimer_thf_disclaimer_module__["a" /* ThfDisclaimerModule */], - __WEBPACK_IMPORTED_MODULE_6__components_thf_loading_index__["a" /* ThfLoadingModule */], - __WEBPACK_IMPORTED_MODULE_7__components_thf_modal_thf_modal_module__["a" /* ThfModalModule */], - __WEBPACK_IMPORTED_MODULE_8__components_thf_table_thf_table_module__["a" /* ThfTableModule */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_10__thf_checkbox_group_thf_checkbox_group_component__["a" /* ThfCheckboxGroupComponent */], - __WEBPACK_IMPORTED_MODULE_11__thf_clean_thf_clean_component__["a" /* ThfCleanComponent */], - __WEBPACK_IMPORTED_MODULE_12__thf_combo_thf_combo_component__["a" /* ThfComboComponent */], - __WEBPACK_IMPORTED_MODULE_14__thf_decimal_thf_decimal_component__["a" /* ThfDecimalComponent */], - __WEBPACK_IMPORTED_MODULE_13__thf_datepicker_thf_datepicker_component__["a" /* ThfDatepickerComponent */], - __WEBPACK_IMPORTED_MODULE_15__thf_email_thf_email_component__["a" /* ThfEmailComponent */], - __WEBPACK_IMPORTED_MODULE_25__thf_input_thf_input_component__["a" /* ThfInputComponent */], - __WEBPACK_IMPORTED_MODULE_18__thf_login_thf_login_component__["a" /* ThfLoginComponent */], - __WEBPACK_IMPORTED_MODULE_19__thf_lookup_thf_lookup_component__["a" /* ThfLookupComponent */], - __WEBPACK_IMPORTED_MODULE_20__thf_lookup_thf_lookup_modal_thf_lookup_modal_component__["a" /* ThfLookupModalComponent */], - __WEBPACK_IMPORTED_MODULE_22__thf_multiselect_thf_multiselect_component__["a" /* ThfMultiselectComponent */], - __WEBPACK_IMPORTED_MODULE_26__thf_number_thf_number_component__["a" /* ThfNumberComponent */], - __WEBPACK_IMPORTED_MODULE_27__thf_password_thf_password_component__["a" /* ThfPasswordComponent */], - __WEBPACK_IMPORTED_MODULE_28__thf_radio_group_thf_radio_group_component__["a" /* ThfRadioGroupComponent */], - __WEBPACK_IMPORTED_MODULE_29__thf_select_thf_select_component__["a" /* ThfSelectComponent */], - __WEBPACK_IMPORTED_MODULE_30__thf_switch_thf_switch_component__["a" /* ThfSwitchComponent */], - __WEBPACK_IMPORTED_MODULE_31__thf_textarea_thf_textarea_component__["a" /* ThfTextareaComponent */], - __WEBPACK_IMPORTED_MODULE_32__thf_upload_thf_upload_component__["a" /* ThfUploadComponent */], - __WEBPACK_IMPORTED_MODULE_33__thf_url_thf_url_component__["a" /* ThfUrlComponent */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_9__thf_calendar_thf_calendar_component__["a" /* ThfCalendarComponent */], - __WEBPACK_IMPORTED_MODULE_10__thf_checkbox_group_thf_checkbox_group_component__["a" /* ThfCheckboxGroupComponent */], - __WEBPACK_IMPORTED_MODULE_11__thf_clean_thf_clean_component__["a" /* ThfCleanComponent */], - __WEBPACK_IMPORTED_MODULE_12__thf_combo_thf_combo_component__["a" /* ThfComboComponent */], - __WEBPACK_IMPORTED_MODULE_14__thf_decimal_thf_decimal_component__["a" /* ThfDecimalComponent */], - __WEBPACK_IMPORTED_MODULE_13__thf_datepicker_thf_datepicker_component__["a" /* ThfDatepickerComponent */], - __WEBPACK_IMPORTED_MODULE_15__thf_email_thf_email_component__["a" /* ThfEmailComponent */], - __WEBPACK_IMPORTED_MODULE_16__thf_field_container_thf_field_container_component__["a" /* ThfFieldContainerComponent */], - __WEBPACK_IMPORTED_MODULE_17__thf_field_container_thf_field_container_bottom_thf_field_container_bottom_component__["a" /* ThfFieldContainerBottomComponent */], - __WEBPACK_IMPORTED_MODULE_25__thf_input_thf_input_component__["a" /* ThfInputComponent */], - __WEBPACK_IMPORTED_MODULE_18__thf_login_thf_login_component__["a" /* ThfLoginComponent */], - __WEBPACK_IMPORTED_MODULE_19__thf_lookup_thf_lookup_component__["a" /* ThfLookupComponent */], - __WEBPACK_IMPORTED_MODULE_20__thf_lookup_thf_lookup_modal_thf_lookup_modal_component__["a" /* ThfLookupModalComponent */], - __WEBPACK_IMPORTED_MODULE_22__thf_multiselect_thf_multiselect_component__["a" /* ThfMultiselectComponent */], - __WEBPACK_IMPORTED_MODULE_21__thf_multiselect_thf_multiselect_dropdown_thf_multiselect_dropdown_component__["a" /* ThfMultiselectDropdownComponent */], - __WEBPACK_IMPORTED_MODULE_23__thf_multiselect_thf_multiselect_item_thf_multiselect_item_component__["a" /* ThfMultiselectItemComponent */], - __WEBPACK_IMPORTED_MODULE_24__thf_multiselect_thf_multiselect_search_thf_multiselect_search_component__["a" /* ThfMultiselectSearchComponent */], - __WEBPACK_IMPORTED_MODULE_26__thf_number_thf_number_component__["a" /* ThfNumberComponent */], - __WEBPACK_IMPORTED_MODULE_27__thf_password_thf_password_component__["a" /* ThfPasswordComponent */], - __WEBPACK_IMPORTED_MODULE_28__thf_radio_group_thf_radio_group_component__["a" /* ThfRadioGroupComponent */], - __WEBPACK_IMPORTED_MODULE_29__thf_select_thf_select_component__["a" /* ThfSelectComponent */], - __WEBPACK_IMPORTED_MODULE_30__thf_switch_thf_switch_component__["a" /* ThfSwitchComponent */], - __WEBPACK_IMPORTED_MODULE_31__thf_textarea_thf_textarea_component__["a" /* ThfTextareaComponent */], - __WEBPACK_IMPORTED_MODULE_32__thf_upload_thf_upload_component__["a" /* ThfUploadComponent */], - __WEBPACK_IMPORTED_MODULE_33__thf_url_thf_url_component__["a" /* ThfUrlComponent */] - ], - providers: [], - entryComponents: [ - __WEBPACK_IMPORTED_MODULE_9__thf_calendar_thf_calendar_component__["a" /* ThfCalendarComponent */], - __WEBPACK_IMPORTED_MODULE_20__thf_lookup_thf_lookup_modal_thf_lookup_modal_component__["a" /* ThfLookupModalComponent */] - ] - },] }, - ]; - /** @nocollapse */ - ThfFieldModule.ctorParameters = function () { return []; }; - return ThfFieldModule; -}()); - -function ThfFieldModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfFieldModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfFieldModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-input-generic/thf-input-generic.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfInputGeneric; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_input_thf_input_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-input/thf-input-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * @abstract - */ -var ThfInputGeneric = /** @class */ (function (_super) { - __extends(ThfInputGeneric, _super); - function ThfInputGeneric(el) { - var _this = _super.call(this) || this; - _this.type = 'text'; - _this.el = el; - return _this; - } - /** - * @return {?} - */ - ThfInputGeneric.prototype.ngAfterViewInit = /** - * @return {?} - */ - function () { - this.afterViewInit(); - }; - /** - * @return {?} - */ - ThfInputGeneric.prototype.afterViewInit = /** - * @return {?} - */ - function () { - this.putFocus(); - this.setPaddingInput(); - }; - /** - * @return {?} - */ - ThfInputGeneric.prototype.setPaddingInput = /** - * @return {?} - */ - function () { - var _this = this; - setTimeout(function () { - var /** @type {?} */ selectorIcons = '.thf-field-icon-container:not(.thf-field-icon-container-left) > .thf-icon'; - var /** @type {?} */ icons = _this.el.nativeElement.querySelectorAll(selectorIcons).length; - if (_this.clean) { - icons++; - } - if (icons) { - _this.inputEl.nativeElement.style.paddingRight = icons * 36 + "px"; - } - }); - }; - /** - * @return {?} - */ - ThfInputGeneric.prototype.putFocus = /** - * @return {?} - */ - function () { - if (this.focus) { - this.inputEl.nativeElement.focus(); - } - }; - /** - * @param {?} e - * @return {?} - */ - ThfInputGeneric.prototype.onKeydown = /** - * @param {?} e - * @return {?} - */ - function (e) { - if (this.mask) { - if (e.target.keyCode !== 229) { - this.eventOnBlur(e); - this.objMask.keydown(e); - } - } - }; - /** - * @param {?} e - * @return {?} - */ - ThfInputGeneric.prototype.onKeyup = /** - * @param {?} e - * @return {?} - */ - function (e) { - if (this.mask) { - if (e.target.keyCode !== 229) { - this.eventOnBlur(e); - this.objMask.keyup(e); - } - this.callOnChange(this.objMask.valueToModel); - } - }; - /** - * @param {?} e - * @return {?} - */ - ThfInputGeneric.prototype.eventOnInput = /** - * @param {?} e - * @return {?} - */ - function (e) { - if (!this.mask) { - var /** @type {?} */ value = this.validMaxLength(this.maxlength, e.target.value); - this.inputEl.nativeElement.value = value; - this.callOnChange(value); - } - }; - /** - * @param {?} maxlength - * @param {?} value - * @return {?} - */ - ThfInputGeneric.prototype.validMaxLength = /** - * @param {?} maxlength - * @param {?} value - * @return {?} - */ - function (maxlength, value) { - return (maxlength && value.length > maxlength) ? value.toString().substring(0, maxlength) : value; - }; - /** - * @param {?} e - * @return {?} - */ - ThfInputGeneric.prototype.eventOnFocus = /** - * @param {?} e - * @return {?} - */ - function (e) { - // Atualiza valor da variável que será usada para verificar se o campo teve alteração - this.valueBeforeChange = this.inputEl.nativeElement.value; - // Dispara evento quando o usuário entrar no campo - // Este evento também é disparado quando o campo inicia com foco. - this.enter.emit(); - }; - /** - * @param {?} e - * @return {?} - */ - ThfInputGeneric.prototype.eventOnBlur = /** - * @param {?} e - * @return {?} - */ - function (e) { - if (this.mask) { - this.objMask.blur(e); - } - this.blur.emit(); - this.controlChangeEmitter(); - }; - /** - * @return {?} - */ - ThfInputGeneric.prototype.controlChangeEmitter = /** - * @return {?} - */ - function () { - var _this = this; - // Emite o evento change manualmente quando o campo é alterado - // Este evento é controlado manualmente devido ao preventDefault existente na máscara - // e devido ao controle do t-clean, que também precisa emitir change - if (this.inputEl.nativeElement.value !== this.valueBeforeChange) { - clearTimeout(this.timeoutChange); - this.timeoutChange = setTimeout(function () { - _this.change.emit(); - }, 200); - } - }; - /** - * @param {?} e - * @return {?} - */ - ThfInputGeneric.prototype.eventOnClick = /** - * @param {?} e - * @return {?} - */ - function (e) { - // Atualiza a posição do cursor ao clicar - if (this.mask) { - this.objMask.click(e); - } - }; - /** - * @return {?} - */ - ThfInputGeneric.prototype.hasInvalidClass = /** - * @return {?} - */ - function () { - return (this.el.nativeElement.classList.contains('ng-invalid') && - this.el.nativeElement.classList.contains('ng-dirty') && - this.inputEl.nativeElement.value !== ''); - }; - /** - * @return {?} - */ - ThfInputGeneric.prototype.getErrorPattern = /** - * @return {?} - */ - function () { - return (this.errorPattern !== '' && this.hasInvalidClass()) ? this.errorPattern : ''; - }; - /** - * @param {?} pattern - * @param {?} value - * @return {?} - */ - ThfInputGeneric.prototype.verifyPattern = /** - * @param {?} pattern - * @param {?} value - * @return {?} - */ - function (pattern, value) { - return new RegExp(pattern).test(value); - }; - /** - * @param {?} value - * @return {?} - */ - ThfInputGeneric.prototype.clear = /** - * @param {?} value - * @return {?} - */ - function (value) { - this.callOnChange(value); - this.controlChangeEmitter(); - }; - /** - * @param {?} value - * @return {?} - */ - ThfInputGeneric.prototype.writeValueModel = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (this.inputEl) { - if (value) { - if (this.mask) { - this.inputEl.nativeElement.value = this.objMask.controlFormatting(String(value)); - // Se o model for definido como formatado, então precisa atualizá-lo no primeiro acesso - if (this.objMask.formatModel) { - this.onChangePropagate(this.objMask.valueToModel); - } - } - else { - this.inputEl.nativeElement.value = value; - } - } - else { - // Se for o valor for undefined, deve limpar o campo - this.inputEl.nativeElement.value = ''; - } - } - // Emite evento quando o model é atualizado, inclusive a primeira vez - if (value) { - this.change.emit(); - } - }; - /** - * @return {?} - */ - ThfInputGeneric.prototype.getScreenValue = /** - * @return {?} - */ - function () { - return (this.inputEl) ? this.inputEl.nativeElement.value : ''; - }; - ThfInputGeneric.propDecorators = { - "inputEl": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['inp', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "onKeydown": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["z" /* HostListener */], args: ['keydown', ['$event'],] },], - "onKeyup": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["z" /* HostListener */], args: ['keyup', ['$event'],] },], - }; - return ThfInputGeneric; -}(__WEBPACK_IMPORTED_MODULE_1__thf_input_thf_input_base_component__["a" /* ThfInputBaseComponent */])); - -function ThfInputGeneric_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfInputGeneric.propDecorators; - /** @type {?} */ - ThfInputGeneric.prototype.inputEl; - /** @type {?} */ - ThfInputGeneric.prototype.type; - /** @type {?} */ - ThfInputGeneric.prototype.el; - /** @type {?} */ - ThfInputGeneric.prototype.valueBeforeChange; - /** @type {?} */ - ThfInputGeneric.prototype.timeoutChange; - /** - * @abstract - * @param {?} c - * @return {?} - */ - ThfInputGeneric.prototype.extraValidation = function (c) { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-input/thf-input-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfInputBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__validators__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/validators.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_mask__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-input/thf-mask.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@description - * - * Este é um componente baseado em input, com várias propriedades do input nativo e outras - * propriedades extras como: máscara, pattern, mensagem de erro e etc. - * Você deve informar a variável que contém o valor como [(ngModel)]="variavel", para que o - * input receba o valor da variável e para que ela receba as alterações do valor (two-way-databinding). - * A propriedade name é obrigatória para que o formulário e o model funcionem corretamente. - * - * Importante: - * - Caso o input não esteja dentro de um form, é preciso adicionar ngDefaultControl ao componente: - * Exemplo: [(ngModel)]="pessoa.nome" name="nome" ngDefaultControl - * - * - Caso o input tenha um [(ngModel)] sem o atributo name, ocorrerá um erro de angular. - * Então você precisa informar o atributo name ou o atributo [ngModelOptions]="{standalone: true}". - * Exemplo: [(ngModel)]="pessoa.nome" [ngModelOptions]="{standalone: true}" - * @abstract - */ -var ThfInputBaseComponent = /** @class */ (function () { - function ThfInputBaseComponent() { - /** - * Placeholder, mensagem que aparecerá enquanto o campo não estiver preenchido - */ - this.placeholder = ''; - /** - * Indica que o campo será desabilitado - * - * \@default false - */ - this.disabled = false; - /** - * Indica que o campo será somente leitura - */ - this.readonly = false; - /** - * Indica que o campo será obrigatório. Esta propriedade é desconsiderada quando o input está desabilitado (t-disabled). - */ - this.required = false; - /** - * Indica que o campo iniciará com foco - */ - this.focus = false; - /** - * Indica se o campo receberá um botão para ser limpo. - */ - this.clean = false; - /** - * Mensagem que será apresentada quando o pattern ou a máscara não for satisfeita. - * Obs: Esta mensagem não é apresentada quando o campo estiver vazio, mesmo que ele seja requerido - */ - this.errorPattern = ''; - /** - * Indica uma máscara para o campo. Exemplos: (+99) (99) 99999?-9999, 99999-999, 999.999.999-99. - * A máscara gera uma validação automática do campo, podendo esta ser substituída por um REGEX específico - * através da propriedade t-pattern. - * O campo será sinalizado e o formulário ficará inválido quando o valor informado estiver fora do padrão definido, - * mesmo quando desabilitado. - */ - this.mask = ''; - /** - * Indica se o model receberá o valor formatado pela máscara ou apenas o valor puro (sem formatação). - * - * \@default false - */ - this.maskFormatModel = false; - /** - * Evento disparado ao sair do campo - */ - this.blur = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento disparado ao entrar do campo - */ - this.enter = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento disparado ao alterar valor e deixar o campo - */ - this.change = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento disparado ao alterar valor do model - */ - this.changeModel = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - this.onChangePropagate = null; - this.onTouched = null; - this.readyToValidation = false; - } - Object.defineProperty(ThfInputBaseComponent.prototype, "setDisabled", { - set: /** - * @param {?} disabled - * @return {?} - */ - function (disabled) { - this.disabled = disabled === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(disabled); - this.updateModelToValidate(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfInputBaseComponent.prototype, "setReadonly", { - set: /** - * @param {?} readonly - * @return {?} - */ - function (readonly) { - this.readonly = readonly === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(readonly); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfInputBaseComponent.prototype, "setRequired", { - set: /** - * @param {?} required - * @return {?} - */ - function (required) { - this.required = required === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(required); - this.updateModelToValidate(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfInputBaseComponent.prototype, "setFocus", { - set: /** - * @param {?} focus - * @return {?} - */ - function (focus) { - this.focus = focus === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(focus); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfInputBaseComponent.prototype, "setClean", { - set: /** - * @param {?} clean - * @return {?} - */ - function (clean) { - this.clean = clean === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(clean); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfInputBaseComponent.prototype, "setPattern", { - set: /** - * @param {?} pattern - * @return {?} - */ - function (pattern) { - this.pattern = pattern; - this.updateModelToValidate(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfInputBaseComponent.prototype, "setMaxlength", { - set: /** - * @param {?} maxlength - * @return {?} - */ - function (maxlength) { - if (!isNaN(parseInt(maxlength, 10))) { - this.maxlength = parseInt(maxlength, 10); - this.updateModelToValidate(); - } - else if (maxlength === undefined) { - this.maxlength = undefined; - this.updateModelToValidate(); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfInputBaseComponent.prototype, "setMinlength", { - set: /** - * @param {?} minlength - * @return {?} - */ - function (minlength) { - if (!isNaN(parseInt(minlength, 10))) { - this.minlength = parseInt(minlength, 10); - this.updateModelToValidate(); - } - else if (minlength === undefined) { - this.minlength = undefined; - this.updateModelToValidate(); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfInputBaseComponent.prototype, "setMask", { - set: /** - * @param {?} mask - * @return {?} - */ - function (mask) { - this.mask = mask; - // Atualiza Máscara do Campo - this.objMask = new __WEBPACK_IMPORTED_MODULE_3__thf_mask__["a" /* ThfMask */](this.mask, this.maskFormatModel); - this.updateModelToValidate(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfInputBaseComponent.prototype, "setMaskFormatModel", { - set: /** - * @param {?} maskFormatModel - * @return {?} - */ - function (maskFormatModel) { - this.maskFormatModel = maskFormatModel === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(maskFormatModel); - if (this.objMask instanceof __WEBPACK_IMPORTED_MODULE_3__thf_mask__["a" /* ThfMask */]) { - this.objMask.formatModel = this.maskFormatModel; - this.updateModelToValidate(); - } - }, - enumerable: true, - configurable: true - }); - /** - * @param {?} value - * @return {?} - */ - ThfInputBaseComponent.prototype.updateModel = /** - * @param {?} value - * @return {?} - */ - function (value) { - // Quando o input não possui um formulário, então esta função não é registrada - if (this.onChangePropagate) { - this.onChangePropagate((this.type === 'number') ? Number(value) : value); - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfInputBaseComponent.prototype.callOnChange = /** - * @param {?} value - * @return {?} - */ - function (value) { - this.updateModel(value); - this.controlChangeModelEmitter(value); - }; - /** - * @return {?} - */ - ThfInputBaseComponent.prototype.ngAfterContentChecked = /** - * @return {?} - */ - function () { - // Seta esta variável para indicar que a tela já foi carregada e podem ser aplicadas as validações a partir desse momento - // A partir desse momento, toda vez que uma propriedade que interfere na validação, for alterada, o model será atualizado - // para que o campo seja validado novamente. - this.readyToValidation = true; - }; - /** - * @param {?} value - * @return {?} - */ - ThfInputBaseComponent.prototype.controlChangeModelEmitter = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (this.modelLastUpdate !== value) { - this.changeModel.emit(); - this.modelLastUpdate = value; - } - }; - /** - * @return {?} - */ - ThfInputBaseComponent.prototype.updateModelToValidate = /** - * @return {?} - */ - function () { - var _this = this; - // Emite a atualização do model caso esta propriedade seja alterada dinamicamicamente - // Esta verificação faz com que o método Validate() seja chamado pelo Angular. - if (this.readyToValidation) { - // Este timeout é necessário para quando for atualizado o model e uma propriedade do Input ao mesmo tempo. - // Caso contrário, o writeValue não é disparado, não atualizando o model do componente. - setTimeout(function () { - _this.updateModel(_this.getScreenValue()); - }); - } - }; - /** - * @param {?} c - * @return {?} - */ - ThfInputBaseComponent.prototype.validate = /** - * @param {?} c - * @return {?} - */ - function (c) { - if (Object(__WEBPACK_IMPORTED_MODULE_2__validators__["g" /* requiredFailed */])(this.required, this.disabled, this.getScreenValue())) { - return { required: { - valid: false, - } }; - } - if (Object(__WEBPACK_IMPORTED_MODULE_2__validators__["c" /* maxlengthFailed */])(this.maxlength, this.getScreenValue())) { - return { maxlength: { - valid: false, - } }; - } - if (Object(__WEBPACK_IMPORTED_MODULE_2__validators__["e" /* minlengthFailed */])(this.minlength, this.disabled, this.getScreenValue())) { - return { minlength: { - valid: false, - } }; - } - if (Object(__WEBPACK_IMPORTED_MODULE_2__validators__["f" /* patternFailed */])(this.pattern, c.value)) { - return { pattern: { - valid: false, - } }; - } - return this.extraValidation(c); - }; - // Função implementada do ControlValueAccessor - // Usada para interceptar as mudanças e não atualizar automaticamente o Model - /** - * @param {?} func - * @return {?} - */ - ThfInputBaseComponent.prototype.registerOnChange = /** - * @param {?} func - * @return {?} - */ - function (func) { - this.onChangePropagate = func; - }; - // Função implementada do ControlValueAccessor - // Usada para interceptar as mudanças e não atualizar automaticamente o Model - /** - * @param {?} func - * @return {?} - */ - ThfInputBaseComponent.prototype.registerOnTouched = /** - * @param {?} func - * @return {?} - */ - function (func) { - this.onTouched = func; - }; - // Função implementada do ControlValueAccessor - /** - * @param {?} value - * @return {?} - */ - ThfInputBaseComponent.prototype.writeValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - this.writeValueModel(value); - }; - ThfInputBaseComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "help": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-help',] },], - "name": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['name',] },], - "placeholder": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-placeholder',] },], - "setDisabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled',] },], - "setReadonly": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-readonly',] },], - "setRequired": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-required',] },], - "setFocus": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-focus',] },], - "setClean": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-clean',] },], - "setPattern": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-pattern',] },], - "errorPattern": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-error-pattern',] },], - "setMaxlength": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-maxlength',] },], - "setMinlength": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-minlength',] },], - "setMask": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-mask',] },], - "setMaskFormatModel": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-mask-format-model',] },], - "blur": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-blur',] },], - "enter": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-enter',] },], - "change": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change',] },], - "changeModel": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change-model',] },], - }; - return ThfInputBaseComponent; -}()); - -function ThfInputBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfInputBaseComponent.propDecorators; - /** - * Label do campo - * @type {?} - */ - ThfInputBaseComponent.prototype.label; - /** - * Texto de apoio do campo - * @type {?} - */ - ThfInputBaseComponent.prototype.help; - /** - * Nome e identificador do Input - * @type {?} - */ - ThfInputBaseComponent.prototype.name; - /** - * Placeholder, mensagem que aparecerá enquanto o campo não estiver preenchido - * @type {?} - */ - ThfInputBaseComponent.prototype.placeholder; - /** - * Indica que o campo será desabilitado - * - * \@default false - * @type {?} - */ - ThfInputBaseComponent.prototype.disabled; - /** - * Indica que o campo será somente leitura - * @type {?} - */ - ThfInputBaseComponent.prototype.readonly; - /** - * Indica que o campo será obrigatório. Esta propriedade é desconsiderada quando o input está desabilitado (t-disabled). - * @type {?} - */ - ThfInputBaseComponent.prototype.required; - /** - * Indica que o campo iniciará com foco - * @type {?} - */ - ThfInputBaseComponent.prototype.focus; - /** - * Indica se o campo receberá um botão para ser limpo. - * @type {?} - */ - ThfInputBaseComponent.prototype.clean; - /** - * Expressão regular para validar o campo. - * Quando o campo possuir uma máscara (t-mask) será automaticamente validado por ela, porém - * é possível definir um t-pattern para substituir a validação da máscara. - * @type {?} - */ - ThfInputBaseComponent.prototype.pattern; - /** - * Mensagem que será apresentada quando o pattern ou a máscara não for satisfeita. - * Obs: Esta mensagem não é apresentada quando o campo estiver vazio, mesmo que ele seja requerido - * @type {?} - */ - ThfInputBaseComponent.prototype.errorPattern; - /** - * Indica a quantidade máxima de caracteres que o campo aceita - * @type {?} - */ - ThfInputBaseComponent.prototype.maxlength; - /** - * Indica a quantidade mínima de caracteres que o campo aceita - * @type {?} - */ - ThfInputBaseComponent.prototype.minlength; - /** - * Indica uma máscara para o campo. Exemplos: (+99) (99) 99999?-9999, 99999-999, 999.999.999-99. - * A máscara gera uma validação automática do campo, podendo esta ser substituída por um REGEX específico - * através da propriedade t-pattern. - * O campo será sinalizado e o formulário ficará inválido quando o valor informado estiver fora do padrão definido, - * mesmo quando desabilitado. - * @type {?} - */ - ThfInputBaseComponent.prototype.mask; - /** - * Indica se o model receberá o valor formatado pela máscara ou apenas o valor puro (sem formatação). - * - * \@default false - * @type {?} - */ - ThfInputBaseComponent.prototype.maskFormatModel; - /** - * Evento disparado ao sair do campo - * @type {?} - */ - ThfInputBaseComponent.prototype.blur; - /** - * Evento disparado ao entrar do campo - * @type {?} - */ - ThfInputBaseComponent.prototype.enter; - /** - * Evento disparado ao alterar valor e deixar o campo - * @type {?} - */ - ThfInputBaseComponent.prototype.change; - /** - * Evento disparado ao alterar valor do model - * @type {?} - */ - ThfInputBaseComponent.prototype.changeModel; - /** @type {?} */ - ThfInputBaseComponent.prototype.type; - /** @type {?} */ - ThfInputBaseComponent.prototype.onChangePropagate; - /** @type {?} */ - ThfInputBaseComponent.prototype.onTouched; - /** @type {?} */ - ThfInputBaseComponent.prototype.objMask; - /** @type {?} */ - ThfInputBaseComponent.prototype.modelLastUpdate; - /** @type {?} */ - ThfInputBaseComponent.prototype.readyToValidation; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfInputBaseComponent.prototype.writeValueModel = function (value) { }; - /** - * @abstract - * @param {?} c - * @return {?} - */ - ThfInputBaseComponent.prototype.extraValidation = function (c) { }; - /** - * @abstract - * @return {?} - */ - ThfInputBaseComponent.prototype.getScreenValue = function () { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-input/thf-input.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfInputComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_input_generic_thf_input_generic__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-input-generic/thf-input-generic.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfInputBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfInputComponent = /** @class */ (function (_super) { - __extends(ThfInputComponent, _super); - function ThfInputComponent(el) { - return _super.call(this, el) || this; - } - /** - * @param {?} c - * @return {?} - */ - ThfInputComponent.prototype.extraValidation = /** - * @param {?} c - * @return {?} - */ - function (c) { - return null; - }; - ThfInputComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-input', template: "
    ", - providers: [ - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["f" /* NG_VALUE_ACCESSOR */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfInputComponent; }), - multi: true, - }, - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["e" /* NG_VALIDATORS */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfInputComponent; }), - multi: true, - } - ] - },] }, - ]; - /** @nocollapse */ - ThfInputComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - return ThfInputComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_input_generic_thf_input_generic__["a" /* ThfInputGeneric */])); - -function ThfInputComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfInputComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfInputComponent.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-input/thf-mask.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfMask; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** - * Para usar o thf-mask é preciso instanciar esta classe passando a máscara como - * primeiro parâmetro, e no segundo parâmetro, deve se informado true, caso queira - * que o model seja formatado ou false para o que o model seja limpo. - */ -var /** - * Para usar o thf-mask é preciso instanciar esta classe passando a máscara como - * primeiro parâmetro, e no segundo parâmetro, deve se informado true, caso queira - * que o model seja formatado ou false para o que o model seja limpo. - */ -ThfMask = /** @class */ (function () { - function ThfMask(mask, formatModel) { - this.mask = ''; - this.formatModel = false; - // controle de posição - this.initialPosition = 0; - this.finalPosition = 0; - this.pattern = ''; - this.mask = mask; - this.formatModel = formatModel; - this.pattern = this.getRegexFromMask(mask); - } - Object.defineProperty(ThfMask.prototype, "getPattern", { - get: /** - * @return {?} - */ - function () { - return this.pattern; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfMask.prototype, "getValueToInput", { - get: /** - * @return {?} - */ - function () { - return this.valueToInput; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfMask.prototype, "setValueToInput", { - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - this.valueToInput = value; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfMask.prototype, "getValueToModel", { - get: /** - * @return {?} - */ - function () { - return this.valueToModel; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfMask.prototype, "setValueToModel", { - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - this.valueToModel = value; - }, - enumerable: true, - configurable: true - }); - /** - * @param {?} $event - * @return {?} - */ - ThfMask.prototype.keyup = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - if (this.mask) { - var /** @type {?} */ value = $event.target.value; - // formata o valor quando for colado com control + v e reposiciona o cursor - if ($event.keyCode === 17 || $event.keyCode === 91) { - $event.target.value = this.controlFormatting(value); - this.resetPositions($event); - } - $event.preventDefault(); - switch ($event.keyCode) { - case 37: - // seta esquerda - if (this.initialPosition > 0) { - this.initialPosition--; - } - this.setPositionNotShiftKey($event); - this.setSelectionRange($event); - break; - case 39: - // seta direita - if (this.initialPosition < value.toString().length) { - this.initialPosition++; - } - this.setPositionNotShiftKey($event); - this.setSelectionRange($event); - break; - case 35: - // end - this.finalPosition = value.toString().length; - if ($event.shiftKey) { - this.setPositions($event); - } - else { - this.initialPosition = this.finalPosition; - this.setPositions($event); - } - break; - case 36: - // HOME - if ($event.shiftKey) { - this.finalPosition = this.initialPosition; - this.initialPosition = 0; - this.setPositions($event); - } - else { - this.initialPosition = 0; - this.finalPosition = 0; - this.setPositions($event); - } - break; - } - } - }; - /** - * @param {?} $event - * @return {?} - */ - ThfMask.prototype.setPositionNotShiftKey = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - if (!$event.shiftKey) { - this.finalPosition = this.initialPosition; - } - }; - /** - * @param {?} $event - * @return {?} - */ - ThfMask.prototype.setSelectionRange = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - if (this.initialPosition > this.finalPosition) { - $event.target.setSelectionRange(this.finalPosition, this.initialPosition); - } - else { - $event.target.setSelectionRange(this.initialPosition, this.finalPosition); - } - }; - /** - * @param {?} $event - * @return {?} - */ - ThfMask.prototype.keydown = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - if (this.mask) { - var /** @type {?} */ value = $event.target.value; - if ($event.keyCode === 9) { - return; - } - if (!$event.ctrlKey && !$event.metaKey) { - $event.preventDefault(); - } - // Não faz nada quando for digitado CTRL ou COMMAND e V - // Já está sendo tratado no evento keyup - if ($event.ctrlKey || $event.metaKey && ($event.keyCode !== 86) || - ($event.keyCode >= 37 && $event.keyCode <= 40) || $event.keyCode === 16 || $event.keyCode === 9) { - return; - } - // Valida a tecla digitada - if (this.isKeyValid($event.keyCode)) { - if (this.finalPosition === null) { - this.finalPosition = this.initialPosition; - } - this.revertPositions(this.initialPosition, this.finalPosition); - switch ($event.keyCode) { - case 8: - // backspace - this.getPosition($event); - if (this.initialPosition < 0) { - this.initialPosition = 0; - this.setPositions($event); - } - if (this.initialPosition === this.finalPosition) { - this.checkMaskBefore($event, -1); - if (this.initialPosition !== 0) { - value = value.slice(0, this.initialPosition - 1) + value.slice(this.finalPosition); - value = this.controlFormatting(value); - $event.target.value = value; - this.changePosition($event, -1); - this.checkMaskBefore($event, -1); - this.setPositions($event); - this.resetPositions($event); - } - } - else { - this.clearRangeSelection(value, $event, true); - } - this.setPositions($event); - break; - case 46: - // delete - this.getPosition($event); - if (this.initialPosition === this.finalPosition) { - this.checkMaskAfter($event, 1); - value = value.slice(0, this.initialPosition) + value.slice(this.finalPosition + 1); - value = this.controlFormatting(value); - $event.target.value = value; - this.setPositions($event); - this.resetPositions($event); - } - else { - this.clearRangeSelection(value, $event, false); - } - this.setPositions($event); - break; - default: - // qualquer outra tecla válida - value = value.slice(0, this.initialPosition) + $event.key + value.slice(this.finalPosition); - value = this.controlFormatting(value); - $event.target.value = value; - this.changePosition($event, 1); - this.checkMaskBefore($event, 1); - this.setPositions($event); - this.resetPositions($event); - this.setPositions($event); - } - } - } - }; - /** - * @param {?} value - * @param {?} $event - * @param {?} isBackspace - * @return {?} - */ - ThfMask.prototype.clearRangeSelection = /** - * @param {?} value - * @param {?} $event - * @param {?} isBackspace - * @return {?} - */ - function (value, $event, isBackspace) { - value = value.slice(0, this.initialPosition) + value.slice(this.finalPosition); - value = this.controlFormatting(value); - $event.target.value = value; - if (isBackspace) { - this.checkMaskBefore($event, -1); - } - this.setPositions($event); - this.resetPositions($event); - }; - // passa a posição do click para o controle de posição - /** - * @param {?} $event - * @return {?} - */ - ThfMask.prototype.click = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - this.initialPosition = $event.target.selectionStart; - this.finalPosition = $event.target.selectionEnd; - }; - /** - * @param {?} $event - * @return {?} - */ - ThfMask.prototype.blur = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - // Se houver algum valor definido na máscara - if (this.mask) { - // pega o valor do campo, formata e passa para o model - var /** @type {?} */ value = $event.target.value; - value = this.controlFormatting(value); - $event.target.value = value; - } - }; - /** - * @param {?} initialPosition - * @param {?} finalPosition - * @return {?} - */ - ThfMask.prototype.revertPositions = /** - * @param {?} initialPosition - * @param {?} finalPosition - * @return {?} - */ - function (initialPosition, finalPosition) { - if (initialPosition > finalPosition) { - // inverte o controle de posição caso o inicial esteja maior que o final - var /** @type {?} */ tempPosition = void 0; - tempPosition = initialPosition; - this.initialPosition = finalPosition; - this.finalPosition = tempPosition; - } - }; - // reseta o controle de posição - /** - * @param {?} $event - * @return {?} - */ - ThfMask.prototype.resetPositions = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - this.initialPosition = $event.target.selectionStart; - this.finalPosition = this.initialPosition; - }; - // posiciona o cursor de acordo com o controle de posição - /** - * @param {?} $event - * @return {?} - */ - ThfMask.prototype.setPositions = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - $event.target.setSelectionRange(this.initialPosition, this.finalPosition); - }; - // muda a posição do cursor e atualiza o controle de posição - /** - * @param {?} $event - * @param {?} value - * @return {?} - */ - ThfMask.prototype.changePosition = /** - * @param {?} $event - * @param {?} value - * @return {?} - */ - function ($event, value) { - this.initialPosition = this.initialPosition + value; - this.finalPosition = this.finalPosition + value; - this.setPositions($event); - }; - /** - * @param {?} $event - * @return {?} - */ - ThfMask.prototype.getPosition = /** - * @param {?} $event - * @return {?} - */ - function ($event) { - this.initialPosition = $event.target.selectionStart; - this.finalPosition = $event.target.selectionEnd; - this.setPositions($event); - }; - // Método responsável por controlar a formatação e aplicar todas as máscara possíveis - // quando houver valores opcionais (?) - /** - * @param {?} value - * @return {?} - */ - ThfMask.prototype.controlFormatting = /** - * @param {?} value - * @return {?} - */ - function (value) { - // Se o valor for vazio, retorna vazio - if (!value) { - this.valueToInput = ''; - this.valueToModel = ''; - return ''; - } - var /** @type {?} */ valueProcessed; - var /** @type {?} */ maskTmp = this.mask; - // Array que será usado para armazenar todas as máscaras possíveis para - // quando houver um valor opcional (?) - var /** @type {?} */ arrMasks = []; - var /** @type {?} */ contMasks = 0; - // Enquanto houver algum 9? na máscara - while (this.hasOptionalNumber(maskTmp)) { - arrMasks.push(maskTmp); - maskTmp = this.replaceOptionalNumber(maskTmp); - } - arrMasks.push(maskTmp); - // Inverte o array - arrMasks.reverse(); - // Informa que a formatação ainda não chegou ao fim - this.formattingEnds = false; - while (!this.formattingEnds) { - // Seta a formatação como terminada - // Então o método formatValue irá setar como não terminado caso haja - this.formattingEnds = true; - // Se não existe mais nenhuma máscara possível, então encerra a formatação - if (!arrMasks[contMasks]) { - break; - } - // Chama a formatação passando a máscara e o valor - valueProcessed = this.formatValue(value, arrMasks[contMasks]); - contMasks++; - } - return valueProcessed; - }; - // Função que formata a máscara com o valor passado - /** - * @param {?} value - * @param {?} mask - * @return {?} - */ - ThfMask.prototype.formatValue = /** - * @param {?} value - * @param {?} mask - * @return {?} - */ - function (value, mask) { - // Remove as marcas de valor opciona (?) - mask = mask.replace(/\?/g, ''); - // Substitui todos os caracteres que não são fixos da máscara por _ - var /** @type {?} */ guide = mask.replace(this.listValidKeys(), '_'); - // Contador usado para percorrer o guide - var /** @type {?} */ contGuide = 0; - // String final formatada - var /** @type {?} */ valueProcessed = ''; - // Remove do valor todos os caracteres fixos como ()/-+ - value = this.removeFormattingValue(value); - // Percorre todo o valor e coloca a formatação de acordo com a máscara - for (var /** @type {?} */ i = 0; i < value.length; i++) { - var /** @type {?} */ charValue = value[i]; - // Se o guide acabou, seta a formatação como não terminada para que o método controlFormatting - // tente formatar com outra possível máscara - if (!guide[contGuide]) { - this.formattingEnds = false; - break; - } - // Percorre o Guide enquanto tem caracteres fixos - while (this.isFixedCharacterGuide(guide[contGuide]) && guide[contGuide]) { - valueProcessed += guide[contGuide]; - contGuide++; - } - // É um caracter válido de acordo com a máscara - if (this.isKeyValidMask(charValue, mask[contGuide])) { - valueProcessed += charValue; - contGuide++; - } - else { - // Se não é um caracter válido, deve interromper. - break; - } - } - if (this.formatModel) { - this.valueToInput = valueProcessed; - this.valueToModel = valueProcessed; - } - else { - this.valueToInput = valueProcessed; - this.valueToModel = this.removeFormattingValue(valueProcessed); - } - return valueProcessed; - }; - // verifica se tem algum caracter de mascara antes do cursor - /** - * @param {?} $event - * @param {?} position - * @return {?} - */ - ThfMask.prototype.checkMaskBefore = /** - * @param {?} $event - * @param {?} position - * @return {?} - */ - function ($event, position) { - if (this.isFixedCharacterGuide($event.target.value.toString().charAt(this.initialPosition - 1))) { - this.changePosition($event, position); - this.checkMaskBefore($event, position); - } - }; - // verifica se tem algum caracter de mascara depois do cursor - /** - * @param {?} $event - * @param {?} position - * @return {?} - */ - ThfMask.prototype.checkMaskAfter = /** - * @param {?} $event - * @param {?} position - * @return {?} - */ - function ($event, position) { - if (this.isFixedCharacterGuide($event.target.value.toString().charAt(this.initialPosition))) { - this.changePosition($event, position); - this.checkMaskAfter($event, position); - } - }; - // Retorna a máscara sem um valor opcional - /** - * @param {?} mask - * @return {?} - */ - ThfMask.prototype.replaceOptionalNumber = /** - * @param {?} mask - * @return {?} - */ - function (mask) { - var /** @type {?} */ i = 9; - while (i >= 0) { - if (mask.indexOf(i + '?') > -1) { - return mask.replace(i + '?', ''); - } - i--; - } - return mask; - }; - // Verifica se contém caracteres permitidos somente na máscara \/() +- - /** - * @param {?} key - * @return {?} - */ - ThfMask.prototype.isFixedCharacterGuide = /** - * @param {?} key - * @return {?} - */ - function (key) { - return this.testRegex(key, this.getFixedCharacterGuide()); - }; - // Retorna caracteres permitidos somente na máscara \/() +- - /** - * @return {?} - */ - ThfMask.prototype.getFixedCharacterGuide = /** - * @return {?} - */ - function () { - return /[\\\/() +-.\:]/g; - }; - // Caracteres permitidos de serem digitados - /** - * @return {?} - */ - ThfMask.prototype.listValidKeys = /** - * @return {?} - */ - function () { - return /[a-zA-Z0-9]/g; - }; - // Se é um dígito válido - /** - * @param {?} keyCode - * @return {?} - */ - ThfMask.prototype.isKeyValid = /** - * @param {?} keyCode - * @return {?} - */ - function (keyCode) { - return this.isKeyCodeValid(keyCode); - }; - // Verifica se a tecla digitada é permitida - // Permite apenas números, letras, backspace e del - /** - * @param {?} keyCode - * @return {?} - */ - ThfMask.prototype.isKeyCodeValid = /** - * @param {?} keyCode - * @return {?} - */ - function (keyCode) { - return ((keyCode >= 48 && keyCode <= 57) || - (keyCode >= 65 && keyCode <= 90) || - (keyCode >= 96 && keyCode <= 105) || - (keyCode === 8) || keyCode === 9 || - (keyCode === 46)); - }; - // Se está de acordo com a máscara - /** - * @param {?} key - * @param {?} keyMask - * @return {?} - */ - ThfMask.prototype.isKeyValidMask = /** - * @param {?} key - * @param {?} keyMask - * @return {?} - */ - function (key, keyMask) { - return this.testRegex(key, this.replaceMask(keyMask)); - }; - // Retorna se a chave foi aprovada pela expressão regular - /** - * @param {?} key - * @param {?} regex - * @return {?} - */ - ThfMask.prototype.testRegex = /** - * @param {?} key - * @param {?} regex - * @return {?} - */ - function (key, regex) { - return regex.test(key); - }; - // Remove a formatacão do valor - // É possível ser melhorado para remover pontualmente os caracteres fixos de acordo com a máscara - /** - * @param {?} value - * @return {?} - */ - ThfMask.prototype.removeFormattingValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - return value.replace(this.getFixedCharacterGuide(), ''); - }; - // Verifica se contém valor opcional na máscara 0-9? - /** - * @param {?} mask - * @return {?} - */ - ThfMask.prototype.hasOptionalNumber = /** - * @param {?} mask - * @return {?} - */ - function (mask) { - return mask.match(/\d\?/g); - }; - // Retorna a expressão regular correspondente ao comando passado - /** - * @param {?} char - * @return {?} - */ - ThfMask.prototype.replaceMask = /** - * @param {?} char - * @return {?} - */ - function (char) { - var /** @type {?} */ regex = /./; - switch (char) { - case '0': - regex = /[0]/; - break; - case '1': - regex = /[0-1]/; - break; - case '2': - regex = /[0-2]/; - break; - case '3': - regex = /[0-3]/; - break; - case '4': - regex = /[0-4]/; - break; - case '5': - regex = /[0-5]/; - break; - case '6': - regex = /[0-6]/; - break; - case '7': - regex = /[0-7]/; - break; - case '8': - regex = /[0-8]/; - break; - case '9': - regex = /[0-9]/; - break; - case ' ': - regex = /\s/; - break; - case '@': - regex = /[a-zA-Z]/; - break; - case 'w': - regex = /[a-zA-Z0-9]/; - break; - } - return regex; - }; - /** - * @param {?} mask - * @return {?} - */ - ThfMask.prototype.getRegexFromMask = /** - * @param {?} mask - * @return {?} - */ - function (mask) { - var /** @type {?} */ pattern; - if (this.formatModel) { - pattern = mask.replace(/\\/g, '\\\\'); - pattern = pattern.replace(/\+/g, '\\+'); - pattern = pattern.replace(/\./g, '\\.'); - pattern = pattern.replace(/-/g, '-'); - pattern = pattern.replace(/\(/g, '\\('); - pattern = pattern.replace(/\)/g, '\\)'); - pattern = pattern.replace(/\//g, '\\/'); - pattern = pattern.replace(/\s/g, '\\s'); - pattern = pattern.replace(/:/g, '\\:'); - pattern = pattern.replace(/\@(?!\s)/g, '\\w'); - pattern = pattern.replace(/\d/g, '\\w'); - } - else { - pattern = mask.replace(/\\/g, ''); - pattern = pattern.replace(/\+/g, ''); - pattern = pattern.replace(/\./g, ''); - pattern = pattern.replace(/-/g, ''); - pattern = pattern.replace(/\(/g, ''); - pattern = pattern.replace(/\)/g, ''); - pattern = pattern.replace(/\//g, ''); - pattern = pattern.replace(/\s/g, ''); - pattern = pattern.replace(/:/g, ''); - pattern = pattern.replace(/\@/g, '\\w'); - pattern = pattern.replace(/\d/g, '\\w'); - } - return pattern; - }; - return ThfMask; -}()); -/** - * Para usar o thf-mask é preciso instanciar esta classe passando a máscara como - * primeiro parâmetro, e no segundo parâmetro, deve se informado true, caso queira - * que o model seja formatado ou false para o que o model seja limpo. - */ - -function ThfMask_tsickle_Closure_declarations() { - /** @type {?} */ - ThfMask.prototype.mask; - /** @type {?} */ - ThfMask.prototype.formatModel; - /** @type {?} */ - ThfMask.prototype.initialPosition; - /** @type {?} */ - ThfMask.prototype.finalPosition; - /** @type {?} */ - ThfMask.prototype.pattern; - /** @type {?} */ - ThfMask.prototype.valueToInput; - /** @type {?} */ - ThfMask.prototype.valueToModel; - /** @type {?} */ - ThfMask.prototype.formattingEnds; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-login/thf-login.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfLoginComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_input_generic_thf_input_generic__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-input-generic/thf-input-generic.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfInputBaseComponent - * - * \@description - * O thf-login é um input específico para login. Já possui tipo, estilo e ícone predefinidos. - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfLoginComponent = /** @class */ (function (_super) { - __extends(ThfLoginComponent, _super); - function ThfLoginComponent(el) { - var _this = _super.call(this, el) || this; - _this.type = 'text'; - return _this; - } - /** - * @param {?} c - * @return {?} - */ - ThfLoginComponent.prototype.extraValidation = /** - * @param {?} c - * @return {?} - */ - function (c) { - return null; - }; - ThfLoginComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-login', template: "
    ", - providers: [ - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["f" /* NG_VALUE_ACCESSOR */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfLoginComponent; }), - multi: true, - }, - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["e" /* NG_VALIDATORS */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfLoginComponent; }), - multi: true, - } - ] - },] }, - ]; - /** @nocollapse */ - ThfLoginComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - return ThfLoginComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_input_generic_thf_input_generic__["a" /* ThfInputGeneric */])); - -function ThfLoginComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfLoginComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfLoginComponent.ctorParameters; - /** @type {?} */ - ThfLoginComponent.prototype.type; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-lookup/services/thf-lookup-modal.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfLookupModalService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__services_thf_component_injector_thf_component_injector_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-component-injector/thf-component-injector.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_lookup_modal_thf_lookup_modal_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-lookup/thf-lookup-modal/thf-lookup-modal.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsPrivate - * - * Serviço responsável por controlar a abertura do componente Thf Lookup Modal. - */ -var ThfLookupModalService = /** @class */ (function () { - function ThfLookupModalService(thfComponentInjector) { - this.thfComponentInjector = thfComponentInjector; - this.componentRef = null; - this.selectValueEvent = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - /** - * Método responsável por abrir a modal de busca das informações. - * - * @param service {ThfLookupFilter} Serviço responsável por realizar a busca no serviço dos dados. - * @param columns {Array} Definição das colunas na modal de busca. - * @param title {string} Definição do título da modal. - */ - /** - * Método responsável por abrir a modal de busca das informações. - * - * @param {?} service {ThfLookupFilter} Serviço responsável por realizar a busca no serviço dos dados. - * @param {?} columns {Array} Definição das colunas na modal de busca. - * @param {?} title {string} Definição do título da modal. - * @return {?} - */ - ThfLookupModalService.prototype.openModal = /** - * Método responsável por abrir a modal de busca das informações. - * - * @param {?} service {ThfLookupFilter} Serviço responsável por realizar a busca no serviço dos dados. - * @param {?} columns {Array} Definição das colunas na modal de busca. - * @param {?} title {string} Definição do título da modal. - * @return {?} - */ - function (service, columns, title) { - var _this = this; - this.componentRef = this.thfComponentInjector.createComponentInApplication(__WEBPACK_IMPORTED_MODULE_2__thf_lookup_modal_thf_lookup_modal_component__["a" /* ThfLookupModalComponent */]); - this.componentRef.instance.title = title; - this.componentRef.instance.columns = columns; - this.componentRef.instance.filterService = service; - this.componentRef.instance.model.subscribe(function ($event) { - _this.selectValue($event); - }); - this.componentRef.changeDetectorRef.detectChanges(); - this.componentRef.instance.openModal(); - }; - // Este metodo é chamado quando é selecionado um item na lookup modal. - /** - * @param {?} value - * @return {?} - */ - ThfLookupModalService.prototype.selectValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (value) { - this.selectValueEvent.emit(value); - } - this.componentRef.destroy(); - }; - ThfLookupModalService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, - ]; - /** @nocollapse */ - ThfLookupModalService.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__services_thf_component_injector_thf_component_injector_service__["a" /* ThfComponentInjectorService */], }, - ]; }; - return ThfLookupModalService; -}()); - -function ThfLookupModalService_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfLookupModalService.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfLookupModalService.ctorParameters; - /** @type {?} */ - ThfLookupModalService.prototype.componentRef; - /** @type {?} */ - ThfLookupModalService.prototype.selectValueEvent; - /** @type {?} */ - ThfLookupModalService.prototype.thfComponentInjector; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-lookup/thf-lookup-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfLookupBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_thf_field_validators__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/validators.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * - * Componente utilizado para abrir uma janela de busca com uma tabela que lista dados de um serviço. Nesta janela é possível buscar e - * selecionar o registro que será enviado para o campo. O thf-lookup permite que o usuário digite um valor e pressione a tecla TAB para - * buscar um registro. - * - * Este componente não é recomendado quando a busca dos dados possuir poucas informações, para isso utilize outros componentes como o - * thf-select ou o thf-combo. - * - * @abstract - */ -var ThfLookupBaseComponent = /** @class */ (function () { - function ThfLookupBaseComponent() { - this._disabled = false; - this._required = false; - this._focus = false; - this.validators = {}; - this.onChangePropagate = null; - this.onTouched = null; - this.readyToValidation = false; - /** - * Mensagem que aparecerá enquanto o campo não estiver preenchido. - */ - this.placeholder = ''; - } - Object.defineProperty(ThfLookupBaseComponent.prototype, "required", { - get: /** - * @return {?} - */ - function () { - return this._required; - }, - set: /** - * \@description - * - * Indica que o campo será obrigatório. Esta propriedade é desconsiderada quando o campo está desabilitado (t-disabled). - * - * \@default false - * \@optional - * @param {?} required - * @return {?} - */ - function (required) { - this._required = /** @type {?} */ (required) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(required); - this.updateModelToValidate(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfLookupBaseComponent.prototype, "focus", { - get: /** - * @return {?} - */ - function () { - return this._focus; - }, - set: /** - * \@description - * - * Indica que o campo iniciará com foco. - * - * \@default false - * \@optional - * @param {?} focus - * @return {?} - */ - function (focus) { - this._focus = /** @type {?} */ (focus) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(focus); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfLookupBaseComponent.prototype, "disabled", { - get: /** - * @return {?} - */ - function () { - return this._disabled; - }, - set: /** - * \@description - * - * Indica que o campo será desabilitado. - * - * \@default false - * \@optional - * @param {?} disabled - * @return {?} - */ - function (disabled) { - this._disabled = /** @type {?} */ (disabled) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(disabled); - this.updateModelToValidate(); - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfLookupBaseComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - this.initializeColumn(); - }; - /** - * @return {?} - */ - ThfLookupBaseComponent.prototype.ngAfterContentChecked = /** - * @return {?} - */ - function () { - // Seta esta variável para indicar que a tela já foi carregada e podem ser aplicadas as validações - // A partir desse momento, toda vez que uma propriedade que interfere na validação, for alterada, o model será atualizado - // para que o campo seja validado novamente. - this.readyToValidation = true; - }; - /** - * @return {?} - */ - ThfLookupBaseComponent.prototype.initializeColumn = /** - * @return {?} - */ - function () { - if (this.fieldLabel) { - this.keysDescription = [this.fieldLabel]; - } - else { - this.keysDescription = []; - this.keysDescription = this.columns.filter(function (element) { return element.fieldLabel; }) - .map(function (element) { return element.column; }); - } - }; - // Limpa somente o campo de texto. - /** - * @return {?} - */ - ThfLookupBaseComponent.prototype.cleanModel = /** - * @return {?} - */ - function () { - this.setModelValue(''); - this.oldValue = null; - this.valueToModel = null; - this.callOnChange(undefined); - }; - // Formata a label do campo. - /** - * @param {?} value - * @return {?} - */ - ThfLookupBaseComponent.prototype.getFormattedLabel = /** - * @param {?} value - * @return {?} - */ - function (value) { - return value ? this.keysDescription.map(function (column) { return value[column]; }).join(' - ') : ''; - }; - // Chama o método writeValue e preenche o model. - /** - * @param {?} value - * @return {?} - */ - ThfLookupBaseComponent.prototype.selectModel = /** - * @param {?} value - * @return {?} - */ - function (value) { - this.writeValue(value); - if (value && value instanceof Object) { - this.selectValue(value); - } - }; - /** - * @param {?} c - * @return {?} - */ - ThfLookupBaseComponent.prototype.validate = /** - * @param {?} c - * @return {?} - */ - function (c) { - if (Object(__WEBPACK_IMPORTED_MODULE_2__components_thf_field_validators__["g" /* requiredFailed */])(this.required, this.disabled, c.value)) { - return { - required: { - valid: false, - } - }; - } - }; - /** - * @return {?} - */ - ThfLookupBaseComponent.prototype.updateModelToValidate = /** - * @return {?} - */ - function () { - // Emite a atualização do model caso esta propriedade seja alterada dinamicamente. - if (this.readyToValidation) { - this.callOnChange(this.valueToModel); - } - }; - // Função implementada do ControlValueAccessor. - // Usada para interceptar as mudanças e não atualizar automaticamente o Model. - /** - * @param {?} func - * @return {?} - */ - ThfLookupBaseComponent.prototype.registerOnChange = /** - * @param {?} func - * @return {?} - */ - function (func) { - this.onChangePropagate = func; - }; - // Função implementada do ControlValueAccessor. - // Usada para interceptar as mudanças e não atualizar automaticamente o Model. - /** - * @param {?} func - * @return {?} - */ - ThfLookupBaseComponent.prototype.registerOnTouched = /** - * @param {?} func - * @return {?} - */ - function (func) { - this.onTouched = func; - }; - // Seleciona o valor do model. - /** - * @param {?} valueSelected - * @return {?} - */ - ThfLookupBaseComponent.prototype.selectValue = /** - * @param {?} valueSelected - * @return {?} - */ - function (valueSelected) { - this.valueToModel = valueSelected[this.fieldValue]; - this.callOnChange(this.valueToModel); - }; - /** - * @param {?} value - * @return {?} - */ - ThfLookupBaseComponent.prototype.callOnChange = /** - * @param {?} value - * @return {?} - */ - function (value) { - // Quando o input não possui um formulário, então esta função não é registrada. - if (this.onChangePropagate) { - this.onChangePropagate(value); - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfLookupBaseComponent.prototype.searchById = /** - * @param {?} value - * @return {?} - */ - function (value) { - var _this = this; - this.service.getObjectByValue(value).subscribe(function (element) { - if (element) { - _this.valueToModel = element[_this.fieldValue]; - _this.oldValue = element[_this.fieldLabel]; - _this.setModelValue(_this.getFormattedLabel(element)); - _this.selectValue(element); - } - else { - _this.cleanModel(); - } - }); - }; - /** - * @param {?} value - * @return {?} - */ - ThfLookupBaseComponent.prototype.writeValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (value && value instanceof Object) { - // Esta condição é executada quando é retornado o objeto selecionado do componente Thf Lookup Modal. - this.oldValue = value[this.fieldLabel]; - this.valueToModel = value[this.fieldValue]; - this.setModelValue(this.getFormattedLabel(value)); - } - else if (value) { - // Esta condição é executada somente quando é passado o ID para realizar a busca pelo ID. - this.searchById(value); - } - else { - this.cleanModel(); - } - }; - ThfLookupBaseComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "help": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-help',] },], - "placeholder": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-placeholder',] },], - "name": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['name',] },], - "title": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-title',] },], - "fieldValue": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-field-value',] },], - "fieldLabel": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-field-label',] },], - "columns": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-columns',] },], - "service": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-filter-service',] },], - "required": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-required',] },], - "focus": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-focus',] },], - "disabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled',] },], - }; - return ThfLookupBaseComponent; -}()); - -function ThfLookupBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfLookupBaseComponent.propDecorators; - /** @type {?} */ - ThfLookupBaseComponent.prototype._disabled; - /** @type {?} */ - ThfLookupBaseComponent.prototype._required; - /** @type {?} */ - ThfLookupBaseComponent.prototype._focus; - /** @type {?} */ - ThfLookupBaseComponent.prototype.validators; - /** @type {?} */ - ThfLookupBaseComponent.prototype.onChangePropagate; - /** @type {?} */ - ThfLookupBaseComponent.prototype.onTouched; - /** @type {?} */ - ThfLookupBaseComponent.prototype.readyToValidation; - /** @type {?} */ - ThfLookupBaseComponent.prototype.valueToModel; - /** @type {?} */ - ThfLookupBaseComponent.prototype.keysDescription; - /** @type {?} */ - ThfLookupBaseComponent.prototype.oldValue; - /** - * Label do campo. - * @type {?} - */ - ThfLookupBaseComponent.prototype.label; - /** - * Texto de apoio do campo. - * @type {?} - */ - ThfLookupBaseComponent.prototype.help; - /** - * Mensagem que aparecerá enquanto o campo não estiver preenchido. - * @type {?} - */ - ThfLookupBaseComponent.prototype.placeholder; - /** - * Nome e Id do componente. - * @type {?} - */ - ThfLookupBaseComponent.prototype.name; - /** - * Titulo da janela de busca dos dados. - * @type {?} - */ - ThfLookupBaseComponent.prototype.title; - /** - * Indica a coluna que será utilizada como valor do campo. - * @type {?} - */ - ThfLookupBaseComponent.prototype.fieldValue; - /** - * Indica a coluna que será utilizada como descrição do campo e como filtro dentro da janela. - * @type {?} - */ - ThfLookupBaseComponent.prototype.fieldLabel; - /** - * Lista das colunas da tabela. - * Essa propriedade deve receber um array de objetos que implementam a interface ThfLookupColumn. - * @type {?} - */ - ThfLookupBaseComponent.prototype.columns; - /** - * Serviço responsável por buscar os dados da tabela na janela. - * @type {?} - */ - ThfLookupBaseComponent.prototype.service; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfLookupBaseComponent.prototype.setModelValue = function (value) { }; - /** - * @abstract - * @return {?} - */ - ThfLookupBaseComponent.prototype.getModelValue = function () { }; - /** - * @abstract - * @return {?} - */ - ThfLookupBaseComponent.prototype.openLookup = function () { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-lookup/thf-lookup-modal/thf-lookup-modal-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfLookupModalBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * Classe base do componente Thf Lookup Modal. - * @abstract - */ -var ThfLookupModalBaseComponent = /** @class */ (function () { - function ThfLookupModalBaseComponent() { - this.searchValue = ''; - this.isLoading = false; - this.hasNext = true; - this.page = 1; - this.pageSize = 10; - /** - * Evento utilizado ao selecionar um registro da tabela. - */ - this.model = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - /** - * @return {?} - */ - ThfLookupModalBaseComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - this.initializeData(); - }; - /** - * @return {?} - */ - ThfLookupModalBaseComponent.prototype.initializeData = /** - * @return {?} - */ - function () { - var _this = this; - this.isLoading = true; - this.filterService.getFilteredData('', this.page, this.pageSize).subscribe(function (data) { - _this.items = data.items; - _this.hasNext = data.hasNext; - _this.isLoading = false; - }); - }; - /** - * @return {?} - */ - ThfLookupModalBaseComponent.prototype.search = /** - * @return {?} - */ - function () { - var _this = this; - this.page = 1; - if (this.searchValue) { - this.isLoading = true; - this.filterService.getFilteredData(this.searchValue, this.page, this.pageSize).subscribe(function (data) { - _this.items = data.items; - _this.hasNext = data.hasNext; - _this.isLoading = false; - }); - } - else { - this.initializeData(); - } - }; - /** - * @return {?} - */ - ThfLookupModalBaseComponent.prototype.showMoreEvent = /** - * @return {?} - */ - function () { - var _this = this; - this.page++; - this.filterService.getFilteredData(this.searchValue, this.page, this.pageSize).subscribe(function (data) { - data.items.forEach(function (item) { - _this.items.push(item); - }); - _this.hasNext = data.hasNext; - }); - }; - ThfLookupModalBaseComponent.propDecorators = { - "columns": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-columns',] },], - "items": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-items',] },], - "title": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-title',] },], - "filterService": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-filter-service',] },], - "model": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change-model',] },], - }; - return ThfLookupModalBaseComponent; -}()); - -function ThfLookupModalBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfLookupModalBaseComponent.propDecorators; - /** @type {?} */ - ThfLookupModalBaseComponent.prototype.searchValue; - /** @type {?} */ - ThfLookupModalBaseComponent.prototype.isLoading; - /** @type {?} */ - ThfLookupModalBaseComponent.prototype.hasNext; - /** @type {?} */ - ThfLookupModalBaseComponent.prototype.page; - /** @type {?} */ - ThfLookupModalBaseComponent.prototype.pageSize; - /** - * Lista das colunas da tabela. - * Essa propriedade deve receber um array de objetos que implementam a interface ThfLookupColumn. - * @type {?} - */ - ThfLookupModalBaseComponent.prototype.columns; - /** - * Lista de itens da tabela. - * @type {?} - */ - ThfLookupModalBaseComponent.prototype.items; - /** - * Título da modal. - * @type {?} - */ - ThfLookupModalBaseComponent.prototype.title; - /** - * Classe de serviço com a implementação do cliente. - * @type {?} - */ - ThfLookupModalBaseComponent.prototype.filterService; - /** - * Evento utilizado ao selecionar um registro da tabela. - * @type {?} - */ - ThfLookupModalBaseComponent.prototype.model; - /** - * @abstract - * @return {?} - */ - ThfLookupModalBaseComponent.prototype.openModal = function () { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-lookup/thf-lookup-modal/thf-lookup-modal.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfLookupModalComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__ = __webpack_require__("../../../../rxjs/_esm5/Observable.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_lookup_modal_thf_lookup_modal_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-lookup/thf-lookup-modal/thf-lookup-modal-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_thf_modal_thf_modal_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-modal/thf-modal.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsPrivate - * - * \@docsExtends ThfLookupModalBaseComponent - */ -var ThfLookupModalComponent = /** @class */ (function (_super) { - __extends(ThfLookupModalComponent, _super); - function ThfLookupModalComponent() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.keyUpObservable = null; - _this.containerHeight = 375; - _this.tableHeight = 370; - _this.primaryAction = { - action: function () { - _this.items.forEach(function (element) { - if (element['$selected']) { - _this.model.emit(element); - _this.thfModal.close(); - } - }); - }, - label: 'Selecionar' - }; - _this.secondaryAction = { - action: function () { - _this.model.emit(null); - _this.thfModal.close(); - }, - label: 'Cancelar' - }; - return _this; - } - /** - * @return {?} - */ - ThfLookupModalComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - _super.prototype.ngOnInit.call(this); - this.initializeEventInput(); - this.setTableHeight(); - }; - /** - * @return {?} - */ - ThfLookupModalComponent.prototype.initializeEventInput = /** - * @return {?} - */ - function () { - var _this = this; - this.keyUpObservable = __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__["a" /* Observable */] - .fromEvent(this.inputSearchEl.nativeElement, 'keyup') - .filter(function (e) { return _this.validateEnterPressed(e); }) - .debounceTime(400); - this.keyUpObservable.subscribe(function () { - _this.search(); - }); - }; - /** - * @return {?} - */ - ThfLookupModalComponent.prototype.openModal = /** - * @return {?} - */ - function () { - this.thfModal.open(); - }; - /** - * @return {?} - */ - ThfLookupModalComponent.prototype.setTableHeight = /** - * @return {?} - */ - function () { - if (window.innerHeight < 615) { - this.tableHeight -= 50; - this.containerHeight -= 50; - } - }; - /** - * @param {?} e - * @return {?} - */ - ThfLookupModalComponent.prototype.validateEnterPressed = /** - * @param {?} e - * @return {?} - */ - function (e) { - return e.keyCode === 13; - }; - ThfLookupModalComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-lookup-modal', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfLookupModalComponent.ctorParameters = function () { return []; }; - ThfLookupModalComponent.propDecorators = { - "inputSearchEl": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['inpsearch',] },], - "thfModal": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: [__WEBPACK_IMPORTED_MODULE_3__components_thf_modal_thf_modal_component__["a" /* ThfModalComponent */],] },], - }; - return ThfLookupModalComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_lookup_modal_thf_lookup_modal_base_component__["a" /* ThfLookupModalBaseComponent */])); - -function ThfLookupModalComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfLookupModalComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfLookupModalComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfLookupModalComponent.propDecorators; - /** @type {?} */ - ThfLookupModalComponent.prototype.inputSearchEl; - /** @type {?} */ - ThfLookupModalComponent.prototype.thfModal; - /** @type {?} */ - ThfLookupModalComponent.prototype.keyUpObservable; - /** @type {?} */ - ThfLookupModalComponent.prototype.containerHeight; - /** @type {?} */ - ThfLookupModalComponent.prototype.tableHeight; - /** @type {?} */ - ThfLookupModalComponent.prototype.primaryAction; - /** @type {?} */ - ThfLookupModalComponent.prototype.secondaryAction; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-lookup/thf-lookup.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfLookupComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_lookup_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-lookup/thf-lookup-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_thf_lookup_modal_service__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-lookup/services/thf-lookup-modal.service.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsExtends ThfLookupBaseComponent - * - * \@description - * - * Quando existe muitos dados o thf-lookup por padrão traz apenas 10 itens na tabela e os demais são carregados por demanda através do - * botão 'Carregar mais resultados'. Para que funcione corretamente, é importante que o serviço siga o - * (Guia de implementação das APIs TOTVS)[http://tdn.totvs.com/pages/releaseview.action?pageId=271660444]. - * - * Importante: - * - Caso o thf-lookup não esteja dentro de um form, será preciso adicionar ngDefaultControl ao componente: - * ``` - * - * - * ``` - * - * - Caso o thf-lookup contenha o [(ngModel)] sem o atributo name, ocorrerá um erro de angular. - * Então será necessário informar o atributo name ou o atributo [ngModelOptions]="{standalone: true}". - * ``` - * - * - * ``` - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfLookupComponent = /** @class */ (function (_super) { - __extends(ThfLookupComponent, _super); - function ThfLookupComponent(thfLookupModalService, el) { - var _this = _super.call(this) || this; - _this.thfLookupModalService = thfLookupModalService; - _this.el = el; - return _this; - } - /** - * @return {?} - */ - ThfLookupComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - _super.prototype.ngOnInit.call(this); - }; - /** - * @return {?} - */ - ThfLookupComponent.prototype.openLookup = /** - * @return {?} - */ - function () { - var _this = this; - if (!this.disabled) { - this.thfLookupModalService.openModal(this.service, this.columns, this.title); - this.thfLookupModalService.selectValueEvent.subscribe(function (element) { - _this.selectModel(element); - }); - } - }; - /** - * @param {?} event - * @return {?} - */ - ThfLookupComponent.prototype.eventOnInput = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ value = event.target.value; - this.inputEl.nativeElement.value = value; - }; - /** - * @param {?} value - * @return {?} - */ - ThfLookupComponent.prototype.setModelValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - this.inputEl.nativeElement.value = this.valueToModel ? value : ''; - }; - /** - * @return {?} - */ - ThfLookupComponent.prototype.getModelValue = /** - * @return {?} - */ - function () { - return this.inputEl.nativeElement.value; - }; - /** - * @return {?} - */ - ThfLookupComponent.prototype.searchEvent = /** - * @return {?} - */ - function () { - var /** @type {?} */ value = this.getModelValue(); - if (this.oldValue !== value) { - this.selectModel(value); - } - }; - ThfLookupComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-lookup', template: "
    ", - providers: [ - __WEBPACK_IMPORTED_MODULE_3__services_thf_lookup_modal_service__["a" /* ThfLookupModalService */], - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["f" /* NG_VALUE_ACCESSOR */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfLookupComponent; }), - multi: true, - }, - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["e" /* NG_VALIDATORS */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfLookupComponent; }), - multi: true, - } - ] - },] }, - ]; - /** @nocollapse */ - ThfLookupComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_3__services_thf_lookup_modal_service__["a" /* ThfLookupModalService */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - ThfLookupComponent.propDecorators = { - "inputEl": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['inp', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - }; - return ThfLookupComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_lookup_base_component__["a" /* ThfLookupBaseComponent */])); - -function ThfLookupComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfLookupComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfLookupComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfLookupComponent.propDecorators; - /** @type {?} */ - ThfLookupComponent.prototype.el; - /** @type {?} */ - ThfLookupComponent.prototype.inputEl; - /** @type {?} */ - ThfLookupComponent.prototype.thfLookupModalService; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-multiselect/thf-multiselect-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfMultiselectBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__validators__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/validators.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_multiselect_filter_mode_enum__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-multiselect/thf-multiselect-filter-mode.enum.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@description - * - * O thf-multiselect é um componente de múltipla seleção. - * Este componente é recomendado para dar ao usuário a opção de selecionar vários itens em uma lista. - * - * Quando a lista possuir poucos itens, deve-se dar preferência para o uso do thf-checkbox-group, por ser mais simples - * e mais rápido para a seleção do usuário. - * - * Este componente também não deve ser utilizado em casos onde a seleção seja única. Nesses casos, deve-se utilizar o - * thf-select, thf-combo ou thf-radio-group. - * @abstract - */ -var ThfMultiselectBaseComponent = /** @class */ (function () { - function ThfMultiselectBaseComponent() { - this._disabled = false; - this._filterMode = __WEBPACK_IMPORTED_MODULE_3__thf_multiselect_filter_mode_enum__["a" /* ThfMultiselectFilterMode */].startsWith; - this._focus = false; - this._hideSearch = false; - this._required = false; - this._sort = false; - this.firstInWriteValue = true; - this.readyToValidation = false; - this.selectedOptions = []; - this.visibleOptionsDropdown = []; - this.visibleDisclaimers = []; - /** - * Mensagem apresentada enquanto o campo estiver vazio. - */ - this.placeholder = ''; - /** - * \@description - * - * Placeholder do campo de pesquisa. - * - * \@default Buscar - */ - this.placeholderSearch = 'Buscar'; - /** - * Pode ser informada uma função que será disparada quando houver alterações no ngModel. - */ - this.change = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - Object.defineProperty(ThfMultiselectBaseComponent.prototype, "required", { - get: /** - * @return {?} - */ - function () { - return this._required; - }, - set: /** - * \@description - * - * Indica que o campo será obrigatório. Esta propriedade é desconsiderada quando o campo está desabilitado (t-disabled). - * - * \@default false - * \@optional - * @param {?} required - * @return {?} - */ - function (required) { - this._required = /** @type {?} */ (required) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(required); - this.updateModelToValidate(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfMultiselectBaseComponent.prototype, "disabled", { - get: /** - * @return {?} - */ - function () { - return this._disabled; - }, - set: /** - * \@description - * - * Indica que o campo será desabilitado. - * - * \@default false - * \@optional - * @param {?} disabled - * @return {?} - */ - function (disabled) { - this._disabled = /** @type {?} */ (disabled) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(disabled); - this.updateModelToValidate(); - this.updateVisibleItems(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfMultiselectBaseComponent.prototype, "hideSearch", { - get: /** - * @return {?} - */ - function () { - return this._hideSearch; - }, - set: /** - * \@description - * - * Esconde o campo de pesquisa existente dentro do dropdown do thf-multiselect. - * - * \@default false - * \@optional - * @param {?} hideSearch - * @return {?} - */ - function (hideSearch) { - this._hideSearch = /** @type {?} */ (hideSearch) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(hideSearch); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfMultiselectBaseComponent.prototype, "options", { - get: /** - * @return {?} - */ - function () { - return this._options; - }, - set: /** - * \@description - * - * Nesta propriedade deve ser definida uma lista de objetos que implementam a interface ThfMultiselectOption. - * Esta lista deve conter os valores e os labels que serão apresentados na tela. - * @param {?} options - * @return {?} - */ - function (options) { - this._options = options; - this.validAndSortOptions(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfMultiselectBaseComponent.prototype, "sort", { - get: /** - * @return {?} - */ - function () { - return this._sort; - }, - set: /** - * \@description - * - * Indica que a lista definida na propriedade t-options será ordenada pelo label antes de ser apresentada no - * dropdown. - * - * \@default false - * \@optional - * @param {?} sort - * @return {?} - */ - function (sort) { - this._sort = /** @type {?} */ (sort) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(sort); - this.validAndSortOptions(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfMultiselectBaseComponent.prototype, "focus", { - get: /** - * @return {?} - */ - function () { - return this._focus; - }, - set: /** - * \@description - * - * Indica que o campo iniciará com foco. - * - * \@default false - * \@optional - * @param {?} focus - * @return {?} - */ - function (focus) { - this._focus = /** @type {?} */ (focus) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(focus); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfMultiselectBaseComponent.prototype, "filterMode", { - get: /** - * @return {?} - */ - function () { - return this._filterMode; - }, - set: /** - * \@description - * - * Define o modo de pesquisa utilizado no campo de busca, quando habilitado. - * Valores definidos no enum: ThfMultiselectFilterMode - * - * \@default startsWith - * \@optional - * @param {?} filterMode - * @return {?} - */ - function (filterMode) { - this._filterMode = (filterMode in __WEBPACK_IMPORTED_MODULE_3__thf_multiselect_filter_mode_enum__["a" /* ThfMultiselectFilterMode */]) ? filterMode : __WEBPACK_IMPORTED_MODULE_3__thf_multiselect_filter_mode_enum__["a" /* ThfMultiselectFilterMode */].startsWith; - switch (this._filterMode.toString()) { - case 'startsWith': - this._filterMode = __WEBPACK_IMPORTED_MODULE_3__thf_multiselect_filter_mode_enum__["a" /* ThfMultiselectFilterMode */].startsWith; - break; - case 'contains': - this._filterMode = __WEBPACK_IMPORTED_MODULE_3__thf_multiselect_filter_mode_enum__["a" /* ThfMultiselectFilterMode */].contains; - break; - case 'endsWith': - this._filterMode = __WEBPACK_IMPORTED_MODULE_3__thf_multiselect_filter_mode_enum__["a" /* ThfMultiselectFilterMode */].endsWith; - break; - } - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - this.updateList(this.options); - }; - /** - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.ngAfterContentChecked = /** - * @return {?} - */ - function () { - // Seta esta variável para indicar que a tela já foi carregada e podem ser aplicadas as validações. - // A partir desse momento, toda vez que uma propriedade que interfere na validação, for alterada, o model será atualizado - // para que o campo seja validado novamente. - this.readyToValidation = true; - }; - /** - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.validAndSortOptions = /** - * @return {?} - */ - function () { - if (this.options && this.options.length) { - Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["l" /* removeUndefinedAndNullOptions */])(this.options); - Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["k" /* removeDuplicatedOptions */])(this.options); - this.setUndefinedLabels(this.options); - if (this.sort) { - Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["m" /* sortOptionsByProperty */])(this.options, 'label'); - } - } - }; - /** - * @param {?} options - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.setUndefinedLabels = /** - * @param {?} options - * @return {?} - */ - function (options) { - options.forEach(function (option) { - if (!option['label']) { - option.label = option.value; - } - }); - }; - /** - * @param {?} options - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.updateList = /** - * @param {?} options - * @return {?} - */ - function (options) { - if (options) { - this.visibleOptionsDropdown = options; - } - }; - // Emite a atualização do model caso esta propriedade seja alterada dinamicamente. - /** - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.updateModelToValidate = /** - * @return {?} - */ - function () { - var _this = this; - if (this.readyToValidation) { - // Este timeout é necessário para quando for atualizado o model e uma propriedade do Datepicker ao mesmo tempo. - // Caso contrário, o writeValue não é disparado, não atualizando o model do componente. - setTimeout(function () { - _this.callOnChange(_this.selectedOptions); - }); - } - }; - /** - * @param {?} selectedOptions - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.callOnChange = /** - * @param {?} selectedOptions - * @return {?} - */ - function (selectedOptions) { - if (this.onModelChange) { - this.onModelChange(this.getValuesFromOptions(selectedOptions)); - this.eventChange(selectedOptions); - } - }; - /** - * @param {?} selectedOptions - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.eventChange = /** - * @param {?} selectedOptions - * @return {?} - */ - function (selectedOptions) { - if (selectedOptions && this.lastLengthModel !== selectedOptions.length) { - this.change.emit(); - } - this.lastLengthModel = selectedOptions ? selectedOptions.length : null; - }; - /** - * @param {?} selectedOptions - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.getValuesFromOptions = /** - * @param {?} selectedOptions - * @return {?} - */ - function (selectedOptions) { - return selectedOptions && selectedOptions.length ? selectedOptions.map(function (option) { return option.value; }) : []; - }; - /** - * @param {?} value - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.getLabelByValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ index = this.options.findIndex(function (option) { return option.value === value; }); - return this.options[index].label; - }; - /** - * @param {?} selectedValues - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.changeItems = /** - * @param {?} selectedValues - * @return {?} - */ - function (selectedValues) { - this.updateSelectedOptions(selectedValues); - this.callOnChange(this.selectedOptions); - }; - /** - * @param {?} search - * @param {?} options - * @param {?} filterMode - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.searchByLabel = /** - * @param {?} search - * @param {?} options - * @param {?} filterMode - * @return {?} - */ - function (search, options, filterMode) { - var _this = this; - if (search && options && options.length) { - var /** @type {?} */ newOptions_1 = []; - options.forEach(function (option) { - if (option.label && _this.compareMethod(search, option, filterMode)) { - newOptions_1.push(option); - } - }); - this.visibleOptionsDropdown = newOptions_1; - } - }; - /** - * @param {?} search - * @param {?} option - * @param {?} filterMode - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.compareMethod = /** - * @param {?} search - * @param {?} option - * @param {?} filterMode - * @return {?} - */ - function (search, option, filterMode) { - switch (filterMode) { - case __WEBPACK_IMPORTED_MODULE_3__thf_multiselect_filter_mode_enum__["a" /* ThfMultiselectFilterMode */].startsWith: - return this.startsWith(search, option); - case __WEBPACK_IMPORTED_MODULE_3__thf_multiselect_filter_mode_enum__["a" /* ThfMultiselectFilterMode */].contains: - return this.contains(search, option); - case __WEBPACK_IMPORTED_MODULE_3__thf_multiselect_filter_mode_enum__["a" /* ThfMultiselectFilterMode */].endsWith: - return this.endsWith(search, option); - } - }; - /** - * @param {?} search - * @param {?} option - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.startsWith = /** - * @param {?} search - * @param {?} option - * @return {?} - */ - function (search, option) { - return option.label.toLowerCase().startsWith(search.toLowerCase()); - }; - /** - * @param {?} search - * @param {?} option - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.contains = /** - * @param {?} search - * @param {?} option - * @return {?} - */ - function (search, option) { - return option.label.toLowerCase().indexOf(search.toLowerCase()) > -1; - }; - /** - * @param {?} search - * @param {?} option - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.endsWith = /** - * @param {?} search - * @param {?} option - * @return {?} - */ - function (search, option) { - return option.label.toLowerCase().endsWith(search.toLowerCase()); - }; - /** - * @param {?} c - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.validate = /** - * @param {?} c - * @return {?} - */ - function (c) { - if (Object(__WEBPACK_IMPORTED_MODULE_2__validators__["g" /* requiredFailed */])(this.required, this.disabled, c.value)) { - return { required: { - valid: false, - } }; - } - return null; - }; - /** - * @param {?} values - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.updateSelectedOptions = /** - * @param {?} values - * @return {?} - */ - function (values) { - var _this = this; - this.selectedOptions = []; - values.forEach(function (value) { - _this.options.forEach(function (option) { - if (option.value === value) { - _this.selectedOptions.push(option); - } - }); - }); - this.updateVisibleItems(); - }; - /** - * @param {?} values - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.writeValue = /** - * @param {?} values - * @return {?} - */ - function (values) { - if (this.firstInWriteValue) { - this.firstInWriteValue = false; - return; - } - if (!values) { - values = []; - this.callOnChange([]); - } - // Validar se todos os items existem entre os options, senão atualizar o model - this.updateSelectedOptions(values); - if (this.selectedOptions.length < values.length) { - this.callOnChange(this.selectedOptions); - } - }; - /** - * @param {?} fn - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.registerOnChange = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.onModelChange = fn; - }; - /** - * @param {?} fn - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.registerOnTouched = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.onModelTouched = fn; - }; - ThfMultiselectBaseComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "help": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-help',] },], - "placeholder": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-placeholder',] },], - "placeholderSearch": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-placeholder-search',] },], - "name": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['name',] },], - "required": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-required',] },], - "disabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled',] },], - "hideSearch": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-hide-search',] },], - "options": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-options',] },], - "sort": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-sort',] },], - "focus": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-focus',] },], - "filterMode": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-filter-mode',] },], - "change": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change',] },], - }; - return ThfMultiselectBaseComponent; -}()); - -function ThfMultiselectBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfMultiselectBaseComponent.propDecorators; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype._disabled; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype._filterMode; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype._focus; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype._hideSearch; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype._options; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype._required; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype._sort; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype.firstInWriteValue; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype.lastLengthModel; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype.onModelChange; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype.onModelTouched; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype.readyToValidation; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype.selectedOptions; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype.visibleOptionsDropdown; - /** @type {?} */ - ThfMultiselectBaseComponent.prototype.visibleDisclaimers; - /** - * Label no componente. - * @type {?} - */ - ThfMultiselectBaseComponent.prototype.label; - /** - * Texto de apoio para o campo. - * @type {?} - */ - ThfMultiselectBaseComponent.prototype.help; - /** - * Mensagem apresentada enquanto o campo estiver vazio. - * @type {?} - */ - ThfMultiselectBaseComponent.prototype.placeholder; - /** - * \@description - * - * Placeholder do campo de pesquisa. - * - * \@default Buscar - * @type {?} - */ - ThfMultiselectBaseComponent.prototype.placeholderSearch; - /** - * Nome do componente. - * @type {?} - */ - ThfMultiselectBaseComponent.prototype.name; - /** - * Pode ser informada uma função que será disparada quando houver alterações no ngModel. - * @type {?} - */ - ThfMultiselectBaseComponent.prototype.change; - /** - * @abstract - * @return {?} - */ - ThfMultiselectBaseComponent.prototype.updateVisibleItems = function () { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-multiselect/thf-multiselect-dropdown/thf-multiselect-dropdown.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfMultiselectDropdownComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_multiselect_search_thf_multiselect_search_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-multiselect/thf-multiselect-search/thf-multiselect-search.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsPrivate - * - * \@description - * - * Componente que construíra o dropdown, contendo o campo de pesquisa e os itens para seleção. - */ -var ThfMultiselectDropdownComponent = /** @class */ (function () { - function ThfMultiselectDropdownComponent() { - this.scrollTop = 0; - this.show = false; - /** - * Propriedade que indica se o campo de pesquisa deverá ser escondido. - */ - this.hideSearch = false; - /** - * Propriedade que recebe a lista de opções selecionadas. - */ - this.selectedValues = []; - /** - * Propriedade que recebe a lista de opções que deverão ser criadas no dropdown. - */ - this.options = []; - /** - * Evento disparado a cada tecla digitada na pesquisa. - */ - this.changeSearch = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento disparado a cada alteração na lista das opções selecionadas. - */ - this.change = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento disparado quando for detectada uma ação que necessite fechar o dropdown. - * Por exemplo, no caso de ser teclado TAB dentro do dropdown, então é disparado este evento - * para notificar o componente principal que deve fechar o dropdown. - */ - this.closeDropdown = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - /** - * @param {?} index - * @return {?} - */ - ThfMultiselectDropdownComponent.prototype.scrollTo = /** - * @param {?} index - * @return {?} - */ - function (index) { - this.scrollTop = (index <= 2) ? 0 : (index * 44) - 88; - }; - /** - * @param {?} option - * @return {?} - */ - ThfMultiselectDropdownComponent.prototype.isSelectedItem = /** - * @param {?} option - * @return {?} - */ - function (option) { - return this.selectedValues.some(function (selectedItem) { return selectedItem === option.value; }); - }; - /** - * @param {?} check - * @param {?} option - * @return {?} - */ - ThfMultiselectDropdownComponent.prototype.clickItem = /** - * @param {?} check - * @param {?} option - * @return {?} - */ - function (check, option) { - this.updateSelectedValues(check, option); - if (!this.hideSearch) { - this.searchElement.setFocus(); - } - }; - /** - * @param {?} checked - * @param {?} option - * @return {?} - */ - ThfMultiselectDropdownComponent.prototype.updateSelectedValues = /** - * @param {?} checked - * @param {?} option - * @return {?} - */ - function (checked, option) { - if (checked) { - this.selectedValues.push(option.value); - } - else { - var /** @type {?} */ indexSelectedValues = this.selectedValues.indexOf(option.value); - this.selectedValues.splice(indexSelectedValues, 1); - } - this.change.emit(this.selectedValues); - }; - /** - * @param {?} event - * @return {?} - */ - ThfMultiselectDropdownComponent.prototype.callChangeSearch = /** - * @param {?} event - * @return {?} - */ - function (event) { - this.changeSearch.emit(event); - }; - /** - * @param {?} event - * @return {?} - */ - ThfMultiselectDropdownComponent.prototype.onKeydown = /** - * @param {?} event - * @return {?} - */ - function (event) { - if (event.keyCode === 9) { - this.closeDropdown.emit(); - } - }; - /** - * @param {?} toOpen - * @return {?} - */ - ThfMultiselectDropdownComponent.prototype.controlVisibility = /** - * @param {?} toOpen - * @return {?} - */ - function (toOpen) { - var _this = this; - this.show = toOpen; - if (toOpen && !this.hideSearch) { - setTimeout(function () { - _this.searchElement.setFocus(); - _this.searchElement.clean(); - }); - } - }; - ThfMultiselectDropdownComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-multiselect-dropdown', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfMultiselectDropdownComponent.ctorParameters = function () { return []; }; - ThfMultiselectDropdownComponent.propDecorators = { - "hideSearch": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-hide-search',] },], - "placeholderSearch": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-placeholder-search',] },], - "selectedValues": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-selected-values',] },], - "options": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-options',] },], - "changeSearch": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change-search',] },], - "change": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change',] },], - "closeDropdown": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-close-dropdown',] },], - "ulElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['ulElement', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "searchElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['searchElement',] },], - "onKeydown": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["z" /* HostListener */], args: ['keydown', ['$event'],] },], - }; - return ThfMultiselectDropdownComponent; -}()); - -function ThfMultiselectDropdownComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfMultiselectDropdownComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfMultiselectDropdownComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfMultiselectDropdownComponent.propDecorators; - /** @type {?} */ - ThfMultiselectDropdownComponent.prototype.scrollTop; - /** @type {?} */ - ThfMultiselectDropdownComponent.prototype.show; - /** - * Propriedade que indica se o campo de pesquisa deverá ser escondido. - * @type {?} - */ - ThfMultiselectDropdownComponent.prototype.hideSearch; - /** - * Placeholder do campo de pesquisa. - * @type {?} - */ - ThfMultiselectDropdownComponent.prototype.placeholderSearch; - /** - * Propriedade que recebe a lista de opções selecionadas. - * @type {?} - */ - ThfMultiselectDropdownComponent.prototype.selectedValues; - /** - * Propriedade que recebe a lista de opções que deverão ser criadas no dropdown. - * @type {?} - */ - ThfMultiselectDropdownComponent.prototype.options; - /** - * Evento disparado a cada tecla digitada na pesquisa. - * @type {?} - */ - ThfMultiselectDropdownComponent.prototype.changeSearch; - /** - * Evento disparado a cada alteração na lista das opções selecionadas. - * @type {?} - */ - ThfMultiselectDropdownComponent.prototype.change; - /** - * Evento disparado quando for detectada uma ação que necessite fechar o dropdown. - * Por exemplo, no caso de ser teclado TAB dentro do dropdown, então é disparado este evento - * para notificar o componente principal que deve fechar o dropdown. - * @type {?} - */ - ThfMultiselectDropdownComponent.prototype.closeDropdown; - /** @type {?} */ - ThfMultiselectDropdownComponent.prototype.ulElement; - /** @type {?} */ - ThfMultiselectDropdownComponent.prototype.searchElement; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-multiselect/thf-multiselect-filter-mode.enum.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfMultiselectFilterMode; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** @enum {number} */ -var ThfMultiselectFilterMode = { - /** Verifica se o texto *inicia* com o valor pesquisado. */ - startsWith: 0, - /** Verifica se o texto *contém* o valor pesquisado. */ - contains: 1, - /** Verifica se o texto *finaliza* com o valor pesquisado. */ - endsWith: 2, -}; - -ThfMultiselectFilterMode[ThfMultiselectFilterMode.startsWith] = "startsWith"; -ThfMultiselectFilterMode[ThfMultiselectFilterMode.contains] = "contains"; -ThfMultiselectFilterMode[ThfMultiselectFilterMode.endsWith] = "endsWith"; - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-multiselect/thf-multiselect-item/thf-multiselect-item.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfMultiselectItemComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * Componente que constrói cada item no dropdown, contendo o checkbox e o label. - */ -var ThfMultiselectItemComponent = /** @class */ (function () { - function ThfMultiselectItemComponent() { - /** - * Opção que irá gerar o item, implementando a interface ThfMultiselectOption. - */ - this.option = null; - /** - * Esta propriedade indica se o campo está selecionado ou não. - */ - this.selected = false; - /** - * Evento que será disparado toda vez que o usuário marcar ou desmarcar um item. - */ - this.change = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - /** - * @return {?} - */ - ThfMultiselectItemComponent.prototype.itemClicked = /** - * @return {?} - */ - function () { - this.selected = !this.selected; - this.change.emit(this.selected); - }; - ThfMultiselectItemComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-multiselect-item', template: "
  • " - },] }, - ]; - /** @nocollapse */ - ThfMultiselectItemComponent.ctorParameters = function () { return []; }; - ThfMultiselectItemComponent.propDecorators = { - "option": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-option',] },], - "selected": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-selected',] },], - "change": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change',] },], - }; - return ThfMultiselectItemComponent; -}()); - -function ThfMultiselectItemComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfMultiselectItemComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfMultiselectItemComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfMultiselectItemComponent.propDecorators; - /** - * Opção que irá gerar o item, implementando a interface ThfMultiselectOption. - * @type {?} - */ - ThfMultiselectItemComponent.prototype.option; - /** - * Esta propriedade indica se o campo está selecionado ou não. - * @type {?} - */ - ThfMultiselectItemComponent.prototype.selected; - /** - * Evento que será disparado toda vez que o usuário marcar ou desmarcar um item. - * @type {?} - */ - ThfMultiselectItemComponent.prototype.change; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-multiselect/thf-multiselect-search/thf-multiselect-search.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfMultiselectSearchComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * Componente de pesquisa que será criado dentro do dropdown do thf-multiselect. - */ -var ThfMultiselectSearchComponent = /** @class */ (function () { - function ThfMultiselectSearchComponent() { - /** - * Evento que será disparado a cada tecla digitada no campo de busca. - */ - this.change = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - /** - * @param {?} event - * @return {?} - */ - ThfMultiselectSearchComponent.prototype.onChange = /** - * @param {?} event - * @return {?} - */ - function (event) { - this.change.emit({ event: event, value: this.inputElement.nativeElement.value }); - }; - /** - * @return {?} - */ - ThfMultiselectSearchComponent.prototype.setFocus = /** - * @return {?} - */ - function () { - this.inputElement.nativeElement.focus(); - }; - /** - * @return {?} - */ - ThfMultiselectSearchComponent.prototype.clean = /** - * @return {?} - */ - function () { - this.inputElement.nativeElement.value = ''; - }; - ThfMultiselectSearchComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-multiselect-search', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfMultiselectSearchComponent.ctorParameters = function () { return []; }; - ThfMultiselectSearchComponent.propDecorators = { - "placeholder": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-placeholder',] },], - "change": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change',] },], - "inputElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['inputElement', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - }; - return ThfMultiselectSearchComponent; -}()); - -function ThfMultiselectSearchComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfMultiselectSearchComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfMultiselectSearchComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfMultiselectSearchComponent.propDecorators; - /** - * Placeholder do campo de pesquisa. - * @type {?} - */ - ThfMultiselectSearchComponent.prototype.placeholder; - /** - * Evento que será disparado a cada tecla digitada no campo de busca. - * @type {?} - */ - ThfMultiselectSearchComponent.prototype.change; - /** @type {?} */ - ThfMultiselectSearchComponent.prototype.inputElement; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-multiselect/thf-multiselect.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfMultiselectComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_multiselect_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-multiselect/thf-multiselect-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfMultiselectBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfMultiselectComponent = /** @class */ (function (_super) { - __extends(ThfMultiselectComponent, _super); - function ThfMultiselectComponent(renderer, el) { - var _this = _super.call(this) || this; - _this.el = el; - _this.disclaimerOffset = 0; - _this.dropdownIcon = 'thf-icon-arrow-down'; - _this.dropdownOpen = false; - _this.initialized = false; - _this.visibleElement = false; - renderer.listen('document', 'click', function (event) { - _this.wasClickedOnToggle(event); - }); - renderer.listen('window', 'resize', function (event) { - _this.updateVisibleItems(); - }); - return _this; - } - /** - * @return {?} - */ - ThfMultiselectComponent.prototype.ngAfterViewInit = /** - * @return {?} - */ - function () { - if (this.focus) { - this.inputElement.nativeElement.focus(); - } - this.initialized = true; - }; - /** - * @return {?} - */ - ThfMultiselectComponent.prototype.ngDoCheck = /** - * @return {?} - */ - function () { - // Permite que os disclaimers sejam calculados na primeira vez que o componente torna-se visível, - // evitando com isso, problemas com Tabs ou Divs que iniciem escondidas. - if (this.el.nativeElement.offsetWidth && !this.visibleElement && this.initialized) { - this.debounceResize(); - this.visibleElement = true; - return; - } - }; - /** - * @return {?} - */ - ThfMultiselectComponent.prototype.getInputWidth = /** - * @return {?} - */ - function () { - return this.el.nativeElement.querySelector('.thf-input').offsetWidth - 40; - }; - /** - * @return {?} - */ - ThfMultiselectComponent.prototype.getDisclaimersWidth = /** - * @return {?} - */ - function () { - var /** @type {?} */ disclaimers = this.el.nativeElement.querySelectorAll('thf-disclaimer'); - return Array.from(disclaimers).map(function (disclaimer) { return disclaimer['offsetWidth']; }); - }; - /** - * @return {?} - */ - ThfMultiselectComponent.prototype.calculateVisibleItems = /** - * @return {?} - */ - function () { - var /** @type {?} */ disclaimersWidth = this.getDisclaimersWidth(); - var /** @type {?} */ inputWidth = this.getInputWidth(); - var /** @type {?} */ extraDisclaimerSize = 38; - this.visibleDisclaimers = []; - var /** @type {?} */ sum = 0; - var /** @type {?} */ i = 0; - for (i = 0; i < this.selectedOptions.length; i++) { - sum += disclaimersWidth[i]; - this.visibleDisclaimers.push(this.selectedOptions[i]); - if (sum > inputWidth) { - sum -= disclaimersWidth[i]; - break; - } - } - if (i === this.selectedOptions.length) { - return; - } - if (sum + extraDisclaimerSize > inputWidth) { - this.visibleDisclaimers.splice(-2, 2); - var /** @type {?} */ label = '+' + (this.selectedOptions.length + 1 - i).toString(); - this.visibleDisclaimers.push({ value: '', label: label }); - } - else { - this.visibleDisclaimers.splice(-1, 1); - var /** @type {?} */ label = '+' + (this.selectedOptions.length - i).toString(); - this.visibleDisclaimers.push({ value: '', label: label }); - } - }; - /** - * @return {?} - */ - ThfMultiselectComponent.prototype.updateVisibleItems = /** - * @return {?} - */ - function () { - this.visibleDisclaimers = [].concat(this.selectedOptions); - this.debounceResize(); - }; - /** - * @return {?} - */ - ThfMultiselectComponent.prototype.debounceResize = /** - * @return {?} - */ - function () { - var _this = this; - clearTimeout(this.timeoutResize); - this.timeoutResize = setTimeout(function () { - _this.calculateVisibleItems(); - }, 200); - }; - /** - * @param {?=} event - * @return {?} - */ - ThfMultiselectComponent.prototype.onKeyDown = /** - * @param {?=} event - * @return {?} - */ - function (event) { - // Seta para cima e para baixo - if (event.keyCode === 38 || event.keyCode === 40) { - event.preventDefault(); - this.controlDropdownVisibility(true); - return; - } - // Tab - if (event.keyCode === 9) { - this.controlDropdownVisibility(false); - return; - } - }; - /** - * @return {?} - */ - ThfMultiselectComponent.prototype.toggleDropdownVisibility = /** - * @return {?} - */ - function () { - if (this.disabled) { - return; - } - this.controlDropdownVisibility(!this.dropdownOpen); - }; - /** - * @param {?} toOpen - * @return {?} - */ - ThfMultiselectComponent.prototype.openDropdown = /** - * @param {?} toOpen - * @return {?} - */ - function (toOpen) { - if (toOpen) { - this.controlDropdownVisibility(true); - } - }; - /** - * @param {?} toOpen - * @return {?} - */ - ThfMultiselectComponent.prototype.controlDropdownVisibility = /** - * @param {?} toOpen - * @return {?} - */ - function (toOpen) { - this.dropdownIcon = toOpen ? 'thf-icon-arrow-up' : 'thf-icon-arrow-down'; - this.dropdownOpen = toOpen; - this.dropdown.controlVisibility(toOpen); - if (toOpen) { - this.setPositionOpeningDropdown(); - } - else { - this.setVisibleOptionsDropdown(this.options); - } - }; - /** - * @return {?} - */ - ThfMultiselectComponent.prototype.setPositionOpeningDropdown = /** - * @return {?} - */ - function () { - var _this = this; - if (this.selectedOptions && this.selectedOptions.length) { - var /** @type {?} */ index = this.options.findIndex(function (option) { return option.value === _this.selectedOptions[0].value; }); - this.dropdown.scrollTo(index); - } - }; - /** - * @param {?} options - * @return {?} - */ - ThfMultiselectComponent.prototype.setVisibleOptionsDropdown = /** - * @param {?} options - * @return {?} - */ - function (options) { - this.visibleOptionsDropdown = options; - }; - /** - * @param {?} event - * @return {?} - */ - ThfMultiselectComponent.prototype.changeSearch = /** - * @param {?} event - * @return {?} - */ - function (event) { - if (event && event.value) { - this.searchByLabel(event.value, this.options, this.filterMode); - } - else { - this.setVisibleOptionsDropdown(this.options); - } - }; - /** - * @return {?} - */ - ThfMultiselectComponent.prototype.getPlaceholder = /** - * @return {?} - */ - function () { - return (this.placeholder && !this.visibleDisclaimers.length) ? this.placeholder : ''; - }; - /** - * @param {?} value - * @return {?} - */ - ThfMultiselectComponent.prototype.closeDisclaimer = /** - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ index = this.selectedOptions.findIndex(function (option) { return option.value === value; }); - this.selectedOptions.splice(index, 1); - this.updateVisibleItems(); - this.callOnChange(this.selectedOptions); - }; - /** - * @param {?} event - * @return {?} - */ - ThfMultiselectComponent.prototype.wasClickedOnToggle = /** - * @param {?} event - * @return {?} - */ - function (event) { - if (!this.inputElement.nativeElement.contains(event.target) && - !this.iconElement.nativeElement.contains(event.target) && - !this.dropdownElement.nativeElement.contains(event.target) && - !this.disclaimerContainerElement.nativeElement.contains(event.target) && - this.dropdownOpen) { - this.controlDropdownVisibility(false); - } - }; - ThfMultiselectComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-multiselect', template: "
    ", - providers: [ - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["f" /* NG_VALUE_ACCESSOR */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfMultiselectComponent; }), - multi: true, - }, - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["e" /* NG_VALIDATORS */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfMultiselectComponent; }), - multi: true, - } - ] - },] }, - ]; - /** @nocollapse */ - ThfMultiselectComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["X" /* Renderer2 */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - ThfMultiselectComponent.propDecorators = { - "dropdownElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['dropdownElement', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "dropdown": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['dropdownElement',] },], - "disclaimerContainerElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['disclaimerContainer', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "iconElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['iconElement', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "inputElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['inputElement', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - }; - return ThfMultiselectComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_multiselect_base_component__["a" /* ThfMultiselectBaseComponent */])); - -function ThfMultiselectComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfMultiselectComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfMultiselectComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfMultiselectComponent.propDecorators; - /** @type {?} */ - ThfMultiselectComponent.prototype.dropdownElement; - /** @type {?} */ - ThfMultiselectComponent.prototype.dropdown; - /** @type {?} */ - ThfMultiselectComponent.prototype.disclaimerContainerElement; - /** @type {?} */ - ThfMultiselectComponent.prototype.iconElement; - /** @type {?} */ - ThfMultiselectComponent.prototype.inputElement; - /** @type {?} */ - ThfMultiselectComponent.prototype.disclaimerOffset; - /** @type {?} */ - ThfMultiselectComponent.prototype.dropdownIcon; - /** @type {?} */ - ThfMultiselectComponent.prototype.dropdownOpen; - /** @type {?} */ - ThfMultiselectComponent.prototype.initialized; - /** @type {?} */ - ThfMultiselectComponent.prototype.positionDisclaimerExtra; - /** @type {?} */ - ThfMultiselectComponent.prototype.timeoutResize; - /** @type {?} */ - ThfMultiselectComponent.prototype.visibleElement; - /** @type {?} */ - ThfMultiselectComponent.prototype.el; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-number/thf-number-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfNumberBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__thf_input_generic_thf_input_generic__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-input-generic/thf-input-generic.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * @abstract - */ -var /** - * @abstract - */ -ThfNumberBaseComponent = /** @class */ (function (_super) { - __extends(ThfNumberBaseComponent, _super); - function ThfNumberBaseComponent(elementRef) { - return _super.call(this, elementRef) || this; - } - /** - * @param {?} e - * @return {?} - */ - ThfNumberBaseComponent.prototype.eventOnInput = /** - * @param {?} e - * @return {?} - */ - function (e) { - if (!this.mask) { - var /** @type {?} */ value = e.target.value; - var /** @type {?} */ valueMaxlength = this.validMaxLength(this.maxlength, value); - if (value !== valueMaxlength) { - value = valueMaxlength; - this.inputEl.nativeElement.value = value; - } - this.callOnChange(this.formatNumber(value)); - } - }; - /** - * @param {?} maxlength - * @param {?} value - * @return {?} - */ - ThfNumberBaseComponent.prototype.validMaxLength = /** - * @param {?} maxlength - * @param {?} value - * @return {?} - */ - function (maxlength, value) { - if (maxlength && value.length > maxlength) { - var /** @type {?} */ substringValue = value.toString().substring(0, maxlength); - if (substringValue && this.isEndWithDot(substringValue)) { - return substringValue.toString().substring(0, maxlength - 1); - } - return substringValue; - } - return value; - }; - /** - * @param {?} value - * @return {?} - */ - ThfNumberBaseComponent.prototype.writeValueModel = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (this.inputEl) { - if (value || value === 0) { - if (this.mask) { - this.inputEl.nativeElement.value = this.objMask.controlFormatting(String(value)); - // Se o model for definido como formatado, então precisa atualizá-lo no primeiro acesso - if (this.objMask.formatModel) { - this.onChangePropagate(this.objMask.valueToModel); - } - } - else { - this.inputEl.nativeElement.value = value; - } - } - else { - // Se for o valor for undefined, deve limpar o campo - this.inputEl.nativeElement.value = ''; - } - } - // Emite evento quando o model é atualizado, inclusive a primeira vez - this.change.emit(); - }; - /** - * @param {?} value - * @return {?} - */ - ThfNumberBaseComponent.prototype.isEndWithDot = /** - * @param {?} value - * @return {?} - */ - function (value) { - return value && value.lastIndexOf('.') === value.length - 1; - }; - /** - * @param {?} value - * @return {?} - */ - ThfNumberBaseComponent.prototype.formatNumber = /** - * @param {?} value - * @return {?} - */ - function (value) { - return value ? Number(value) : value; - }; - return ThfNumberBaseComponent; -}(__WEBPACK_IMPORTED_MODULE_0__thf_input_generic_thf_input_generic__["a" /* ThfInputGeneric */])); -/** - * @abstract - */ - - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-number/thf-number.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfNumberComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__validators__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/validators.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_number_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-number/thf-number-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsExtends ThfInputBaseComponent - * - * \@description - * - * thf-number é um input específico para receber apenas números. - * É possível configurar um valor mínimo, máximo e um step com t-min, t-max e t-step, - * respectivamente. - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfNumberComponent = /** @class */ (function (_super) { - __extends(ThfNumberComponent, _super); - function ThfNumberComponent(el) { - var _this = _super.call(this, el) || this; - /** - * \@optional - * - * \@description - * - * Intervalo. - * - * \@default 1 - */ - _this.step = '1'; - return _this; - } - Object.defineProperty(ThfNumberComponent.prototype, "setMin", { - set: /** - * @param {?} min - * @return {?} - */ - function (min) { - if (!isNaN(parseInt(min, 10))) { - this.min = parseInt(min, 10); - this.updateModelToValidate(); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfNumberComponent.prototype, "setMax", { - set: /** - * @param {?} max - * @return {?} - */ - function (max) { - if (!isNaN(parseInt(max, 10))) { - this.max = parseInt(max, 10); - this.updateModelToValidate(); - } - }, - enumerable: true, - configurable: true - }); - /** - * @param {?} c - * @return {?} - */ - ThfNumberComponent.prototype.extraValidation = /** - * @param {?} c - * @return {?} - */ - function (c) { - if (Object(__WEBPACK_IMPORTED_MODULE_2__validators__["d" /* minFailed */])(this.min, this.getScreenValue())) { - return { min: { - valid: false, - } }; - } - if (Object(__WEBPACK_IMPORTED_MODULE_2__validators__["b" /* maxFailed */])(this.max, this.getScreenValue())) { - return { max: { - valid: false, - } }; - } - return null; - }; - ThfNumberComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-number', template: "
    ", - providers: [ - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["f" /* NG_VALUE_ACCESSOR */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfNumberComponent; }), - multi: true, - }, - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["e" /* NG_VALIDATORS */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfNumberComponent; }), - multi: true, - } - ] - },] }, - ]; - /** @nocollapse */ - ThfNumberComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - ThfNumberComponent.propDecorators = { - "setMin": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-min',] },], - "setMax": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-max',] },], - "step": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-step',] },], - }; - return ThfNumberComponent; -}(__WEBPACK_IMPORTED_MODULE_3__thf_number_base_component__["a" /* ThfNumberBaseComponent */])); - -function ThfNumberComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfNumberComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfNumberComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfNumberComponent.propDecorators; - /** - * Valor mínimo - * @type {?} - */ - ThfNumberComponent.prototype.min; - /** - * Valor máximo - * @type {?} - */ - ThfNumberComponent.prototype.max; - /** - * \@optional - * - * \@description - * - * Intervalo. - * - * \@default 1 - * @type {?} - */ - ThfNumberComponent.prototype.step; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-password/thf-password.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPasswordComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_input_generic_thf_input_generic__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-input-generic/thf-input-generic.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfInputBaseComponent - * - * \@description - * O thf-password é um input específico para senhas. Já possui tipo, estilo e ícone predefinidos. - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfPasswordComponent = /** @class */ (function (_super) { - __extends(ThfPasswordComponent, _super); - function ThfPasswordComponent(el) { - var _this = _super.call(this, el) || this; - _this.type = 'password'; - return _this; - } - /** - * @param {?} c - * @return {?} - */ - ThfPasswordComponent.prototype.extraValidation = /** - * @param {?} c - * @return {?} - */ - function (c) { - return null; - }; - ThfPasswordComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-password', template: "
    ", - providers: [ - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["f" /* NG_VALUE_ACCESSOR */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfPasswordComponent; }), - multi: true, - }, - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["e" /* NG_VALIDATORS */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfPasswordComponent; }), - multi: true, - } - ] - },] }, - ]; - /** @nocollapse */ - ThfPasswordComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - return ThfPasswordComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_input_generic_thf_input_generic__["a" /* ThfInputGeneric */])); - -function ThfPasswordComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfPasswordComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfPasswordComponent.ctorParameters; - /** @type {?} */ - ThfPasswordComponent.prototype.type; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-radio-group/thf-radio-group-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfRadioGroupBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * - * O componente thf-radio-group deve ser utilizado para disponibilizar múltiplas opções ao usuário, permitindo a ele que - * selecione apenas uma delas. Seu uso é recomendado para um número pequeno de opções, caso contrário, recomenda-se o uso - * do thf-combo ou thf-select. - * - * O thf-radio-group nâo é um componente de multiseleção, se for este o caso, deve-se utilizar o thf-checkbox-group. - * Ao passar um valor para o model que não está na lista de opções, o model será definido como undefined. - * - * Importante: - * - Caso o thf-radio-group não esteja dentro de um form, é preciso adicionar ngDefaultControl ao componente. - * @abstract - */ -var ThfRadioGroupBaseComponent = /** @class */ (function () { - function ThfRadioGroupBaseComponent() { - this._disabled = false; - this._required = false; - /** - * Evento ao alterar valor do campo. - */ - this.change = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */]; - this.onChangePropagate = null; - this.onTouched = null; - } - Object.defineProperty(ThfRadioGroupBaseComponent.prototype, "disabled", { - get: /** - * @return {?} - */ - function () { - return this._disabled; - }, - set: /** - * \@optional - * - * \@description - * - * Indica que o campo será desabilitado. - * - * \@default `false` - * @param {?} disabled - * @return {?} - */ - function (disabled) { - this._disabled = disabled && disabled.toString() === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(disabled); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfRadioGroupBaseComponent.prototype, "required", { - get: /** - * @return {?} - */ - function () { - return this._required; - }, - set: /** - * \@optional - * - * \@description - * - * Indica que o campo será obrigatório. - * - * \@default `false` - * @param {?} required - * @return {?} - */ - function (required) { - this._required = required === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(required); - this.setValidators(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfRadioGroupBaseComponent.prototype, "options", { - get: /** - * @return {?} - */ - function () { - return this._options; - }, - set: /** - * Lista de opções que serão exibidas. - * Nesta propriedade deve ser definido um array de objetos que implementam a interface ThfRadioGroupOption. - * - * @param {?} value - * @return {?} - */ - function (value) { - this._options = value; - Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["k" /* removeDuplicatedOptions */])(this.options); - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfRadioGroupBaseComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - this.onInit(); - }; - /** - * @return {?} - */ - ThfRadioGroupBaseComponent.prototype.onInit = /** - * @return {?} - */ - function () { - this.setValidators(); - }; - /** - * @return {?} - */ - ThfRadioGroupBaseComponent.prototype.setValidators = /** - * @return {?} - */ - function () { - if (this.ngControl) { - this.ngControl.valueAccessor = this; - this.ngControl.control.setValidators(this.getValidatorRequired()); - this.ngControl.control.updateValueAndValidity(); - } - }; - /** - * @return {?} - */ - ThfRadioGroupBaseComponent.prototype.getValidatorRequired = /** - * @return {?} - */ - function () { - return (!this.disabled && this.required) ? [__WEBPACK_IMPORTED_MODULE_1__angular_forms__["i" /* Validators */].required] : []; - }; - // Função que controla quando deve ser emitido onChange e atualiza o Model - /** - * @param {?} value - * @return {?} - */ - ThfRadioGroupBaseComponent.prototype.changeValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (this.selectCheckedValue !== value) { - this.change.emit(value); - } - this.selectCheckedValue = value; - if (this.onChangePropagate) { - this.onChangePropagate(this.selectCheckedValue); - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfRadioGroupBaseComponent.prototype.writeValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ selected; - if (value !== undefined) { - // Busca radio com o valor especificado - selected = this.getElementByValue(value); - if (selected) { - selected.checked = true; - this.selectCheckedValue = value; - } - else { - if (this.onChangePropagate && value !== '') { - this.selectCheckedValue = undefined; - this.onChangePropagate(this.selectCheckedValue); - } - } - } - else { - selected = this.getCheckedElement(); - if (selected) { - selected.checked = false; - this.selectCheckedValue = undefined; - } - } - }; - /** - * @param {?} fn - * @return {?} - */ - ThfRadioGroupBaseComponent.prototype.registerOnChange = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.onChangePropagate = fn; - }; - /** - * @param {?} fn - * @return {?} - */ - ThfRadioGroupBaseComponent.prototype.registerOnTouched = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.onTouched = fn; - }; - ThfRadioGroupBaseComponent.propDecorators = { - "name": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['name',] },], - "disabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled',] },], - "required": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-required',] },], - "options": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-options',] },], - "change": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change',] },], - }; - return ThfRadioGroupBaseComponent; -}()); - -function ThfRadioGroupBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfRadioGroupBaseComponent.propDecorators; - /** @type {?} */ - ThfRadioGroupBaseComponent.prototype._disabled; - /** @type {?} */ - ThfRadioGroupBaseComponent.prototype._required; - /** @type {?} */ - ThfRadioGroupBaseComponent.prototype._options; - /** - * Nome dos radios. - * @type {?} - */ - ThfRadioGroupBaseComponent.prototype.name; - /** - * Evento ao alterar valor do campo. - * @type {?} - */ - ThfRadioGroupBaseComponent.prototype.change; - /** @type {?} */ - ThfRadioGroupBaseComponent.prototype.ngControl; - /** @type {?} */ - ThfRadioGroupBaseComponent.prototype.selectCheckedValue; - /** @type {?} */ - ThfRadioGroupBaseComponent.prototype.onChangePropagate; - /** @type {?} */ - ThfRadioGroupBaseComponent.prototype.onTouched; - /** - * @abstract - * @return {?} - */ - ThfRadioGroupBaseComponent.prototype.getCheckedElement = function () { }; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfRadioGroupBaseComponent.prototype.getElementByValue = function (value) { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-radio-group/thf-radio-group.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfRadioGroupComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_radio_group_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-radio-group/thf-radio-group-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsExtends ThfRadioGroupBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfRadioGroupComponent = /** @class */ (function (_super) { - __extends(ThfRadioGroupComponent, _super); - function ThfRadioGroupComponent(differs, ngControl) { - var _this = _super.call(this) || this; - _this.differ = differs.find([]).create(null); - _this.ngControl = ngControl; - return _this; - } - /** - * @return {?} - */ - ThfRadioGroupComponent.prototype.ngDoCheck = /** - * @return {?} - */ - function () { - var /** @type {?} */ change = this.differ.diff(this.options); - if (change) { - Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["k" /* removeDuplicatedOptions */])(this.options); - } - }; - /** - * @param {?} e - * @return {?} - */ - ThfRadioGroupComponent.prototype.onKeyup = /** - * @param {?} e - * @return {?} - */ - function (e) { - var /** @type {?} */ selected = this.getCheckedElement(); - if (selected) { - this.changeValue(selected.value); - } - }; - /** - * @param {?} value - * @param {?} disabled - * @return {?} - */ - ThfRadioGroupComponent.prototype.eventClick = /** - * @param {?} value - * @param {?} disabled - * @return {?} - */ - function (value, disabled) { - if (!disabled) { - this.changeValue(value); - } - }; - /** - * @return {?} - */ - ThfRadioGroupComponent.prototype.getCheckedElement = /** - * @return {?} - */ - function () { - return this.inputEl.nativeElement.querySelector('input:checked'); - }; - /** - * @param {?} value - * @return {?} - */ - ThfRadioGroupComponent.prototype.getElementByValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - return this.inputEl.nativeElement.querySelector("input[value='" + value + "']"); - }; - ThfRadioGroupComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-radio-group', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfRadioGroupComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["F" /* IterableDiffers */], }, - { type: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["g" /* NgControl */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["P" /* Optional */] },] }, - ]; }; - ThfRadioGroupComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "help": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-help',] },], - "inputEl": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['inp', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "onKeyup": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["z" /* HostListener */], args: ['keyup', ['$event'],] },], - }; - return ThfRadioGroupComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_radio_group_base_component__["a" /* ThfRadioGroupBaseComponent */])); - -function ThfRadioGroupComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfRadioGroupComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfRadioGroupComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfRadioGroupComponent.propDecorators; - /** - * Label do campo. - * @type {?} - */ - ThfRadioGroupComponent.prototype.label; - /** - * Texto de apoio do campo. - * @type {?} - */ - ThfRadioGroupComponent.prototype.help; - /** @type {?} */ - ThfRadioGroupComponent.prototype.inputEl; - /** @type {?} */ - ThfRadioGroupComponent.prototype.differ; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-select/thf-select-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfSelectBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__validators__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/validators.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * - * O componente thf-select exibe uma lista de valores e permite que o usuário selecione um desses valores. - * Os valores listados podem ser fixos ou dinâmicos de acordo com a necessidade do desenvolvedor, dando mais flexibilidade ao componente. - * O thf-select não permite que o usuário informe um valor diferente dos valores listados, isso garante a consistência da informação. - * O thf-select não permite que sejam passados valores duplicados, undefined e null para as opções, excluindo-os da lista. - * - * > Quando utilizar o componente fora da tag Form, deve ser informado a diretiva ngDefaultControl. - * - * > Ao passar um valor para o model que não está na lista de opções, o model será definido como undefined. - * @abstract - */ -var ThfSelectBaseComponent = /** @class */ (function () { - function ThfSelectBaseComponent(element, changeDetector) { - this.element = element; - this._disabled = false; - this._required = false; - /** - * Deve ser informada uma função que será disparada quando houver alterações no ngModel. - */ - this.change = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - // Função para atualizar o ngModel do componente, necessário quando não for utilizado dentro da tag form. - this.ngModelChange = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - this.readyToValidation = false; - this.element = element; - this.changeDetector = changeDetector; - } - Object.defineProperty(ThfSelectBaseComponent.prototype, "options", { - get: /** - * @return {?} - */ - function () { - return this._options; - }, - set: /** - * Nesta propriedade deve ser definido uma coleção de objetos que implementam a interface ThfSelectOption. - * Caso esta lista estiver vazia, o model será undefined. - * @param {?} options - * @return {?} - */ - function (options) { - this._options = options; - Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["k" /* removeDuplicatedOptions */])(this._options); - Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["l" /* removeUndefinedAndNullOptions */])(this._options); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfSelectBaseComponent.prototype, "disabled", { - get: /** - * @return {?} - */ - function () { - return this._disabled; - }, - set: /** - * \@optional - * - * \@description - * - * Indica que o campo será desabilitado. - * - * \@default `false` - * @param {?} disabled - * @return {?} - */ - function (disabled) { - this._disabled = disabled === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(disabled); - this.updateModelToValidate(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfSelectBaseComponent.prototype, "required", { - get: /** - * @return {?} - */ - function () { - return this._required; - }, - set: /** - * \@optional - * - * \@description - * - * Indica que o campo será obrigatório. - * - * \@default `false` - * @param {?} required - * @return {?} - */ - function (required) { - this._required = required === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(required); - this.updateModelToValidate(); - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfSelectBaseComponent.prototype.updateModelToValidate = /** - * @return {?} - */ - function () { - if (this.readyToValidation) { - this.callModelChange(this.getScreenValue()); - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfSelectBaseComponent.prototype.callModelChange = /** - * @param {?} value - * @return {?} - */ - function (value) { - // Caso o componente estiver dentro de um form, terá acesso ao método onModelChange. - return (this.onModelChange) ? this.onModelChange(value) : this.ngModelChange.emit(value); - }; - /** - * @return {?} - */ - ThfSelectBaseComponent.prototype.ngAfterViewChecked = /** - * @return {?} - */ - function () { - // Seta esta variável para indicar que a tela já foi carregada e podem ser aplicadas as validações a partir desse momento - // A partir desse momento, toda vez que uma propriedade que interfere na validação, for alterada, o model será atualizado - // para que o campo seja validado novamente. - this.readyToValidation = true; - }; - /** - * @return {?} - */ - ThfSelectBaseComponent.prototype.onChange = /** - * @return {?} - */ - function () { - this.change.emit(null); - }; - /** - * @param {?} c - * @return {?} - */ - ThfSelectBaseComponent.prototype.validate = /** - * @param {?} c - * @return {?} - */ - function (c) { - if (Object(__WEBPACK_IMPORTED_MODULE_2__validators__["g" /* requiredFailed */])(this._required, this._disabled, this.getScreenValue())) { - return { required: { - valid: false, - } }; - } - return this.extraValidation(c); - }; - /** - * @param {?} fn - * @return {?} - */ - ThfSelectBaseComponent.prototype.registerOnChange = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.onModelChange = fn; - }; - /** - * @param {?} fn - * @return {?} - */ - ThfSelectBaseComponent.prototype.registerOnTouched = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.onModelTouched = fn; - }; - ThfSelectBaseComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "name": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['name',] },], - "help": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-help',] },], - "placeholder": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-placeholder',] },], - "options": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-options',] },], - "change": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change',] },], - "ngModelChange": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['ngModelChange',] },], - "disabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled',] },], - "required": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-required',] },], - }; - return ThfSelectBaseComponent; -}()); - -function ThfSelectBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfSelectBaseComponent.propDecorators; - /** @type {?} */ - ThfSelectBaseComponent.prototype._options; - /** @type {?} */ - ThfSelectBaseComponent.prototype._disabled; - /** @type {?} */ - ThfSelectBaseComponent.prototype._required; - /** - * Adiciona uma label no componente. - * @type {?} - */ - ThfSelectBaseComponent.prototype.label; - /** - * Nome do componente. - * @type {?} - */ - ThfSelectBaseComponent.prototype.name; - /** - * Texto de apoio para o campo. - * @type {?} - */ - ThfSelectBaseComponent.prototype.help; - /** - * Mensagem que aparecerá enquanto nenhuma opção estiver selecionada - * @type {?} - */ - ThfSelectBaseComponent.prototype.placeholder; - /** - * Deve ser informada uma função que será disparada quando houver alterações no ngModel. - * @type {?} - */ - ThfSelectBaseComponent.prototype.change; - /** @type {?} */ - ThfSelectBaseComponent.prototype.ngModelChange; - /** @type {?} */ - ThfSelectBaseComponent.prototype.changeDetector; - /** @type {?} */ - ThfSelectBaseComponent.prototype.onModelChange; - /** @type {?} */ - ThfSelectBaseComponent.prototype.onModelTouched; - /** @type {?} */ - ThfSelectBaseComponent.prototype.readyToValidation; - /** @type {?} */ - ThfSelectBaseComponent.prototype.element; - /** - * @abstract - * @param {?} c - * @return {?} - */ - ThfSelectBaseComponent.prototype.extraValidation = function (c) { }; - /** - * @abstract - * @return {?} - */ - ThfSelectBaseComponent.prototype.getScreenValue = function () { }; - /** - * @abstract - * @param {?} selectOption - * @return {?} - */ - ThfSelectBaseComponent.prototype.updateModel = function (selectOption) { }; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfSelectBaseComponent.prototype.writeValue = function (value) { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-select/thf-select.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfSelectComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_select_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-select/thf-select-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * - * \@docsExtends ThfSelectBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfSelectComponent = /** @class */ (function (_super) { - __extends(ThfSelectComponent, _super); - function ThfSelectComponent(element, changeDetector, differs, renderer) { - var _this = _super.call(this, element, changeDetector) || this; - _this.open = false; - _this.selectIcon = 'thf-icon-arrow-down'; - _this.isMobile = Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["h" /* isMobile */])(); - _this.differ = differs.find([]).create(null); - renderer.listenGlobal('document', 'click', function (event) { - _this.wasClickedOnToggle(event); - }); - return _this; - } - /** - * @param {?=} $event - * @return {?} - */ - ThfSelectComponent.prototype.onKeydown = /** - * @param {?=} $event - * @return {?} - */ - function ($event) { - // Seleciona os itens com as teclas "up" e "down" - if (!this.open && ($event.keyCode === 40 || $event.keyCode === 38)) { - $event.preventDefault(); - this.toggleButton(); - } - // Abre o thf-select com as teclas "enter" e "espaço" - if ($event.keyCode === 13 || $event.keyCode === 32) { - $event.preventDefault(); - this.toggleButton(); - } - // Fecha o thf-select com a tecla "tab" - if (this.open && $event.keyCode === 9) { - $event.preventDefault(); - this.toggleButton(); - } - }; - /** - * @return {?} - */ - ThfSelectComponent.prototype.ngDoCheck = /** - * @return {?} - */ - function () { - var /** @type {?} */ change = this.differ.diff(this.options); - if (change) { - Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["k" /* removeDuplicatedOptions */])(this.options); - Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["l" /* removeUndefinedAndNullOptions */])(this.options); - } - }; - /** - * @return {?} - */ - ThfSelectComponent.prototype.toggleButton = /** - * @return {?} - */ - function () { - var /** @type {?} */ ulDropdpwn = this.element.nativeElement.querySelector('ul.thf-select-content'); - this.selectElement.nativeElement.focus(); - this.selectIcon = this.open ? 'thf-icon-arrow-down' : 'thf-icon-arrow-up'; - if (this.options && this.options.length) { - this.selector('.thf-select-container').classList.toggle('thf-select-show'); - ulDropdpwn.scrollTop = this.scrollPosition; - } - this.open = !this.open; - }; - // Altera o valor ao selecionar um item. - /** - * @param {?} value - * @return {?} - */ - ThfSelectComponent.prototype.onSelectChange = /** - * @param {?} value - * @return {?} - */ - function (value) { - var _this = this; - var /** @type {?} */ ulDropdpwn = this.element.nativeElement.querySelector('ul.thf-select-content'); - if (value && this.options && this.options.length) { - var /** @type {?} */ optionFound = this.options.find(function (option) { - return _this.isEqual(option.value, value); - }); - if (optionFound) { - var /** @type {?} */ index = this.options.indexOf(optionFound); - ulDropdpwn.scrollTop = this.scrollValue(index, ulDropdpwn.clientHeight); - this.updateModel(optionFound); - } - } - }; - /** - * @param {?} option - * @return {?} - */ - ThfSelectComponent.prototype.onOptionClick = /** - * @param {?} option - * @return {?} - */ - function (option) { - this.toggleButton(); - this.updateModel(option); - }; - // Recebe as alterações do model - /** - * @param {?} value - * @return {?} - */ - ThfSelectComponent.prototype.writeValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - var _this = this; - var /** @type {?} */ optionFound = this.options.find(function (option) { - return _this.isEqual(option.value, value); - }); - if (optionFound) { - this.selectElement.nativeElement.value = optionFound.value; - this.selectedValue = optionFound.value; - this.displayValue = (optionFound.label); - } - else if (Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["n" /* validValue */])(this.selectedValue)) { - this.selectElement.nativeElement.value = undefined; - this.callModelChange(undefined); - this.selectedValue = undefined; - this.displayValue = undefined; - } - this.changeDetector.detectChanges(); - }; - // Atualiza valores - /** - * @param {?} option - * @return {?} - */ - ThfSelectComponent.prototype.updateModel = /** - * @param {?} option - * @return {?} - */ - function (option) { - this.selectedValue = option.value; - this.selectElement.nativeElement.value = option.value; - this.callModelChange(option.value); - this.displayValue = option.label; - this.onChange(); - }; - /** - * @param {?} index - * @param {?} clientHeight - * @return {?} - */ - ThfSelectComponent.prototype.scrollValue = /** - * @param {?} index - * @param {?} clientHeight - * @return {?} - */ - function (index, clientHeight) { - var /** @type {?} */ heightScrollValue = index * 44; // 44 tamanho de cada li no UL; - return this.scrollPosition = heightScrollValue > clientHeight ? heightScrollValue : 0; - }; - /** - * @param {?} query - * @return {?} - */ - ThfSelectComponent.prototype.selector = /** - * @param {?} query - * @return {?} - */ - function (query) { - return this.element.nativeElement.querySelector(query); - }; - /** - * @return {?} - */ - ThfSelectComponent.prototype.hideDropDown = /** - * @return {?} - */ - function () { - this.selectIcon = 'thf-icon-arrow-down'; - this.selector('.thf-select-container').classList.remove('thf-select-show'); - this.open = false; - }; - // Esconde Content do Select quando for clicado fora - /** - * @param {?} event - * @return {?} - */ - ThfSelectComponent.prototype.wasClickedOnToggle = /** - * @param {?} event - * @return {?} - */ - function (event) { - if (!this.selectButtonElement.nativeElement.contains(event.target) && - !this.iconElement.nativeElement.contains(event.target)) { - this.hideDropDown(); - } - }; - /** - * @param {?} value - * @param {?} inputValue - * @return {?} - */ - ThfSelectComponent.prototype.isEqual = /** - * @param {?} value - * @param {?} inputValue - * @return {?} - */ - function (value, inputValue) { - if ((value || value === 0) && inputValue) { - return value.toString() === inputValue.toString(); - } - if ((value === null && inputValue !== null) || - (value === undefined && inputValue !== undefined)) { - value = "" + value; // Transformando em string - } - return value === inputValue; - }; - /** - * @param {?} c - * @return {?} - */ - ThfSelectComponent.prototype.extraValidation = /** - * @param {?} c - * @return {?} - */ - function (c) { - return null; - }; - /** - * @return {?} - */ - ThfSelectComponent.prototype.getScreenValue = /** - * @return {?} - */ - function () { - return this.selectElement ? this.selectElement.nativeElement.value : ''; - }; - ThfSelectComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-select', template: "
    {{ displayValue || placeholder }}
    ", - changeDetection: __WEBPACK_IMPORTED_MODULE_0__angular_core__["j" /* ChangeDetectionStrategy */].OnPush, - providers: [ - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["f" /* NG_VALUE_ACCESSOR */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfSelectComponent; }), - multi: true, - }, - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["e" /* NG_VALIDATORS */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfSelectComponent; }), - multi: true, - } - ] - },] }, - ]; - /** @nocollapse */ - ThfSelectComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["k" /* ChangeDetectorRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["F" /* IterableDiffers */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["W" /* Renderer */], }, - ]; }; - ThfSelectComponent.propDecorators = { - "selectElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['select', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "iconElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['icon', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "selectButtonElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['selectButton', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "onKeydown": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["z" /* HostListener */], args: ['keydown', ['$event'],] },], - }; - return ThfSelectComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_select_base_component__["a" /* ThfSelectBaseComponent */])); - -function ThfSelectComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfSelectComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfSelectComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfSelectComponent.propDecorators; - /** @type {?} */ - ThfSelectComponent.prototype.differ; - /** @type {?} */ - ThfSelectComponent.prototype.selectElement; - /** @type {?} */ - ThfSelectComponent.prototype.iconElement; - /** @type {?} */ - ThfSelectComponent.prototype.selectButtonElement; - /** @type {?} */ - ThfSelectComponent.prototype.selectedValue; - /** @type {?} */ - ThfSelectComponent.prototype.open; - /** @type {?} */ - ThfSelectComponent.prototype.selectIcon; - /** @type {?} */ - ThfSelectComponent.prototype.displayValue; - /** @type {?} */ - ThfSelectComponent.prototype.isMobile; - /** @type {?} */ - ThfSelectComponent.prototype.scrollPosition; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-switch/thf-switch-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfSwitchBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_switch_label_position_enum__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-switch/thf-switch-label-position.enum.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@description - * - * O componente thf-switch é um checkbox mais intuitivo, pois faz analogia a um interruptor. - * Deve ser usado quando quer se passar a ideia de ligar / desligar um funcionalidade específica. - * - * O texto exibido pode ser alterado de acordo com o valor setado aumentando as possibilidades de uso do componente, - * sendo assim é importante sempre informar textos que contextualizem seu uso facilitando a compreensão por parte dos usuários. - * - * > Quando utilizar o componente fora da tag Form, deve ser informado a diretiva ngDefaultControl. - */ -var ThfSwitchBaseComponent = /** @class */ (function () { - function ThfSwitchBaseComponent(ngControl) { - /** - * Texto exibido quando o componente estiver com o valor setado em *true*, se não for especificado um valor, - * será exibido o texto "true". - * - */ - this.labelOn = 'true'; - /** - * Texto exibido quando o componente estiver com o valor setado em *false*, se não for especificado um valor, - * será exibido o texto "false". - * - */ - this.labelOff = 'false'; - /** - * Posição de exibição do valor do switch, caso não seja especificado um valor, será exibido a direita do switch. - * - */ - this.labelPosition = __WEBPACK_IMPORTED_MODULE_3__thf_switch_label_position_enum__["a" /* ThfSwitchLabelPosition */].Right; - /** - * Indica se o campo será desabilitado. - */ - this.disabled = false; - /** - * Indica se o campo será obrigatório. - */ - this.required = false; - /** - * Evento disparado ao alterar valor do campo. - */ - this.change = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - // Função para atualizar o ngModel do componente, necessário quando não for utilizado dentro da tag form. - this.ngModelChange = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - this.switchValue = false; - this.ngControl = ngControl; - } - Object.defineProperty(ThfSwitchBaseComponent.prototype, "setLabelOn", { - set: /** - * @param {?} label - * @return {?} - */ - function (label) { - this.labelOn = label || 'true'; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfSwitchBaseComponent.prototype, "setLabelOff", { - set: /** - * @param {?} label - * @return {?} - */ - function (label) { - this.labelOff = label || 'false'; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfSwitchBaseComponent.prototype, "setLabelPosition", { - set: /** - * @param {?} position - * @return {?} - */ - function (position) { - this.labelPosition = (position in __WEBPACK_IMPORTED_MODULE_3__thf_switch_label_position_enum__["a" /* ThfSwitchLabelPosition */]) ? parseInt(/** @type {?} */ (position), 10) : __WEBPACK_IMPORTED_MODULE_3__thf_switch_label_position_enum__["a" /* ThfSwitchLabelPosition */].Right; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfSwitchBaseComponent.prototype, "setDisabled", { - set: /** - * @param {?} disabled - * @return {?} - */ - function (disabled) { - this.disabled = disabled === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(disabled); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfSwitchBaseComponent.prototype, "setRequired", { - set: /** - * @param {?} required - * @return {?} - */ - function (required) { - this.required = required === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(required); - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfSwitchBaseComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - // Adicionar este componente ao ngControl, para que o formulário encontre-o - if (this.ngControl) { - this.ngControl.valueAccessor = this; - if (this.required) { - this.ngControl.control.setValidators([__WEBPACK_IMPORTED_MODULE_1__angular_forms__["i" /* Validators */].required]); - } - } - }; - /** - * @return {?} - */ - ThfSwitchBaseComponent.prototype.eventClick = /** - * @return {?} - */ - function () { - if (!this.disabled) { - this.changeValue(!this.switchValue); - } - }; - /** - * @param {?} value - * @return {?} - */ - ThfSwitchBaseComponent.prototype.changeValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (this.switchValue !== value) { - this.switchValue = value; - this.change.emit(this.switchValue); - if (this.propagateChange) { - this.propagateChange(value); - } - else { - this.ngModelChange.emit(value); - } - } - }; - // Função implementada do ControlValueAccessor - /** - * @param {?} value - * @return {?} - */ - ThfSwitchBaseComponent.prototype.writeValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (value !== this.switchValue) { - this.switchValue = !!value; - } - }; - /** - * @param {?} fn - * @return {?} - */ - ThfSwitchBaseComponent.prototype.registerOnChange = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.propagateChange = fn; - }; - /** - * @param {?} fn - * @return {?} - */ - ThfSwitchBaseComponent.prototype.registerOnTouched = /** - * @param {?} fn - * @return {?} - */ - function (fn) { }; - /** @nocollapse */ - ThfSwitchBaseComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["g" /* NgControl */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["P" /* Optional */] },] }, - ]; }; - ThfSwitchBaseComponent.propDecorators = { - "name": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['name',] },], - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "help": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-help',] },], - "setLabelOn": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label-on',] },], - "setLabelOff": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label-off',] },], - "setLabelPosition": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label-position',] },], - "setDisabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled',] },], - "setRequired": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-required',] },], - "change": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change',] },], - "ngModelChange": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['ngModelChange',] },], - }; - return ThfSwitchBaseComponent; -}()); - -function ThfSwitchBaseComponent_tsickle_Closure_declarations() { - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfSwitchBaseComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfSwitchBaseComponent.propDecorators; - /** - * Nome do componente. - * @type {?} - */ - ThfSwitchBaseComponent.prototype.name; - /** - * Label exibido pelo componente. - * @type {?} - */ - ThfSwitchBaseComponent.prototype.label; - /** - * Texto de apoio para o campo. - * @type {?} - */ - ThfSwitchBaseComponent.prototype.help; - /** - * Texto exibido quando o componente estiver com o valor setado em *true*, se não for especificado um valor, - * será exibido o texto "true". - * - * @type {?} - */ - ThfSwitchBaseComponent.prototype.labelOn; - /** - * Texto exibido quando o componente estiver com o valor setado em *false*, se não for especificado um valor, - * será exibido o texto "false". - * - * @type {?} - */ - ThfSwitchBaseComponent.prototype.labelOff; - /** - * Posição de exibição do valor do switch, caso não seja especificado um valor, será exibido a direita do switch. - * - * @type {?} - */ - ThfSwitchBaseComponent.prototype.labelPosition; - /** - * Indica se o campo será desabilitado. - * @type {?} - */ - ThfSwitchBaseComponent.prototype.disabled; - /** - * Indica se o campo será obrigatório. - * @type {?} - */ - ThfSwitchBaseComponent.prototype.required; - /** - * Evento disparado ao alterar valor do campo. - * @type {?} - */ - ThfSwitchBaseComponent.prototype.change; - /** @type {?} */ - ThfSwitchBaseComponent.prototype.ngModelChange; - /** @type {?} */ - ThfSwitchBaseComponent.prototype.propagateChange; - /** @type {?} */ - ThfSwitchBaseComponent.prototype.switchValue; - /** @type {?} */ - ThfSwitchBaseComponent.prototype.ngControl; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-switch/thf-switch-label-position.enum.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfSwitchLabelPosition; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** @enum {number} */ -var ThfSwitchLabelPosition = { - /** Posiciona o label do lado esquerdo do switch. */ - Right: 0, - /** Posiciona o label do lado direito do switch. */ - Left: 1, -}; - -ThfSwitchLabelPosition[ThfSwitchLabelPosition.Right] = "Right"; -ThfSwitchLabelPosition[ThfSwitchLabelPosition.Left] = "Left"; - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-switch/thf-switch.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfSwitchComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_switch_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-switch/thf-switch-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_switch_label_position_enum__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-switch/thf-switch-label-position.enum.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsExtends ThfSwitchBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfSwitchComponent = /** @class */ (function (_super) { - __extends(ThfSwitchComponent, _super); - function ThfSwitchComponent(changeDetector, ngControl) { - var _this = _super.call(this, ngControl) || this; - _this.changeDetector = changeDetector; - return _this; - } - /** - * @return {?} - */ - ThfSwitchComponent.prototype.ngAfterViewChecked = /** - * @return {?} - */ - function () { - this.changeDetector.detectChanges(); - }; - /** - * @return {?} - */ - ThfSwitchComponent.prototype.getLabelPosition = /** - * @return {?} - */ - function () { - switch (this.labelPosition) { - case __WEBPACK_IMPORTED_MODULE_3__thf_switch_label_position_enum__["a" /* ThfSwitchLabelPosition */].Left: return 'left'; - case __WEBPACK_IMPORTED_MODULE_3__thf_switch_label_position_enum__["a" /* ThfSwitchLabelPosition */].Right: return 'right'; - default: return 'right'; - } - }; - /** - * @return {?} - */ - ThfSwitchComponent.prototype.getSwitchPosition = /** - * @return {?} - */ - function () { - switch (this.labelPosition) { - case __WEBPACK_IMPORTED_MODULE_3__thf_switch_label_position_enum__["a" /* ThfSwitchLabelPosition */].Left: return 'right'; - case __WEBPACK_IMPORTED_MODULE_3__thf_switch_label_position_enum__["a" /* ThfSwitchLabelPosition */].Right: return 'left'; - default: return 'left'; - } - }; - ThfSwitchComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-switch', template: "
    {{ switchValue === true ? labelOn : labelOff }}
    " - },] }, - ]; - /** @nocollapse */ - ThfSwitchComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["k" /* ChangeDetectorRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["g" /* NgControl */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["P" /* Optional */] },] }, - ]; }; - return ThfSwitchComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_switch_base_component__["a" /* ThfSwitchBaseComponent */])); - -function ThfSwitchComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfSwitchComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfSwitchComponent.ctorParameters; - /** @type {?} */ - ThfSwitchComponent.prototype.changeDetector; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-textarea/thf-textarea-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTextareaBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * - * Este é um componente de entrada de dados que possibilita o preechimento com múltiplas linhas. - * É recomendado para observações, detalhamentos e outras situações onde o usuário deva preencher com um texto. - * - * Para sua utilização, deve ser informada uma variável no ngModel que será responsável pela entrada e saída dos valores - * no componente. A propriedade name é obrigatória para que o formulário e o model funcionem corretamente. - * - * Importante: - * - Caso o thf-textarea não esteja dentro de um form, será preciso adicionar ngDefaultControl ao componente: - * ``` - * - * - * ``` - * - * - Caso o thf-textarea contenha o [(ngModel)] sem o atributo name, ocorrerá um erro de angular. - * Então será necessário informar o atributo name ou o atributo [ngModelOptions]="{standalone: true}". - * ``` - * - * - * ``` - * @abstract - */ -var ThfTextareaBaseComponent = /** @class */ (function () { - function ThfTextareaBaseComponent() { - this._disabled = false; - this._readonly = false; - this._required = false; - this._focus = false; - this._rows = 3; - this.onChangePropagate = null; - this.onTouched = null; - this.validators = {}; - /** - * Placeholder, mensagem que aparecerá enquanto o campo não estiver preenchido. - */ - this.placeholder = ''; - /** - * Evento disparado ao sair do campo. - */ - this.blur = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento disparado ao entrar do campo. - */ - this.enter = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento disparado ao alterar valor e deixar o campo. - */ - this.change = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento disparado ao alterar valor do model. - */ - this.changeModel = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - Object.defineProperty(ThfTextareaBaseComponent.prototype, "disabled", { - get: /** - * @return {?} - */ - function () { - return this._disabled; - }, - set: /** - * \@optional - * - * \@description - * - * Indica que o campo será desabilitado. - * - * \@default false - * @param {?} disabled - * @return {?} - */ - function (disabled) { - this._disabled = disabled != null && disabled.toString() === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(disabled); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTextareaBaseComponent.prototype, "readonly", { - get: /** - * @return {?} - */ - function () { - return this._readonly; - }, - set: /** - * \@optional - * - * \@description - * - * Indica que o campo será somente leitura. - * - * \@default false - * @param {?} readonly - * @return {?} - */ - function (readonly) { - this._readonly = readonly != null && readonly.toString() === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(readonly); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTextareaBaseComponent.prototype, "required", { - get: /** - * @return {?} - */ - function () { - return this._required; - }, - set: /** - * \@optional - * - * \@description - * - * Indica que o campo será obrigatório. Esta propriedade é desconsiderada quando o input está desabilitado (t-disabled). - * - * \@default false - * @param {?} required - * @return {?} - */ - function (required) { - this._required = required != null && required.toString() === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(required); - // Atualiza Validador do campo - this.validators['required'] = this.getValidatorRequired(); - this.updateValidators(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTextareaBaseComponent.prototype, "focus", { - get: /** - * @return {?} - */ - function () { - return this._focus; - }, - set: /** - * \@optional - * - * \@description - * - * Indica que o campo iniciará com foco. - * - * \@default false - * @param {?} focus - * @return {?} - */ - function (focus) { - this._focus = focus != null && focus.toString() === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(focus); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTextareaBaseComponent.prototype, "minLength", { - get: /** - * @return {?} - */ - function () { - return this._minLength; - }, - set: /** - * \@optional - * - * \@description - * - * Indica a quantidade mínima de caracteres que o campo aceita. - * @param {?} minLength - * @return {?} - */ - function (minLength) { - this._minLength = minLength; - // Atualiza Validador do campo - this.validators['minlength'] = this.getValidatorMinlength(); - this.updateValidators(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTextareaBaseComponent.prototype, "maxLength", { - get: /** - * @return {?} - */ - function () { - return this._maxLength; - }, - set: /** - * \@optional - * - * \@description - * - * Indica a quantidade máxima de caracteres que o campo aceita. - * @param {?} maxLength - * @return {?} - */ - function (maxLength) { - this._maxLength = maxLength; - // Atualiza Validador do campo - this.validators['maxlength'] = this.getValidatorMaxlength(); - this.updateValidators(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTextareaBaseComponent.prototype, "rows", { - get: /** - * @return {?} - */ - function () { - return this._rows; - }, - set: /** - * \@optional - * - * \@description - * - * Indica a quantidade de linhas que serão exibidas. - * - * \@default 3 - * @param {?} value - * @return {?} - */ - function (value) { - this._rows = isNaN(parseInt(/** @type {?} */ (value), 10)) || value < 3 ? 3 : parseInt(/** @type {?} */ (value), 10); - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfTextareaBaseComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - this.setValidators(); - }; - /** - * @return {?} - */ - ThfTextareaBaseComponent.prototype.setValidators = /** - * @return {?} - */ - function () { - // Adicionar este componente ao ngControl, para que o formulário encontre-o - if (this.ngControl) { - this.ngControl.valueAccessor = this; - // Validações do campo. Estas validações que irão tornar o campo e o formulário válidos ou inválidos - this.validators = {}; - this.validators['required'] = this.getValidatorRequired(); - this.validators['minlength'] = this.getValidatorMinlength(); - this.validators['maxlength'] = this.getValidatorMaxlength(); - this.updateValidators(); - } - }; - /** - * @return {?} - */ - ThfTextareaBaseComponent.prototype.getValidatorMinlength = /** - * @return {?} - */ - function () { - return (this.minLength) ? __WEBPACK_IMPORTED_MODULE_1__angular_forms__["i" /* Validators */].minLength(this.minLength) : null; - }; - /** - * @return {?} - */ - ThfTextareaBaseComponent.prototype.getValidatorRequired = /** - * @return {?} - */ - function () { - return (!this._disabled && this._required) ? __WEBPACK_IMPORTED_MODULE_1__angular_forms__["i" /* Validators */].required : null; - }; - /** - * @return {?} - */ - ThfTextareaBaseComponent.prototype.getValidatorMaxlength = /** - * @return {?} - */ - function () { - return (this.maxLength) ? __WEBPACK_IMPORTED_MODULE_1__angular_forms__["i" /* Validators */].maxLength(this.maxLength) : null; - }; - // Função implementada do ControlValueAccessor - // Usada para interceptar as mudanças e não atualizar automaticamente o Model - /** - * @param {?} func - * @return {?} - */ - ThfTextareaBaseComponent.prototype.registerOnChange = /** - * @param {?} func - * @return {?} - */ - function (func) { - this.onChangePropagate = func; - }; - // Função implementada do ControlValueAccessor - // Usada para interceptar as mudanças e não atualizar automaticamente o Model - /** - * @param {?} func - * @return {?} - */ - ThfTextareaBaseComponent.prototype.registerOnTouched = /** - * @param {?} func - * @return {?} - */ - function (func) { - this.onTouched = func; - }; - // Função implementada do ControlValueAccessor - /** - * @param {?} value - * @return {?} - */ - ThfTextareaBaseComponent.prototype.writeValue = /** - * @param {?} value - * @return {?} - */ - function (value) { - this.writeValueModel(value); - }; - /** - * @return {?} - */ - ThfTextareaBaseComponent.prototype.updateValidators = /** - * @return {?} - */ - function () { - if (this.ngControl) { - this.ngControl.control.setValidators(this.convertObjectToArray(this.validators)); - this.ngControl.control.updateValueAndValidity(); - } - }; - /** - * @param {?} validators - * @return {?} - */ - ThfTextareaBaseComponent.prototype.convertObjectToArray = /** - * @param {?} validators - * @return {?} - */ - function (validators) { - var /** @type {?} */ validatorsArr = []; - Object.keys(validators).forEach(function (key) { - if (validators[key]) { - validatorsArr.push(validators[key]); - } - }); - return validatorsArr; - }; - /** - * @param {?} value - * @return {?} - */ - ThfTextareaBaseComponent.prototype.callOnChange = /** - * @param {?} value - * @return {?} - */ - function (value) { - // Quando o input não possui um formulário, então esta função não é registrada - if (this.onChangePropagate) { - this.onChangePropagate(value); - } - this.controlChangeModelEmitter(value); - }; - /** - * @param {?} value - * @return {?} - */ - ThfTextareaBaseComponent.prototype.controlChangeModelEmitter = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (this.modelLastUpdate !== value) { - this.changeModel.emit(); - this.modelLastUpdate = value; - } - }; - ThfTextareaBaseComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "help": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-help',] },], - "placeholder": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-placeholder',] },], - "name": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['name',] },], - "disabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled',] },], - "readonly": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-readonly',] },], - "required": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-required',] },], - "focus": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-focus',] },], - "minLength": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-minlength',] },], - "maxLength": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-maxlength',] },], - "rows": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-rows',] },], - "blur": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-blur',] },], - "enter": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-enter',] },], - "change": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change',] },], - "changeModel": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change-model',] },], - }; - return ThfTextareaBaseComponent; -}()); - -function ThfTextareaBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfTextareaBaseComponent.propDecorators; - /** @type {?} */ - ThfTextareaBaseComponent.prototype._disabled; - /** @type {?} */ - ThfTextareaBaseComponent.prototype._readonly; - /** @type {?} */ - ThfTextareaBaseComponent.prototype._required; - /** @type {?} */ - ThfTextareaBaseComponent.prototype._focus; - /** @type {?} */ - ThfTextareaBaseComponent.prototype._minLength; - /** @type {?} */ - ThfTextareaBaseComponent.prototype._maxLength; - /** @type {?} */ - ThfTextareaBaseComponent.prototype._rows; - /** @type {?} */ - ThfTextareaBaseComponent.prototype.onChangePropagate; - /** @type {?} */ - ThfTextareaBaseComponent.prototype.onTouched; - /** @type {?} */ - ThfTextareaBaseComponent.prototype.validators; - /** @type {?} */ - ThfTextareaBaseComponent.prototype.modelLastUpdate; - /** @type {?} */ - ThfTextareaBaseComponent.prototype.ngControl; - /** - * Label do campo. - * @type {?} - */ - ThfTextareaBaseComponent.prototype.label; - /** - * Texto de apoio do campo. - * @type {?} - */ - ThfTextareaBaseComponent.prototype.help; - /** - * Placeholder, mensagem que aparecerá enquanto o campo não estiver preenchido. - * @type {?} - */ - ThfTextareaBaseComponent.prototype.placeholder; - /** - * Nome e Id do componente. - * @type {?} - */ - ThfTextareaBaseComponent.prototype.name; - /** - * Evento disparado ao sair do campo. - * @type {?} - */ - ThfTextareaBaseComponent.prototype.blur; - /** - * Evento disparado ao entrar do campo. - * @type {?} - */ - ThfTextareaBaseComponent.prototype.enter; - /** - * Evento disparado ao alterar valor e deixar o campo. - * @type {?} - */ - ThfTextareaBaseComponent.prototype.change; - /** - * Evento disparado ao alterar valor do model. - * @type {?} - */ - ThfTextareaBaseComponent.prototype.changeModel; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfTextareaBaseComponent.prototype.writeValueModel = function (value) { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-textarea/thf-textarea.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTextareaComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_textarea_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-textarea/thf-textarea-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfTextareaBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfTextareaComponent = /** @class */ (function (_super) { - __extends(ThfTextareaComponent, _super); - function ThfTextareaComponent(ngControl) { - var _this = _super.call(this) || this; - _this.fireChange = false; - _this.ngControl = ngControl; - return _this; - } - /** - * @param {?} value - * @return {?} - */ - ThfTextareaComponent.prototype.writeValueModel = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (this.inputEl) { - if (!value) { - // Se for o valor for undefined, deve limpar o campo - this.inputEl.nativeElement.value = ''; - } - else { - this.inputEl.nativeElement.value = value; - } - } - // Emite evento quando o model é atualizado, inclusive a primeira vez - if (value) { - this.change.emit(); - } - }; - /** - * @param {?} maxlength - * @param {?} value - * @return {?} - */ - ThfTextareaComponent.prototype.validMaxLength = /** - * @param {?} maxlength - * @param {?} value - * @return {?} - */ - function (maxlength, value) { - return (maxlength && value.length > maxlength) ? value.toString().substring(0, maxlength) : value; - }; - /** - * @param {?} event - * @return {?} - */ - ThfTextareaComponent.prototype.eventOnInput = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ value = this.validMaxLength(this.maxLength, event.target.value); - this.callOnChange(value); - this.inputEl.nativeElement.value = value; - }; - /** - * @param {?} event - * @return {?} - */ - ThfTextareaComponent.prototype.eventOnFocus = /** - * @param {?} event - * @return {?} - */ - function (event) { - // Atualiza valor da variável que será usada para verificar se o campo teve alteração - this.valueBeforeChange = this.inputEl.nativeElement.value; - // Dispara evento quando o usuário entrar no campo - // Este evento também é disparado quando o campo inicia com foco. - this.enter.emit(); - }; - /** - * @return {?} - */ - ThfTextareaComponent.prototype.eventOnBlur = /** - * @return {?} - */ - function () { - this.blur.emit(); - this.controlChangeEmitter(); - }; - /** - * @return {?} - */ - ThfTextareaComponent.prototype.controlChangeEmitter = /** - * @return {?} - */ - function () { - if (this.inputEl.nativeElement.value !== this.valueBeforeChange) { - this.change.emit(); - } - }; - ThfTextareaComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-textarea', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfTextareaComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["g" /* NgControl */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["P" /* Optional */] },] }, - ]; }; - ThfTextareaComponent.propDecorators = { - "inputEl": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['inp', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - }; - return ThfTextareaComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_textarea_base_component__["a" /* ThfTextareaBaseComponent */])); - -function ThfTextareaComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfTextareaComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfTextareaComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfTextareaComponent.propDecorators; - /** @type {?} */ - ThfTextareaComponent.prototype.inputEl; - /** @type {?} */ - ThfTextareaComponent.prototype.valueBeforeChange; - /** @type {?} */ - ThfTextareaComponent.prototype.fireChange; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-upload/thf-upload-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfUploadBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * - * O componente thf-upload permite que o usuário envie arquivo(s) ao servidor e acompanhe o progresso. - * Este componente também possibilita algumas configurações como: - * - Múltipla seleção, onde o usuário pode enviar mais de um arquivo ao servidor. - * - Auto envio, onde o arquivo é enviado imediatamente após a seleção do usuário, não necessitando que o usuário - * clique em enviar. - * - Restrições de formatos de arquivo e tamanho. - * - Função de sucesso que será disparada quando os arquivos forem enviados com sucesso. - * - Função de erro que será disparada quando houver erro no envio dos arquivos. - * @abstract - */ -var ThfUploadBaseComponent = /** @class */ (function () { - function ThfUploadBaseComponent(ngControl) { - /** - * Define o valor do atributo name do componente. - */ - this.name = 'file'; - /** - * Indica que o campo será desabilitado - */ - this.disabled = false; - /** - * Define se o envio do arquivo será automático ao selecionar o mesmo. - */ - this.autoUpload = false; - /** - * Função que será executada no momento de realizar o envio do arquivo, - * onde será possível adicionar informações ao parâmetro que será enviado na requisição. - * É passado por parâmetro um objeto com o arquivo e a propiedade data nesta propriedade pode ser informado algum dado, - * que será enviado em conjunto com o arquivo na requisição. - * Por exemplo: - * event.data = {id: 'id do usuario'}; - */ - this.onUpload = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento será disparado quando ocorrer algum erro no envio do arquivo. - * Por parâmetro será passado o objeto do retorno que é do tipo HttpErrorResponse. - */ - this.onError = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento será disparado quando o envio do arquivo for realizado com sucesso. - * Por parâmetro será passado o objeto do retorno que é do tipo HttpResponse. - */ - this.onSuccess = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - // Função para atualizar o ngModel do componente, necessário quando não for utilizado dentro da tag form. - this.ngModelChange = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - this.ngControl = ngControl; - } - Object.defineProperty(ThfUploadBaseComponent.prototype, "fileRestrictions", { - get: /** - * @return {?} - */ - function () { - return this._fileRestrictions; - }, - set: /** - * \@optional - * - * \@description - * - * Objeto que segue a definição da interface ThfFileRestrictions. - * Onde é possível definir tamanho máximo, minimo e extensão dos arquivos permitidos. - * @param {?} restrictions - * @return {?} - */ - function (restrictions) { - this._fileRestrictions = restrictions; - this.setAllowedExtensions(restrictions); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfUploadBaseComponent.prototype, "required", { - get: /** - * @return {?} - */ - function () { - return this._required; - }, - set: /** - * \@optional - * - * \@description - * - * Indica que o campo será obrigatório. - * - * \@default `false` - * - * @param {?} required - * @return {?} - */ - function (required) { - this._required = /** @type {?} */ (required) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(required); - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfUploadBaseComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - if (this.ngControl) { - this.ngControl.valueAccessor = this; - } - }; - /** - * @param {?} fn - * @return {?} - */ - ThfUploadBaseComponent.prototype.registerOnChange = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.onModelChange = fn; - }; - /** - * @param {?} fn - * @return {?} - */ - ThfUploadBaseComponent.prototype.registerOnTouched = /** - * @param {?} fn - * @return {?} - */ - function (fn) { - this.onModelTouched = fn; - }; - /** - * @param {?=} restrictions - * @return {?} - */ - ThfUploadBaseComponent.prototype.setAllowedExtensions = /** - * @param {?=} restrictions - * @return {?} - */ - function (restrictions) { - if (restrictions === void 0) { restrictions = {}; } - var /** @type {?} */ _allowedExtensions = restrictions.allowedExtensions || []; - this.allowedExtensions = _allowedExtensions.join(','); - }; - /** @nocollapse */ - ThfUploadBaseComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["g" /* NgControl */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["P" /* Optional */] },] }, - ]; }; - ThfUploadBaseComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "help": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-help',] },], - "url": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-url',] },], - "fileRestrictions": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-restrictions',] },], - "name": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['name',] },], - "disabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled',] },], - "autoUpload": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-auto-upload',] },], - "isMultiple": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-multiple',] },], - "required": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-required',] },], - "onUpload": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-upload',] },], - "onError": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-error',] },], - "onSuccess": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-success',] },], - "ngModelChange": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['ngModelChange',] },], - }; - return ThfUploadBaseComponent; -}()); - -function ThfUploadBaseComponent_tsickle_Closure_declarations() { - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfUploadBaseComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfUploadBaseComponent.propDecorators; - /** @type {?} */ - ThfUploadBaseComponent.prototype._fileRestrictions; - /** @type {?} */ - ThfUploadBaseComponent.prototype._required; - /** @type {?} */ - ThfUploadBaseComponent.prototype.allowedExtensions; - /** - * Label do campo - * @type {?} - */ - ThfUploadBaseComponent.prototype.label; - /** - * Texto de apoio para o campo - * @type {?} - */ - ThfUploadBaseComponent.prototype.help; - /** - * URL que deve ser feita a requisição com os arquivos selecionados. - * @type {?} - */ - ThfUploadBaseComponent.prototype.url; - /** - * Define o valor do atributo name do componente. - * @type {?} - */ - ThfUploadBaseComponent.prototype.name; - /** - * Indica que o campo será desabilitado - * @type {?} - */ - ThfUploadBaseComponent.prototype.disabled; - /** - * Define se o envio do arquivo será automático ao selecionar o mesmo. - * @type {?} - */ - ThfUploadBaseComponent.prototype.autoUpload; - /** - * Define se pode selecionar mais de um arquivo. - * @type {?} - */ - ThfUploadBaseComponent.prototype.isMultiple; - /** - * Função que será executada no momento de realizar o envio do arquivo, - * onde será possível adicionar informações ao parâmetro que será enviado na requisição. - * É passado por parâmetro um objeto com o arquivo e a propiedade data nesta propriedade pode ser informado algum dado, - * que será enviado em conjunto com o arquivo na requisição. - * Por exemplo: - * event.data = {id: 'id do usuario'}; - * @type {?} - */ - ThfUploadBaseComponent.prototype.onUpload; - /** - * Evento será disparado quando ocorrer algum erro no envio do arquivo. - * Por parâmetro será passado o objeto do retorno que é do tipo HttpErrorResponse. - * @type {?} - */ - ThfUploadBaseComponent.prototype.onError; - /** - * Evento será disparado quando o envio do arquivo for realizado com sucesso. - * Por parâmetro será passado o objeto do retorno que é do tipo HttpResponse. - * @type {?} - */ - ThfUploadBaseComponent.prototype.onSuccess; - /** @type {?} */ - ThfUploadBaseComponent.prototype.ngModelChange; - /** @type {?} */ - ThfUploadBaseComponent.prototype.onModelChange; - /** @type {?} */ - ThfUploadBaseComponent.prototype.onModelTouched; - /** @type {?} */ - ThfUploadBaseComponent.prototype.ngControl; - /** - * @abstract - * @param {?} event - * @return {?} - */ - ThfUploadBaseComponent.prototype.onFileChange = function (event) { }; - /** - * @abstract - * @param {?=} files - * @return {?} - */ - ThfUploadBaseComponent.prototype.uploadFiles = function (files) { }; - /** - * @abstract - * @param {?} file - * @return {?} - */ - ThfUploadBaseComponent.prototype.stopUpload = function (file) { }; - /** - * @abstract - * @param {?} value - * @return {?} - */ - ThfUploadBaseComponent.prototype.updateModel = function (value) { }; - /** - * @abstract - * @param {?} model - * @return {?} - */ - ThfUploadBaseComponent.prototype.writeValue = function (model) { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-upload/thf-upload-base.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfUploadBaseService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -var ThfUploadBaseService = /** @class */ (function () { - function ThfUploadBaseService(http) { - this.http = http; - this.requests = []; - } - /** - * Metódo responsável por enviar os arquivos ao servidor, conforme o parametro URL. - * - * @param {?} url URL da requisição a ser efetuada. - * @param {?} files Arquivos a serem enviados. - * @param {?} tOnUpload Função a ser executada quando o arquivo for enviado ao servidor. - * @param {?} uploadCallback Função que será executada enquanto os arquivos estiverem sendo enviados. - * @param {?} successCallback Função a ser executada quando a requisição for efetuada com sucesso. - * @param {?} errorCallback Função a ser executada quando a requisição foi efetuada com sucesso. - * @return {?} - */ - ThfUploadBaseService.prototype.upload = /** - * Metódo responsável por enviar os arquivos ao servidor, conforme o parametro URL. - * - * @param {?} url URL da requisição a ser efetuada. - * @param {?} files Arquivos a serem enviados. - * @param {?} tOnUpload Função a ser executada quando o arquivo for enviado ao servidor. - * @param {?} uploadCallback Função que será executada enquanto os arquivos estiverem sendo enviados. - * @param {?} successCallback Função a ser executada quando a requisição for efetuada com sucesso. - * @param {?} errorCallback Função a ser executada quando a requisição foi efetuada com sucesso. - * @return {?} - */ - function (url, files, tOnUpload, uploadCallback, successCallback, errorCallback) { - var /** @type {?} */ filesLength = files.length; - var /** @type {?} */ uploadEvent = { - data: {}, - file: null - }; - for (var /** @type {?} */ i = 0; i < filesLength; i++) { - var /** @type {?} */ formData = new FormData(); - var /** @type {?} */ file = files[i]; - formData.append('files', file.rawFile); - // Função upload, onde o desenvolvedor pode enviar dados para a requisição. - if (tOnUpload) { - uploadEvent['file'] = file; - tOnUpload.emit(uploadEvent); - formData.append('data', JSON.stringify(uploadEvent.data)); - } - this.sendFile(url, file, formData, uploadCallback, successCallback, errorCallback); - } - }; - /** - * @param {?} url - * @param {?} file - * @param {?} formData - * @param {?} uploadCallback - * @param {?} successCallback - * @param {?} errorCallback - * @return {?} - */ - ThfUploadBaseService.prototype.sendFile = /** - * @param {?} url - * @param {?} file - * @param {?} formData - * @param {?} uploadCallback - * @param {?} successCallback - * @param {?} errorCallback - * @return {?} - */ - function (url, file, formData, uploadCallback, successCallback, errorCallback) { - var _this = this; - var /** @type {?} */ request = this.getRequest(url, formData).subscribe(function (event) { - if (event.type === __WEBPACK_IMPORTED_MODULE_1__angular_common_http__["d" /* HttpEventType */].UploadProgress) { - _this.addRequest(file, request); - var /** @type {?} */ percentDone = Math.round(100 * event.loaded / event.total); - uploadCallback(file, percentDone); - } - else if (event instanceof __WEBPACK_IMPORTED_MODULE_1__angular_common_http__["h" /* HttpResponse */]) { - // Sucesso, arquivos enviados. - successCallback(file, event); - } - }, function (err) { - errorCallback(file, err); - }); - }; - /** - * @param {?} url - * @param {?} formData - * @return {?} - */ - ThfUploadBaseService.prototype.getRequest = /** - * @param {?} url - * @param {?} formData - * @return {?} - */ - function (url, formData) { - var /** @type {?} */ req = new __WEBPACK_IMPORTED_MODULE_1__angular_common_http__["g" /* HttpRequest */]('POST', url, formData, { - reportProgress: true - }); - return this.http.request(req); - }; - /** - * @param {?} file - * @param {?} callback - * @return {?} - */ - ThfUploadBaseService.prototype.stopRequestByFile = /** - * @param {?} file - * @param {?} callback - * @return {?} - */ - function (file, callback) { - var /** @type {?} */ requestObj = this.requests.find(function (req) { - return req.file.uid === file.uid; - }); - if (requestObj) { - var /** @type {?} */ request = requestObj.request; - request.unsubscribe(); - this.removeRequest(requestObj); - callback(); - } - }; - /** - * @param {?} requestObj - * @return {?} - */ - ThfUploadBaseService.prototype.removeRequest = /** - * @param {?} requestObj - * @return {?} - */ - function (requestObj) { - var /** @type {?} */ index = this.requests.indexOf(requestObj); - this.requests.splice(index, 1); - }; - /** - * @param {?} file - * @param {?} request - * @return {?} - */ - ThfUploadBaseService.prototype.addRequest = /** - * @param {?} file - * @param {?} request - * @return {?} - */ - function (file, request) { - var /** @type {?} */ hasRequest = this.requests.some(function (req) { - return req.file.uid === file.uid; - }); - if (!hasRequest) { - this.requests.push({ file: file, request: request }); - } - }; - ThfUploadBaseService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, - ]; - /** @nocollapse */ - ThfUploadBaseService.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_common_http__["b" /* HttpClient */], }, - ]; }; - return ThfUploadBaseService; -}()); - -function ThfUploadBaseService_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfUploadBaseService.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfUploadBaseService.ctorParameters; - /** @type {?} */ - ThfUploadBaseService.prototype.requests; - /** @type {?} */ - ThfUploadBaseService.prototype.http; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-upload/thf-upload-file.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfUploadFile; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__thf_upload_status_enum__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-upload/thf-upload-status.enum.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -var ThfUploadFile = /** @class */ (function () { - function ThfUploadFile(file) { - if (file) { - this.name = file.name; - this.extension = this.getExtension(file.name); - this.size = file.size; - this.rawFile = file; - this.uid = this.generateUUID(); - this.status = __WEBPACK_IMPORTED_MODULE_0__thf_upload_status_enum__["a" /* ThfUploadStatus */].None; - } - } - /** - * @param {?} value - * @return {?} - */ - ThfUploadFile.prototype.getExtension = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (value) { - var /** @type {?} */ extension = value.substr(value.lastIndexOf('.')); - return extension.toLowerCase(); - } - return ''; - }; - /** - * @return {?} - */ - ThfUploadFile.prototype.generateUUID = /** - * @return {?} - */ - function () { - /** - * @return {?} - */ - function s4() { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - } - return s4() + s4() + '-' + s4() + '-' + s4() + '-' + - s4() + '-' + s4() + s4() + s4(); - }; - return ThfUploadFile; -}()); - -function ThfUploadFile_tsickle_Closure_declarations() { - /** @type {?} */ - ThfUploadFile.prototype.name; - /** @type {?} */ - ThfUploadFile.prototype.rawFile; - /** @type {?} */ - ThfUploadFile.prototype.status; - /** @type {?} */ - ThfUploadFile.prototype.uid; - /** @type {?} */ - ThfUploadFile.prototype.extension; - /** @type {?} */ - ThfUploadFile.prototype.size; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-upload/thf-upload-status.enum.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfUploadStatus; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** @enum {number} */ -var ThfUploadStatus = { - // Enviou com sucesso. - Uploaded: 0, - // Está enviando. - Uploading: 1, - // Ocorreu algum erro no envio. - Error: 2, - // Não enviou ou aconteceu algum erro. - None: 3, -}; - -ThfUploadStatus[ThfUploadStatus.Uploaded] = "Uploaded"; -ThfUploadStatus[ThfUploadStatus.Uploading] = "Uploading"; -ThfUploadStatus[ThfUploadStatus.Error] = "Error"; -ThfUploadStatus[ThfUploadStatus.None] = "None"; - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-upload/thf-upload.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfUploadComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_upload_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-upload/thf-upload-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_upload_file__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-upload/thf-upload-file.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_upload_status_enum__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-upload/thf-upload-status.enum.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__thf_upload_service__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-upload/thf-upload.service.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - -/** - * \@docsExtends ThfUploadBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfUploadComponent = /** @class */ (function (_super) { - __extends(ThfUploadComponent, _super); - function ThfUploadComponent(elementRef, uploadService, ngControl) { - var _this = _super.call(this, ngControl) || this; - _this.elementRef = elementRef; - _this.uploadService = uploadService; - return _this; - } - // Invoca a seleção de arquivos, clicando no input type file. - /** - * @return {?} - */ - ThfUploadComponent.prototype.onClick = /** - * @return {?} - */ - function () { - var /** @type {?} */ input = this.elementRef.nativeElement.querySelector('input'); - input.click(); - }; - // Função disparada ao selecionar algum arquivo. - /** - * @param {?} event - * @return {?} - */ - ThfUploadComponent.prototype.onFileChange = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ files = event.target.files; - this.currentFiles = this.currentFiles || []; - this.currentFiles = this.parseFiles(files); - this.updateModel(this.currentFiles); - if (this.autoUpload) { - this.uploadFiles(this.currentFiles); - } - }; - // Atualiza o ngModel para os arquivos passados por parâmetro. - /** - * @param {?} files - * @return {?} - */ - ThfUploadComponent.prototype.updateModel = /** - * @param {?} files - * @return {?} - */ - function (files) { - if (files && files.length === 0) { - return this.onModelChange ? this.onModelChange(files) : this.ngModelChange.emit(files); - } - this.onModelChange ? this.onModelChange(files) : this.ngModelChange.emit(files); - }; - // Envia os arquivos passados por parâmetro, exceto os que já foram enviados ao serviço. - /** - * @param {?} files - * @return {?} - */ - ThfUploadComponent.prototype.uploadFiles = /** - * @param {?} files - * @return {?} - */ - function (files) { - var _this = this; - var /** @type {?} */ filesFiltered = files.filter(function (file) { - return file.status !== __WEBPACK_IMPORTED_MODULE_4__thf_upload_status_enum__["a" /* ThfUploadStatus */].Uploaded; - }); - this.uploadService.upload(this.url, filesFiltered, this.onUpload, function (file, porcent) { - // UPLOADING - // UPLOADING - _this.uploadingHandler(file, porcent); - }, function (file, eventResponse) { - // SUCCESS - // SUCCESS - _this.successHandler(file); - _this.onSuccess.emit(eventResponse); - }, function (file, eventError) { - // Error - // Error - _this.errorHandler(file); - _this.onError.emit(eventError); - }); - }; - // Caso o componente estiver no modo AutoUpload, o arquivo também será removido da lista. - /** - * @param {?} file - * @return {?} - */ - ThfUploadComponent.prototype.stopUpload = /** - * @param {?} file - * @return {?} - */ - function (file) { - var _this = this; - this.uploadService.stopRequestByFile(file, function () { - if (_this.autoUpload) { - _this.removeFile(file); - } - else { - _this.stopUploadHandler(file); - } - }); - }; - // Função disparada ao parar um envio de arquivo. - /** - * @param {?} file - * @return {?} - */ - ThfUploadComponent.prototype.stopUploadHandler = /** - * @param {?} file - * @return {?} - */ - function (file) { - file.status = __WEBPACK_IMPORTED_MODULE_4__thf_upload_status_enum__["a" /* ThfUploadStatus */].None; - this.removeFileNameClass(file.uid); - this.setProgressStatus(file.uid, 0, false); - this.setUploadStatus(file, 'thf-upload-progress', 100); - }; - // Função disparada enquanto o arquivo está sendo enviado ao serviço. - /** - * @param {?} file - * @param {?} porcent - * @return {?} - */ - ThfUploadComponent.prototype.uploadingHandler = /** - * @param {?} file - * @param {?} porcent - * @return {?} - */ - function (file, porcent) { - file.status = __WEBPACK_IMPORTED_MODULE_4__thf_upload_status_enum__["a" /* ThfUploadStatus */].Uploading; - this.setProgressStatus(file.uid, porcent, true); - this.setUploadStatus(file, 'thf-upload-progress', porcent); - }; - // Função disparada quando o envio é realizado com sucesso. - /** - * @param {?} file - * @return {?} - */ - ThfUploadComponent.prototype.successHandler = /** - * @param {?} file - * @return {?} - */ - function (file) { - file.status = __WEBPACK_IMPORTED_MODULE_4__thf_upload_status_enum__["a" /* ThfUploadStatus */].Uploaded; - this.setProgressStatus(file.uid, 0, false); - this.setUploadStatus(file, 'thf-upload-progress-success', 100); - }; - // Função disparada quando é retornado um erro no envio do arquivo. - /** - * @param {?} file - * @return {?} - */ - ThfUploadComponent.prototype.errorHandler = /** - * @param {?} file - * @return {?} - */ - function (file) { - file.status = __WEBPACK_IMPORTED_MODULE_4__thf_upload_status_enum__["a" /* ThfUploadStatus */].Error; - this.setProgressStatus(file.uid, 0, false); - this.setUploadStatus(file, 'thf-upload-progress-error', 100); - }; - // Valida se o status passado por parâmetro é igual ao status do arquivo. - /** - * @param {?} status - * @param {?} file - * @return {?} - */ - ThfUploadComponent.prototype.isStatusFile = /** - * @param {?} status - * @param {?} file - * @return {?} - */ - function (status, file) { - return file.status === __WEBPACK_IMPORTED_MODULE_4__thf_upload_status_enum__["a" /* ThfUploadStatus */][status]; - }; - // Verifica se existe algum arquivo sendo enviado ao serviço. - /** - * @param {?} files - * @return {?} - */ - ThfUploadComponent.prototype.hasAnyFileUploading = /** - * @param {?} files - * @return {?} - */ - function (files) { - if (files && files.length) { - return files.some(function (file) { return file.status === __WEBPACK_IMPORTED_MODULE_4__thf_upload_status_enum__["a" /* ThfUploadStatus */].Uploading; }); - } - return false; - }; - // Retorna o thf-icon de acordo com o status do arquivo. - /** - * @param {?} file - * @return {?} - */ - ThfUploadComponent.prototype.getThfIcon = /** - * @param {?} file - * @return {?} - */ - function (file) { - switch (file.status) { - case __WEBPACK_IMPORTED_MODULE_4__thf_upload_status_enum__["a" /* ThfUploadStatus */].Uploaded: - return 'thf-icon-ok'; - case __WEBPACK_IMPORTED_MODULE_4__thf_upload_status_enum__["a" /* ThfUploadStatus */].Error: - return 'thf-icon-close'; - case __WEBPACK_IMPORTED_MODULE_4__thf_upload_status_enum__["a" /* ThfUploadStatus */].None: - return 'thf-icon-info'; - case __WEBPACK_IMPORTED_MODULE_4__thf_upload_status_enum__["a" /* ThfUploadStatus */].Uploading: - default: - return ''; - } - }; - // Atualiza o status do envio de arquivos. - /** - * @param {?} file - * @param {?} className - * @param {?} porcent - * @return {?} - */ - ThfUploadComponent.prototype.setUploadStatus = /** - * @param {?} file - * @param {?} className - * @param {?} porcent - * @return {?} - */ - function (file, className, porcent) { - var /** @type {?} */ uid = file.uid; - var /** @type {?} */ divStatus = this.elementRef.nativeElement.querySelector("div[id='" + uid + "'].thf-upload-progress"); - divStatus.classList.remove('thf-upload-progress-error', 'thf-upload-progress-success'); - divStatus.classList.add(className); - if (porcent > 5 && file.status !== __WEBPACK_IMPORTED_MODULE_4__thf_upload_status_enum__["a" /* ThfUploadStatus */].None) { - this.addFileNameClass(uid); - } - }; - // Atualiza o status do progresso do envio do arquivo. - /** - * @param {?} uid - * @param {?} porcent - * @param {?} isShow - * @return {?} - */ - ThfUploadComponent.prototype.setProgressStatus = /** - * @param {?} uid - * @param {?} porcent - * @param {?} isShow - * @return {?} - */ - function (uid, porcent, isShow) { - var /** @type {?} */ divStatus = this.elementRef.nativeElement.querySelector("div[id='" + uid + "'].thf-upload-progress"); - var /** @type {?} */ divProgress = divStatus.querySelector('.thf-upload-progress-status'); - var /** @type {?} */ isDisplay = isShow ? 'block' : 'none'; - divProgress.setAttribute('style', "display: " + isDisplay + ";"); - divProgress.setAttribute('style', "width: " + porcent + "%;"); - }; - // Remove o arquivo passado por parametro da lista dos arquivos correntes. - /** - * @param {?} file - * @return {?} - */ - ThfUploadComponent.prototype.removeFile = /** - * @param {?} file - * @return {?} - */ - function (file) { - var /** @type {?} */ index = this.currentFiles.indexOf(file); - this.currentFiles.splice(index, 1); - }; - // Retorna o tamanho do arquivo em KBytes. - /** - * @param {?} size - * @return {?} - */ - ThfUploadComponent.prototype.getFileSize = /** - * @param {?} size - * @return {?} - */ - function (size) { - var /** @type {?} */ kbSize = 0; - if (size) { - kbSize = Math.ceil(size / 1024); - } - return kbSize + " KB"; - }; - // Recebe o valor do model. - /** - * @param {?} model - * @return {?} - */ - ThfUploadComponent.prototype.writeValue = /** - * @param {?} model - * @return {?} - */ - function (model) { - if (model) { - this.currentFiles = this.parseFiles(model); - } - }; - // Atualiza a classe da div, que conter a classe 'thf-upload-filename', para 'thf-upload-filename-loading'. - /** - * @param {?} uid - * @return {?} - */ - ThfUploadComponent.prototype.addFileNameClass = /** - * @param {?} uid - * @return {?} - */ - function (uid) { - var /** @type {?} */ divStatus = this.elementRef.nativeElement.querySelector("div[id='" + uid + "'].thf-upload-progress"); - var /** @type {?} */ fileNameDiv = divStatus.querySelector('.thf-upload-filename'); - fileNameDiv.classList.add('thf-upload-filename-loading'); - }; - // Remove a classe 'thf-upload-filename-loading' da div que conter a classe 'thf-upload-filename'. - /** - * @param {?} uid - * @return {?} - */ - ThfUploadComponent.prototype.removeFileNameClass = /** - * @param {?} uid - * @return {?} - */ - function (uid) { - var /** @type {?} */ divStatus = this.elementRef.nativeElement.querySelector("div[id='" + uid + "'].thf-upload-progress"); - var /** @type {?} */ fileNameDiv = divStatus.querySelector('.thf-upload-filename'); - fileNameDiv.classList.remove('thf-upload-filename-loading'); - }; - // Faz o parse dos arquivos selecionados para arquivos do formato ThfUploadFile e atuliza os arquivos correntes. - /** - * @param {?} files - * @return {?} - */ - ThfUploadComponent.prototype.parseFiles = /** - * @param {?} files - * @return {?} - */ - function (files) { - var /** @type {?} */ thfUploadFiles = this.currentFiles || []; - var /** @type {?} */ filesLength = files.length; - for (var /** @type {?} */ i = 0; i < filesLength; i++) { - var /** @type {?} */ file = new __WEBPACK_IMPORTED_MODULE_3__thf_upload_file__["a" /* ThfUploadFile */](files[i]); - if (this.checkRestrictions(file)) { - if (this.isMultiple) { - thfUploadFiles.push(file); - } - else { - thfUploadFiles.splice(0, 1, file); - } - } - } - return thfUploadFiles; - }; - // Verifica se o arquivo está de acordo com as restrições. - /** - * @param {?} file - * @return {?} - */ - ThfUploadComponent.prototype.checkRestrictions = /** - * @param {?} file - * @return {?} - */ - function (file) { - var /** @type {?} */ restrictions = this.fileRestrictions; - if (restrictions) { - var /** @type {?} */ allowedExtensions = restrictions.allowedExtensions; - var /** @type {?} */ minFileSize = restrictions.minFileSize || 0; - var /** @type {?} */ maxFileSize = restrictions.maxFileSize || 31457280; // 30MB - var /** @type {?} */ isAccept = allowedExtensions ? this.isAllowedExtension(file.extension, allowedExtensions) : true; - var /** @type {?} */ isAcceptSize = file.size >= minFileSize && file.size <= maxFileSize; - return isAccept && isAcceptSize; - } - return true; - }; - /** - * @param {?} extension - * @param {?=} allowedExtensions - * @return {?} - */ - ThfUploadComponent.prototype.isAllowedExtension = /** - * @param {?} extension - * @param {?=} allowedExtensions - * @return {?} - */ - function (extension, allowedExtensions) { - if (allowedExtensions === void 0) { allowedExtensions = []; } - return allowedExtensions.some(function (ext) { return ext.toLowerCase() === extension; }); - }; - ThfUploadComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-upload', template: "
    Selecionar arquivo
    {{ file.name }} - {{ getFileSize(file.size) }}
    Excluir
    Cancelar
    Tentar Novamente
    0\" [t-disabled]=\"hasAnyFileUploading(currentFiles)\" t-primary=\"true\" t-label=\"Iniciar envio\" (t-click)=\"uploadFiles(currentFiles)\">
    ", - providers: [__WEBPACK_IMPORTED_MODULE_5__thf_upload_service__["a" /* ThfUploadService */]] - },] }, - ]; - /** @nocollapse */ - ThfUploadComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_5__thf_upload_service__["a" /* ThfUploadService */], }, - { type: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["g" /* NgControl */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["P" /* Optional */] },] }, - ]; }; - return ThfUploadComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_upload_base_component__["a" /* ThfUploadBaseComponent */])); - -function ThfUploadComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfUploadComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfUploadComponent.ctorParameters; - /** @type {?} */ - ThfUploadComponent.prototype.currentFiles; - /** @type {?} */ - ThfUploadComponent.prototype.elementRef; - /** @type {?} */ - ThfUploadComponent.prototype.uploadService; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-upload/thf-upload.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfUploadService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_upload_base_service__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-upload/thf-upload-base.service.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -var ThfUploadService = /** @class */ (function (_super) { - __extends(ThfUploadService, _super); - function ThfUploadService() { - return _super !== null && _super.apply(this, arguments) || this; - } - ThfUploadService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, - ]; - /** @nocollapse */ - ThfUploadService.ctorParameters = function () { return []; }; - return ThfUploadService; -}(__WEBPACK_IMPORTED_MODULE_1__thf_upload_base_service__["a" /* ThfUploadBaseService */])); - -function ThfUploadService_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfUploadService.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfUploadService.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/thf-url/thf-url.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfUrlComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_input_generic_thf_input_generic__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-input-generic/thf-input-generic.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfInputBaseComponent - * - * \@description - * - * thf-url é um input específico para receber URL, com o pattern já configurado. - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfUrlComponent = /** @class */ (function (_super) { - __extends(ThfUrlComponent, _super); - function ThfUrlComponent(el) { - var _this = _super.call(this, el) || this; - _this.maxlength = 254; - _this.type = 'url'; - _this.pattern = '^((https|http):\\/\\/)?' + // protocol - '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name - '((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address - '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path - '(\\?[;&a-z\\d%_.~+=-]*)?' + // query string - '(\\#[-a-z\\d_]*)?$'; - _this.mask = ''; - return _this; - } - /** - * @param {?} c - * @return {?} - */ - ThfUrlComponent.prototype.extraValidation = /** - * @param {?} c - * @return {?} - */ - function (c) { - return null; - }; - ThfUrlComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-url', template: "
    ", - providers: [ - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["f" /* NG_VALUE_ACCESSOR */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfUrlComponent; }), - multi: true, - }, - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_forms__["e" /* NG_VALIDATORS */], - useExisting: Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_18" /* forwardRef */])(function () { return ThfUrlComponent; }), - multi: true, - } - ] - },] }, - ]; - /** @nocollapse */ - ThfUrlComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - return ThfUrlComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_input_generic_thf_input_generic__["a" /* ThfInputGeneric */])); - -function ThfUrlComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfUrlComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfUrlComponent.ctorParameters; - /** @type {?} */ - ThfUrlComponent.prototype.maxlength; - /** @type {?} */ - ThfUrlComponent.prototype.type; - /** @type {?} */ - ThfUrlComponent.prototype.pattern; - /** @type {?} */ - ThfUrlComponent.prototype.mask; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-field/validators.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["g"] = requiredFailed; -/* harmony export (immutable) */ __webpack_exports__["c"] = maxlengthFailed; -/* harmony export (immutable) */ __webpack_exports__["e"] = minlengthFailed; -/* harmony export (immutable) */ __webpack_exports__["f"] = patternFailed; -/* harmony export (immutable) */ __webpack_exports__["d"] = minFailed; -/* harmony export (immutable) */ __webpack_exports__["b"] = maxFailed; -/* harmony export (immutable) */ __webpack_exports__["a"] = dateFailed; -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** - * @param {?} required - * @param {?} disabled - * @param {?} value - * @return {?} - */ -function requiredFailed(required, disabled, value) { - var /** @type {?} */ valid = ((typeof value === 'string' && value) || (typeof value === 'object' && value && value.length)); - return (required && !disabled && !valid); -} -/** - * @param {?} maxlength - * @param {?} value - * @return {?} - */ -function maxlengthFailed(maxlength, value) { - return (maxlength && value && value.length > Number(maxlength)); -} -/** - * @param {?} minlength - * @param {?} disabled - * @param {?} value - * @return {?} - */ -function minlengthFailed(minlength, disabled, value) { - return (minlength && !disabled && ((value && value.length < Number(minlength) || value === ''))); -} -/** - * @param {?} pattern - * @param {?} value - * @return {?} - */ -function patternFailed(pattern, value) { - var /** @type {?} */ reg; - try { - reg = new RegExp(pattern); - } - catch (/** @type {?} */ e) { - return true; - } - return (pattern && value && !reg.test(value)); -} -/** - * @param {?} min - * @param {?} value - * @return {?} - */ -function minFailed(min, value) { - return (min && ((value && Number(value) < min || value === ''))); -} -/** - * @param {?} max - * @param {?} value - * @return {?} - */ -function maxFailed(max, value) { - return (max && value && Number(value) > max); -} -/** - * @param {?} value - * @return {?} - */ -function dateFailed(value) { - return (value && isNaN(Date.parse(value))); -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-grid/thf-grid-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfGridBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@description - * - * O componente thf-grid é utilizado para desenvolver tabelas mais complexas como as funcionalidades - * de classificação de dados, adição e remoção de linhas e edição de dados "in line". - * @abstract - */ -var ThfGridBaseComponent = /** @class */ (function () { - function ThfGridBaseComponent() { - /** - * Recebe valores "true" ou "false" para habilitar ou desabilitar o botão "Carregar Mais Resultados". - */ - this.showMoreDisabled = 'false'; - /** - * Habilita o botão "Remover" permitindo que o usuário possa remover uma linha do thf-grid. - */ - this.showRemoveButton = false; - /** - * Habilita o botão para adicionar linhas. - */ - this.addButton = false; - /** - * Recebe um método para carregar mais resultados e habilita o botão desta opção. - */ - this.showMore = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento de seleção de linha que chama um método do componente. Este atributo é utilizado em conjunto com o atributo "t-selectable". - */ - this.selectionChange = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento disparado ao salvar dados do modo de edição inline, recebendo o modelo que foi alterado. - */ - this.saveValue = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - Object.defineProperty(ThfGridBaseComponent.prototype, "sortable", { - get: /** - * @return {?} - */ - function () { - return this._sortable; - }, - set: /** - * Habilita a opção de ordenação dos dados nas colunas. - * @param {?} sortable - * @return {?} - */ - function (sortable) { - this._sortable = sortable != null && sortable.toString() === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(sortable); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfGridBaseComponent.prototype, "selectable", { - get: /** - * @return {?} - */ - function () { - return this._selectable; - }, - set: /** - * Habilita a opção de selecionar uma linha do thf-grid. - * @param {?} selectable - * @return {?} - */ - function (selectable) { - this._selectable = selectable != null && selectable.toString() === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(selectable); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfGridBaseComponent.prototype, "editable", { - get: /** - * @return {?} - */ - function () { - return this._editable; - }, - set: /** - * Habilita o botão para edição da linha. - * @param {?} editable - * @return {?} - */ - function (editable) { - this._editable = editable != null && editable.toString() === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(editable); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfGridBaseComponent.prototype, "groupable", { - get: /** - * @return {?} - */ - function () { - return this._groupable; - }, - set: /** - * Habilita a opção para agrupamento, permitindo agrupar no máximo dois níveis. - * @param {?} groupable - * @return {?} - */ - function (groupable) { - this._groupable = groupable != null && groupable.toString() === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(groupable); - if (!this._groupable) { - this.cleanGroups(); - } - }, - enumerable: true, - configurable: true - }); - ThfGridBaseComponent.propDecorators = { - "data": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-data',] },], - "columns": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-columns',] },], - "sortable": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-sortable',] },], - "selectable": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-selectable',] },], - "editable": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-editable',] },], - "groupable": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-groupable',] },], - "showMoreDisabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-show-more-disabled',] },], - "showRemoveButton": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-show-remove-button',] },], - "addButton": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-show-add-button',] },], - "saveAction": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-save-action',] },], - "removeAction": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-remove-action',] },], - "addAction": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-add-action',] },], - "showMore": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-show-more',] },], - "selectionChange": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-selection-change',] },], - "saveValue": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-save-value',] },], - }; - return ThfGridBaseComponent; -}()); - -function ThfGridBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfGridBaseComponent.propDecorators; - /** @type {?} */ - ThfGridBaseComponent.prototype._sortable; - /** @type {?} */ - ThfGridBaseComponent.prototype._selectable; - /** @type {?} */ - ThfGridBaseComponent.prototype._editable; - /** @type {?} */ - ThfGridBaseComponent.prototype._groupable; - /** - * Lista de objeto a serem exibidos. Este atributo aceita um array de objetos JSON. - * @type {?} - */ - ThfGridBaseComponent.prototype.data; - /** - * Objeto com as informações das colunas a serem exibidas. - * @type {?} - */ - ThfGridBaseComponent.prototype.columns; - /** - * Recebe valores "true" ou "false" para habilitar ou desabilitar o botão "Carregar Mais Resultados". - * @type {?} - */ - ThfGridBaseComponent.prototype.showMoreDisabled; - /** - * Habilita o botão "Remover" permitindo que o usuário possa remover uma linha do thf-grid. - * @type {?} - */ - ThfGridBaseComponent.prototype.showRemoveButton; - /** - * Habilita o botão para adicionar linhas. - * @type {?} - */ - ThfGridBaseComponent.prototype.addButton; - /** - * Executa um método antes de salvar uma linha editada no thf-grid. Este método recebe como parâmetro o atributo "event", - * para acessar o objeto selecionado no thf-grid utilizando o "event.data". - * Se o método retornar o valor booleano "true", a edição da linha é confirmada, - * caso contrário as informações alteradas serão canceladas. - * @type {?} - */ - ThfGridBaseComponent.prototype.saveAction; - /** - * Executa um método antes de remover uma linha selecionada no thf-grid. Este método recebe como parâmetro o atributo "event", - * para acessar o objeto selecionado no thf-grid utilizando o "event.data". - * Se o método retornar o valor booleano "true", a remoção da linha é confirmada, - * caso contrário as informações serão mantidas. - * @type {?} - */ - ThfGridBaseComponent.prototype.removeAction; - /** - * Método executado antes de adicionar uma nova linha ao thf-grid. Esse método recebe como parâmetro o atributo "data" contendo a - * referência do objeto que será adicionado, dessa forma é possível informar alguns valores para a nova linha. Para que as - * alterações sejam efetivadas, deve-se retornar "true". É possível cancelar a inclusão de uma nova linha - * retornando "false", nesse caso as informações serão descartadas e a nova linha não será incluída no thf-grid. - * @type {?} - */ - ThfGridBaseComponent.prototype.addAction; - /** - * Recebe um método para carregar mais resultados e habilita o botão desta opção. - * @type {?} - */ - ThfGridBaseComponent.prototype.showMore; - /** - * Evento de seleção de linha que chama um método do componente. Este atributo é utilizado em conjunto com o atributo "t-selectable". - * @type {?} - */ - ThfGridBaseComponent.prototype.selectionChange; - /** - * Evento disparado ao salvar dados do modo de edição inline, recebendo o modelo que foi alterado. - * @type {?} - */ - ThfGridBaseComponent.prototype.saveValue; - /** @type {?} */ - ThfGridBaseComponent.prototype.parentRef; - /** - * @abstract - * @return {?} - */ - ThfGridBaseComponent.prototype.onShowMore = function () { }; - /** - * @abstract - * @param {?} event - * @return {?} - */ - ThfGridBaseComponent.prototype.onSelectionChange = function (event) { }; - /** - * @abstract - * @return {?} - */ - ThfGridBaseComponent.prototype.cleanGroups = function () { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-grid/thf-grid.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfGridComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__progress_kendo_angular_grid__ = __webpack_require__("../../../../@progress/kendo-angular-grid/dist/es/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__progress_kendo_data_query__ = __webpack_require__("../../../../@progress/kendo-data-query/dist/es/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_grid_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-grid/thf-grid-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - -/** - * \@docsExtends ThfGridBaseComponent - * - * \@description - * - * Para o correto funcionamento do THF Grid deve ser importado o módulo ```BrowserAnimationsModule``` no módulo principal da sua aplicação. - * - * ``` - * import { BrowserAnimationsModule } from '\@angular/platform-browser/animations'; - * - * ... - * - * \@NgModule({ - * imports: [ - * BrowserModule, - * BrowserAnimationsModule, - * ... - * ThfModule, - * ... - * ], - * declarations: [ - * AppComponent - * ], - * providers: [], - * bootstrap: [AppComponent] - * }) - * export class AppModule { } - * ``` - * - * No arquivo```angular-cli.json``` da sua aplicação deve ser importado o arquivo ```all.css```, que pertence ao - * pacote ```\@progress/kendo-theme-default```. - * - * - * > Arquivo .angular-cli.json: - * - * - * ``` - * ... - * "styles": [ - * "../node_modules/\@progress/kendo-theme-default/dist/all.css" - * ] - * ... - * ``` - * \@example - * - * - * - * - */ -var ThfGridComponent = /** @class */ (function (_super) { - __extends(ThfGridComponent, _super); - function ThfGridComponent(viewRef, renderer, differs) { - var _this = _super.call(this) || this; - _this.renderer = renderer; - _this.editedRowIndex = -1; - _this.groups = []; - _this.sort = []; - _this.state = { skip: 0 }; - /** - * Habilita a opção para exportação dos dados. - */ - _this.exportButtons = false; - _this.addButtonCalled = false; - _this.parentRef = viewRef['_view']['component']; - _this.allData = _this.allData.bind(_this); - _this.differ = differs.find([]).create(null); - return _this; - } - /** - * @return {?} - */ - ThfGridComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - var _this = this; - this.renderer.listen('document', 'click', function (_a) { - var target = _a.target; - _this.validateSaveEventInDocument(target); - }); - this.initializeColumns(); - this.initializeSorter(); - this.initializeData(); - if (!this.editable) { - this.grid = null; - } - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.ngDoCheck = /** - * @return {?} - */ - function () { - var /** @type {?} */ change = this.differ.diff(this.data); - if (change) { - this.initializeData(); - } - }; - /** - * @param {?} sort - * @return {?} - */ - ThfGridComponent.prototype.sortChange = /** - * @param {?} sort - * @return {?} - */ - function (sort) { - this.sort = sort; - if (this.sort && this.sort[0].dir && !this.isGroupingBy(this.sort[0].field)) { - this.loadData(); - } - }; - /** - * @param {?} field - * @return {?} - */ - ThfGridComponent.prototype.isGroupingBy = /** - * @param {?} field - * @return {?} - */ - function (field) { - return this.groups.some(function (obj) { return obj.field === field; }); - }; - /** - * @param {?} state - * @return {?} - */ - ThfGridComponent.prototype.dataStateChange = /** - * @param {?} state - * @return {?} - */ - function (state) { - // Esta condição foi realizada para não deixar adicionar mais de 2 grupos devido - // a um problema no kendo grid. Ja tem um chamado aberto para este problema. - if (state.group.length > 2) { - state.group.splice(0, 1); - } - this.state = state; - this.gridView = Object(__WEBPACK_IMPORTED_MODULE_3__progress_kendo_data_query__["e" /* process */])(this.data, this.state); - }; - /** - * @param {?} __0 - * @return {?} - */ - ThfGridComponent.prototype.addHandler = /** - * @param {?} __0 - * @return {?} - */ - function (_a) { - var sender = _a.sender; - if (this.editedRowIndex >= 0) { - this.closeEditor(sender, this.editedRowIndex); - } - this.addButtonCalled = true; - this.createFormGroup(); - if (this.addAction) { - if (this.executeFunctionValidation(this.addAction, this.formGroup.value)) { - this.formGroup.setValue(this.formGroup.value); - } - else { - return; - } - } - sender.addRow(this.formGroup); - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.saveLine = /** - * @return {?} - */ - function () { - if (this.editable && this.formGroup) { - var /** @type {?} */ newRowValue = void 0; - if (this.editedRowIndex >= 0) { - newRowValue = Object.assign(this.data[this.editedRowIndex], this.formGroup.value); - this.data[this.editedRowIndex] = newRowValue; - } - else if (this.addButtonCalled) { - newRowValue = this.formGroup.value; - this.data.push(newRowValue); - this.addButtonCalled = false; - } - this.saveValue.emit({ data: newRowValue }); - } - this.initializeSorter(); - }; - /** - * @param {?} __0 - * @return {?} - */ - ThfGridComponent.prototype.editClickHandler = /** - * @param {?} __0 - * @return {?} - */ - function (_a) { - var rowIndex = _a.rowIndex, dataItem = _a.dataItem; - if (this.executeFunctionValidation(this.saveAction, { data: this.data[this.editedRowIndex] })) { - if (!this.isValidForm() && this.formGroup) { - return; - } - this.saveLine(); - } - // Verifica se está utilizando agrupamento e busca o indice atualizado - // do objeto que está sendo editado no momento. - if (this.isGroup()) { - rowIndex = this.getRowIndex(this.data, dataItem); - } - this.editHandler({ - sender: this.grid, - rowIndex: rowIndex, - dataItem: dataItem - }); - }; - /** - * @param {?} __0 - * @return {?} - */ - ThfGridComponent.prototype.editHandler = /** - * @param {?} __0 - * @return {?} - */ - function (_a) { - var sender = _a.sender, rowIndex = _a.rowIndex, dataItem = _a.dataItem; - if (!this.editable) { - return; - } - this.sortableObject = null; - this.closeEditor(sender); - this.editedProducted = Object.assign({}, dataItem); - this.formGroup = new __WEBPACK_IMPORTED_MODULE_1__angular_forms__["c" /* FormGroup */]({}); - var /** @type {?} */ keys = Object.keys(dataItem); - for (var /** @type {?} */ count = 0; count <= keys.length; count++) { - var /** @type {?} */ key = keys[count], /** @type {?} */ - columnTemp = this.getColumn(key); - if (columnTemp && columnTemp.editable) { - var /** @type {?} */ control = columnTemp.required ? new __WEBPACK_IMPORTED_MODULE_1__angular_forms__["b" /* FormControl */](dataItem[key], __WEBPACK_IMPORTED_MODULE_1__angular_forms__["i" /* Validators */].required) : new __WEBPACK_IMPORTED_MODULE_1__angular_forms__["b" /* FormControl */](dataItem[key]); - this.formGroup.addControl(key, control); - } - } - this.editedRowIndex = rowIndex; - sender.editRow(rowIndex, this.formGroup); - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.saveClick = /** - * @return {?} - */ - function () { - if (!this.validateSaveClick()) { - return; - } - this.saveLine(); - this.closeEditor(this.grid); - this.loadData(); - }; - /** - * @param {?} grid - * @param {?=} rowIndex - * @return {?} - */ - ThfGridComponent.prototype.closeEditor = /** - * @param {?} grid - * @param {?=} rowIndex - * @return {?} - */ - function (grid, rowIndex) { - rowIndex = this.editedRowIndex; - if (grid) { - grid.closeRow(rowIndex); - } - this.editedRowIndex = undefined; - this.formGroup = undefined; - }; - /** - * @param {?} __0 - * @return {?} - */ - ThfGridComponent.prototype.saveHandler = /** - * @param {?} __0 - * @return {?} - */ - function (_a) { - var sender = _a.sender, rowIndex = _a.rowIndex, formGroup = _a.formGroup, isNew = _a.isNew; - var /** @type {?} */ item = formGroup.value; - if (isNew && !this.editable) { - this.data.push(item); - } - else { - this.data[rowIndex] = Object.assign(this.data[rowIndex], item); - } - this.loadData(); - sender.closeRow(rowIndex); - }; - // Cancela a propagação de eventos no botão "Cancelar" da edição por linhas. - /** - * @param {?} event - * @return {?} - */ - ThfGridComponent.prototype.cancelPropagation = /** - * @param {?} event - * @return {?} - */ - function (event) { - event.stopPropagation(); - }; - /** - * @param {?} __0 - * @return {?} - */ - ThfGridComponent.prototype.cancelHandler = /** - * @param {?} __0 - * @return {?} - */ - function (_a) { - var sender = _a.sender, rowIndex = _a.rowIndex; - if (this.editedProducted != null) { - this.data[rowIndex] = this.editedProducted; - this.editedProducted = null; - } - this.loadData(); - this.closeEditor(sender); - }; - /** - * @param {?} __0 - * @return {?} - */ - ThfGridComponent.prototype.removeHandler = /** - * @param {?} __0 - * @return {?} - */ - function (_a) { - var rowIndex = _a.rowIndex; - if (this.removeAction) { - if (!this.executeFunctionValidation(this.removeAction, { data: this.data[rowIndex] })) { - return; - } - } - this.data.splice(rowIndex, 1); - this.loadData(); - }; - // Verifica se o formulário está válido - /** - * @return {?} - */ - ThfGridComponent.prototype.isValidForm = /** - * @return {?} - */ - function () { - return (this.formGroup && this.formGroup.valid); - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.allData = /** - * @return {?} - */ - function () { - var /** @type {?} */ result = { - data: Object(__WEBPACK_IMPORTED_MODULE_3__progress_kendo_data_query__["e" /* process */])(this.data, {}).data - }; - return result; - }; - /** - * @param {?} event - * @param {?} index - * @param {?} data - * @param {?} column - * @return {?} - */ - ThfGridComponent.prototype.changeValueCheckbox = /** - * @param {?} event - * @param {?} index - * @param {?} data - * @param {?} column - * @return {?} - */ - function (event, index, data, column) { - if (!this.editable) { - event.target.checked = !event.target.checked; - return; - } - data[column] = event.target.checked; - this.data[index] = Object.assign(data); - this.saveValue.emit({ data: this.data[index] }); - }; - /** - * @param {?} e - * @return {?} - */ - ThfGridComponent.prototype.onSelectionChange = /** - * @param {?} e - * @return {?} - */ - function (e) { - this.selectionChange.emit({ data: this.gridView.data[e.index] }); - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.onShowMore = /** - * @return {?} - */ - function () { - this.showMore.emit(null); - this.loadData(); - }; - /** - * @param {?} groups - * @return {?} - */ - ThfGridComponent.prototype.groupChange = /** - * @param {?} groups - * @return {?} - */ - function (groups) { - this.groups = groups; - this.loadData(); - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.cleanGroups = /** - * @return {?} - */ - function () { - this.groups.splice(0, this.groups.length); - this.loadDataDefault(); - }; - // Define se a coluna de ações será visível. - /** - * @return {?} - */ - ThfGridComponent.prototype.isCommandColumnVisible = /** - * @return {?} - */ - function () { - return this.showRemoveButton || this.editable || this.addButton; - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.loadData = /** - * @return {?} - */ - function () { - if (this.isGroup()) { - this.loadDataGroupable(); - } - else { - this.loadDataDefault(); - } - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.createFormGroup = /** - * @return {?} - */ - function () { - var /** @type {?} */ group = {}; - this.columns.forEach(function (columnTemp) { - if (!columnTemp.checkbox) { - group[columnTemp.column] = columnTemp.required ? new __WEBPACK_IMPORTED_MODULE_1__angular_forms__["b" /* FormControl */]('', __WEBPACK_IMPORTED_MODULE_1__angular_forms__["i" /* Validators */].required) : new __WEBPACK_IMPORTED_MODULE_1__angular_forms__["b" /* FormControl */](''); - } - }); - this.formGroup = new __WEBPACK_IMPORTED_MODULE_1__angular_forms__["c" /* FormGroup */](group); - }; - /** - * @param {?} func - * @param {?} param - * @return {?} - */ - ThfGridComponent.prototype.executeFunctionValidation = /** - * @param {?} func - * @param {?} param - * @return {?} - */ - function (func, param) { - return (func && this.parentRef[func](param)); - }; - /** - * @param {?} arr - * @param {?} searchFor - * @return {?} - */ - ThfGridComponent.prototype.getRowIndex = /** - * @param {?} arr - * @param {?} searchFor - * @return {?} - */ - function (arr, searchFor) { - var _loop_1 = function (i) { - var /** @type {?} */ isEqual = Object.keys(searchFor).every(function (key) { return (arr[i][key] === searchFor[key]); }); - if (isEqual) { - return { value: i }; - } - }; - for (var /** @type {?} */ i = 0; i < arr.length; i++) { - var state_1 = _loop_1(i); - if (typeof state_1 === "object") - return state_1.value; - } - return -1; - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.validateSaveClick = /** - * @return {?} - */ - function () { - if (this.addButtonCalled && this.saveAction && this.formGroup) { - if (!this.executeFunctionValidation(this.saveAction, { data: this.formGroup.value })) { - return false; - } - } - else if (this.editedRowIndex >= 0 && this.saveAction) { - if (!this.executeFunctionValidation(this.saveAction, { data: this.data[this.editedRowIndex] })) { - this.closeEditor(this.grid, this.editedRowIndex); - return false; - } - } - if (!this.isValidForm()) { - return false; - } - return true; - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.isGroup = /** - * @return {?} - */ - function () { - return (this.groups && this.groups.length > 0); - }; - /** - * @param {?} key - * @return {?} - */ - ThfGridComponent.prototype.getColumn = /** - * @param {?} key - * @return {?} - */ - function (key) { - return this.columns.find(function (element) { return element.column === key; }); - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.loadDataDefault = /** - * @return {?} - */ - function () { - // A variavel "this.data" é a fonte de dados principal, - // na linha abaixo eu estou atualizando a fonte de dados - // principal com a fonte de dados ordenada para os indices - // não se perderem na hora de salvar uma edição. - this.updateIndex(Object(__WEBPACK_IMPORTED_MODULE_3__progress_kendo_data_query__["d" /* orderBy */])(this.data, this.sort)); - this.gridView = { - data: this.data, - total: this.data.length - }; - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.loadDataGroupable = /** - * @return {?} - */ - function () { - this.gridView = Object(__WEBPACK_IMPORTED_MODULE_3__progress_kendo_data_query__["e" /* process */])(Object(__WEBPACK_IMPORTED_MODULE_3__progress_kendo_data_query__["d" /* orderBy */])(this.data, this.sort), { group: this.groups }); - this.dataArrayOrdered = []; - this.getObjects(this.gridView.data); - this.updateIndex(this.dataArrayOrdered); - }; - /** - * @param {?} data - * @return {?} - */ - ThfGridComponent.prototype.getObjects = /** - * @param {?} data - * @return {?} - */ - function (data) { - var _this = this; - data.forEach(function (value) { - if (value.items instanceof Array) { - _this.getObjects(value.items); - } - else { - _this.dataArrayOrdered.push(value); - } - }); - }; - /** - * @param {?} dataUpdated - * @return {?} - */ - ThfGridComponent.prototype.updateIndex = /** - * @param {?} dataUpdated - * @return {?} - */ - function (dataUpdated) { - // A variavel "this.data" é a fonte de dados principal, - // na linha abaixo eu estou atualizando a fonte de dados - // principal com a fonte de dados ordenada para os indices - // não se perderem na hora de salvar uma edição. - for (var /** @type {?} */ i = 0, /** @type {?} */ dataLength = dataUpdated.length; i < dataLength; i++) { - this.data[i] = dataUpdated[i]; - } - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.initializeColumns = /** - * @return {?} - */ - function () { - if (!this.columns) { - this.columns = []; - } - else { - this.defineColumnType(); - } - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.initializeData = /** - * @return {?} - */ - function () { - if (!this.data) { - this.data = []; - } - if (this.groupable) { - this.initializeGroups(); - this.loadDataGroupable(); - } - else { - this.loadDataDefault(); - } - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.initializeSorter = /** - * @return {?} - */ - function () { - if (this.sortable) { - this.sortableObject = { - allowUnsort: this.sortable, - mode: 'single' - }; - } - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.initializeGroups = /** - * @return {?} - */ - function () { - var /** @type {?} */ arraySize = this.columns.length; - for (var /** @type {?} */ count = 0; count < arraySize; count++) { - var /** @type {?} */ columnTemp = this.columns[count]; - if (this.groups.length < 2 && columnTemp.groupHeader) { - this.groups.push({ field: columnTemp.column }); - } - } - }; - /** - * @return {?} - */ - ThfGridComponent.prototype.defineColumnType = /** - * @return {?} - */ - function () { - var /** @type {?} */ lookupTableType = { - number: function (column) { - column.type = 'numeric'; - column.format = undefined; - }, - currency: function (column) { - column.type = 'numeric'; - column.format = '{0:c}'; - }, - date: function (column) { - column.type = 'date'; - column.format = column.format && column.format.trim().length > 0 ? "{0:" + column.format + "}" : '{0:dd/MM/yyyy}'; - }, - string: function (column) { - column.type = 'text'; - column.format = undefined; - } - }; - this.columns.forEach(function (column) { - if (column.type && lookupTableType.hasOwnProperty(column.type.trim().toLowerCase())) { - lookupTableType[column.type.trim().toLowerCase()](column); - } - else { - column.type = 'text'; - } - }); - }; - /** - * @param {?} el - * @param {?} className - * @return {?} - */ - ThfGridComponent.prototype.isChildOf = /** - * @param {?} el - * @param {?} className - * @return {?} - */ - function (el, className) { - while (el && el.parentElement) { - if (this.hasClass(el.parentElement, className)) { - return true; - } - el = el.parentElement; - } - return false; - }; - /** - * @param {?} el - * @param {?} className - * @return {?} - */ - ThfGridComponent.prototype.hasClass = /** - * @param {?} el - * @param {?} className - * @return {?} - */ - function (el, className) { - return new RegExp(className).test(el.className); - }; - /** - * @param {?} target - * @return {?} - */ - ThfGridComponent.prototype.validateSaveEventInDocument = /** - * @param {?} target - * @return {?} - */ - function (target) { - if (!this.isChildOf(target, 'k-grid-content') && !this.isChildOf(target, 'k-grid-toolbar')) { - this.saveClick(); - } - }; - ThfGridComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-grid', template: " {{value}}
    0\">
    " - },] }, - ]; - /** @nocollapse */ - ThfGridComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["X" /* Renderer2 */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["F" /* IterableDiffers */], }, - ]; }; - ThfGridComponent.propDecorators = { - "exportButtons": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-show-export-buttons',] },], - "grid": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: [__WEBPACK_IMPORTED_MODULE_2__progress_kendo_angular_grid__["b" /* GridComponent */],] },], - }; - return ThfGridComponent; -}(__WEBPACK_IMPORTED_MODULE_4__thf_grid_base_component__["a" /* ThfGridBaseComponent */])); - -function ThfGridComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfGridComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfGridComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfGridComponent.propDecorators; - /** @type {?} */ - ThfGridComponent.prototype.editedRowIndex; - /** @type {?} */ - ThfGridComponent.prototype.editedProducted; - /** @type {?} */ - ThfGridComponent.prototype.formGroup; - /** @type {?} */ - ThfGridComponent.prototype.groups; - /** @type {?} */ - ThfGridComponent.prototype.gridView; - /** @type {?} */ - ThfGridComponent.prototype.sortableObject; - /** @type {?} */ - ThfGridComponent.prototype.sort; - /** @type {?} */ - ThfGridComponent.prototype.state; - /** - * Habilita a opção para exportação dos dados. - * @type {?} - */ - ThfGridComponent.prototype.exportButtons; - /** @type {?} */ - ThfGridComponent.prototype.addButtonCalled; - /** @type {?} */ - ThfGridComponent.prototype.dataArrayOrdered; - /** @type {?} */ - ThfGridComponent.prototype.differ; - /** @type {?} */ - ThfGridComponent.prototype.grid; - /** @type {?} */ - ThfGridComponent.prototype.renderer; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-grid/thf-grid.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfGridModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__progress_kendo_angular_grid__ = __webpack_require__("../../../../@progress/kendo-angular-grid/dist/es/main.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_button_thf_button_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button/thf-button.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_grid_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-grid/thf-grid.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__thf_modal_thf_modal_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-modal/thf-modal.module.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - -/** - * \@description - * Módulo do componente thf-grid - */ -var ThfGridModule = /** @class */ (function () { - function ThfGridModule() { - } - ThfGridModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */], - __WEBPACK_IMPORTED_MODULE_2__progress_kendo_angular_grid__["c" /* GridModule */], - __WEBPACK_IMPORTED_MODULE_2__progress_kendo_angular_grid__["a" /* ExcelModule */], - __WEBPACK_IMPORTED_MODULE_2__progress_kendo_angular_grid__["d" /* PDFModule */], - __WEBPACK_IMPORTED_MODULE_3__thf_button_thf_button_module__["a" /* ThfButtonModule */], - __WEBPACK_IMPORTED_MODULE_5__thf_modal_thf_modal_module__["a" /* ThfModalModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_4__thf_grid_component__["a" /* ThfGridComponent */] - ], - exports: [__WEBPACK_IMPORTED_MODULE_4__thf_grid_component__["a" /* ThfGridComponent */]], - providers: [], - schemas: [] - },] }, - ]; - /** @nocollapse */ - ThfGridModule.ctorParameters = function () { return []; }; - return ThfGridModule; -}()); - -function ThfGridModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfGridModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfGridModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-info/thf-info-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfInfoBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_info_orietation_enum__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-info/thf-info-orietation.enum.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -var /** @type {?} */ thfInfoOrientationDefault = __WEBPACK_IMPORTED_MODULE_1__thf_info_orietation_enum__["a" /* ThfInfoOrientation */].Vertical; -var ThfInfoBaseComponent = /** @class */ (function () { - function ThfInfoBaseComponent() { - this._orientation = thfInfoOrientationDefault; - this.thfInfoOrientation = __WEBPACK_IMPORTED_MODULE_1__thf_info_orietation_enum__["a" /* ThfInfoOrientation */]; - } - Object.defineProperty(ThfInfoBaseComponent.prototype, "labelSize", { - get: /** - * @return {?} - */ - function () { - return this._labelSize; - }, - set: /** - * \@optional - * - * \@description - * - * Quantidade de colunas ([Grid System](/guides/grid-system)) usadas para a exibição do label. - * - * A quantidade máxima permitida é de 11 colunas, o valor irá usar pelo menos uma coluna do [Grid System](/guides/grid-system). - * - * > Não será necessário informar a quantia de colunas para o valor, pois o restante das colunas serão disponibilizados. - * > Ex. se informar 3 colunas para o label será disponibilizado 9 colunas para o valor. - * - * Valores válidos: [1 .. 11] - * @param {?} value - * @return {?} - */ - function (value) { - if (isNaN(parseInt(/** @type {?} */ (value), 10))) { - this._labelSize = undefined; - } - else { - value = parseInt(/** @type {?} */ (value), 10); - this._labelSize = (value < 1 || value > 11) ? undefined : value; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfInfoBaseComponent.prototype, "orientation", { - get: /** - * @return {?} - */ - function () { - return this._orientation; - }, - set: /** - * \@optional - * - * \@description - * - * Define o layout de exibição. - * - * \@default `vertical` - * - * @param {?} value - * @return {?} - */ - function (value) { - this._orientation = (/** @type {?} */ (Object)).values(__WEBPACK_IMPORTED_MODULE_1__thf_info_orietation_enum__["a" /* ThfInfoOrientation */]).includes(value) ? value : thfInfoOrientationDefault; - }, - enumerable: true, - configurable: true - }); - ThfInfoBaseComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "labelSize": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label-size',] },], - "orientation": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-orientation',] },], - "value": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-value',] },], - }; - return ThfInfoBaseComponent; -}()); - -function ThfInfoBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfInfoBaseComponent.propDecorators; - /** @type {?} */ - ThfInfoBaseComponent.prototype._orientation; - /** @type {?} */ - ThfInfoBaseComponent.prototype._labelSize; - /** @type {?} */ - ThfInfoBaseComponent.prototype.thfInfoOrientation; - /** - * Valor do label a ser exibido. - * @type {?} - */ - ThfInfoBaseComponent.prototype.label; - /** - * Valor a ser exibido. - * @type {?} - */ - ThfInfoBaseComponent.prototype.value; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-info/thf-info-orietation.enum.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfInfoOrientation; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** @enum {string} */ -var ThfInfoOrientation = { - /** O valor será exibido na horizontal, ao lado direito em relação ao label. */ - Horizontal: 'horizontal', - /** Exibe o valor na vertical, ou seja, abaixo do label. */ - Vertical: 'vertical', -}; - - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-info/thf-info.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfInfoComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_info_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-info/thf-info-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsExtends ThfInfoBaseComponent - * - * \@description - * - * Este componente tem como objetivo renderizar valores na tela no estilo label na parte superior e - * valor na parte inferior. Facilita a exibição de dados pois vem com layout padrão Totvs. - * - * \@example - * - * - * - * - * - * - * - * - * - * - */ -var ThfInfoComponent = /** @class */ (function (_super) { - __extends(ThfInfoComponent, _super); - function ThfInfoComponent() { - return _super !== null && _super.apply(this, arguments) || this; - } - ThfInfoComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-info', template: "
    {{ orientation === thfInfoOrientation.Horizontal ? label + ':' : label }} {{ value }}
    " - },] }, - ]; - /** @nocollapse */ - ThfInfoComponent.ctorParameters = function () { return []; }; - return ThfInfoComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_info_base_component__["a" /* ThfInfoBaseComponent */])); - -function ThfInfoComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfInfoComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfInfoComponent.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-info/thf-info.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfInfoModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_info_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-info/thf-info.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * - * Módulo do componente thf-info. - */ -var ThfInfoModule = /** @class */ (function () { - function ThfInfoModule() { - } - ThfInfoModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_2__thf_info_component__["a" /* ThfInfoComponent */] - ], - exports: [__WEBPACK_IMPORTED_MODULE_2__thf_info_component__["a" /* ThfInfoComponent */]], - providers: [], - schemas: [] - },] }, - ]; - /** @nocollapse */ - ThfInfoModule.ctorParameters = function () { return []; }; - return ThfInfoModule; -}()); - -function ThfInfoModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfInfoModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfInfoModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-list/thf-list-item-content.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfListItemContentComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@description - * - * Este componente é utilizado em conjunto thf-list-item. Neste componente deve ser passado o - * HTML que será exibido a cada item". - */ -var ThfListItemContentComponent = /** @class */ (function () { - function ThfListItemContentComponent() { - } - ThfListItemContentComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-list-item-content', template: "" - },] }, - ]; - /** @nocollapse */ - ThfListItemContentComponent.ctorParameters = function () { return []; }; - return ThfListItemContentComponent; -}()); - -function ThfListItemContentComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfListItemContentComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfListItemContentComponent.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-list/thf-list-item-detail.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfListItemDetailComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@description - * - * Este componente é utilizado em conjunto thf-list-item. Neste componente deve ser passado o - * HTML que será exibido ao clicar no link "Exibir Detalhes". - */ -var ThfListItemDetailComponent = /** @class */ (function () { - function ThfListItemDetailComponent() { - } - ThfListItemDetailComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-list-item-detail', template: "" - },] }, - ]; - /** @nocollapse */ - ThfListItemDetailComponent.ctorParameters = function () { return []; }; - return ThfListItemDetailComponent; -}()); - -function ThfListItemDetailComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfListItemDetailComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfListItemDetailComponent.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-list/thf-list-item.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfListItemComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@description - * - * Este componente é utilizado em conjunto thf-list. - */ -var ThfListItemComponent = /** @class */ (function () { - function ThfListItemComponent(viewRef) { - /** - * Lista de ações a ser executadas no item. Ao passar até duas ações é exibido apenas botões, - * se passar de duas ações é exibido um menu com todas as opções. - */ - this.actions = []; - this.showAction = false; - this.showLink = true; - this.showDetail = false; - this.showContent = true; - this._parentRef = viewRef['_view']['component']; - this.collapsed = true; - } - /** - * @return {?} - */ - ThfListItemComponent.prototype.ngAfterContentInit = /** - * @return {?} - */ - function () { - if (this.content && this.content.nativeElement.children.length === 0) { - this.showContent = false; - } - if (this.detailsContent && this.detailsContent.nativeElement.children.length === 0) { - this.showLink = false; - } - }; - Object.defineProperty(ThfListItemComponent.prototype, "parentRef", { - get: /** - * @return {?} - */ - function () { - return this._parentRef; - }, - enumerable: true, - configurable: true - }); - ThfListItemComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-list-item', template: "
    {{title}}
    0 && actions.length <= 2\">
    0 && actions.length > 2\">
    {{action.label}}
    " - },] }, - ]; - /** @nocollapse */ - ThfListItemComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - ]; }; - ThfListItemComponent.propDecorators = { - "title": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-title',] },], - "index": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-index',] },], - "actions": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-actions',] },], - "detailsContent": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['detailsContent',] },], - "content": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['content',] },], - }; - return ThfListItemComponent; -}()); - -function ThfListItemComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfListItemComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfListItemComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfListItemComponent.propDecorators; - /** - * Parâmetro que recebe um titulo a ser renderizado no item. - * @type {?} - */ - ThfListItemComponent.prototype.title; - /** - * Índice do for utilizado para controles internos do componente. - * @type {?} - */ - ThfListItemComponent.prototype.index; - /** - * Lista de ações a ser executadas no item. Ao passar até duas ações é exibido apenas botões, - * se passar de duas ações é exibido um menu com todas as opções. - * @type {?} - */ - ThfListItemComponent.prototype.actions; - /** @type {?} */ - ThfListItemComponent.prototype.detailsContent; - /** @type {?} */ - ThfListItemComponent.prototype.content; - /** @type {?} */ - ThfListItemComponent.prototype._parentRef; - /** @type {?} */ - ThfListItemComponent.prototype.collapsed; - /** @type {?} */ - ThfListItemComponent.prototype.showAction; - /** @type {?} */ - ThfListItemComponent.prototype.showLink; - /** @type {?} */ - ThfListItemComponent.prototype.showDetail; - /** @type {?} */ - ThfListItemComponent.prototype.showContent; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-list/thf-list.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfListComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@description - * - * Componente de lista que recebe um array de objetos e renderiza de forma dinâmica os dados de - * acordo com a necessidade de cada tela. O componente disponibiliza uma área de exibição específica - * para exibição de mais informações através do link "Exibir Detalhes". - * Este componente é utilizado em conjunto com os componentes thf-list-item, thf-list-item-content e - * thf-list-item-detail. - * - * \@example - * - * - * - * - */ -var ThfListComponent = /** @class */ (function () { - function ThfListComponent() { - /** - * Recebe uma ação de clique do controller da página para o botão "Carregar mais resultados". - */ - this.showMore = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */]; - /** - * Recebe valores "true" ou "false" para habilitar ou desabilitar o botão "Carregar Mais Resultados" - */ - this.showMoreDisabled = 'false'; - } - /** - * @return {?} - */ - ThfListComponent.prototype.onShowMore = /** - * @return {?} - */ - function () { - this.showMore.emit(null); - }; - ThfListComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-list', template: "
    0\">
    " - },] }, - ]; - /** @nocollapse */ - ThfListComponent.ctorParameters = function () { return []; }; - ThfListComponent.propDecorators = { - "showMore": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-show-more',] },], - "showMoreDisabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-show-more-disabled',] },], - }; - return ThfListComponent; -}()); - -function ThfListComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfListComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfListComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfListComponent.propDecorators; - /** - * Recebe uma ação de clique do controller da página para o botão "Carregar mais resultados". - * @type {?} - */ - ThfListComponent.prototype.showMore; - /** - * Recebe valores "true" ou "false" para habilitar ou desabilitar o botão "Carregar Mais Resultados" - * @type {?} - */ - ThfListComponent.prototype.showMoreDisabled; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-list/thf-list.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfListModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_list_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-list/thf-list.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_button_thf_button_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button/thf-button.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_list_item_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-list/thf-list-item.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__thf_list_item_detail_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-list/thf-list-item-detail.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__thf_list_item_content_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-list/thf-list-item-content.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - - -/** - * \@description - * Módulo do componente thf-list - */ -var ThfListModule = /** @class */ (function () { - function ThfListModule() { - } - ThfListModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */], - __WEBPACK_IMPORTED_MODULE_3__thf_button_thf_button_module__["a" /* ThfButtonModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_2__thf_list_component__["a" /* ThfListComponent */], - __WEBPACK_IMPORTED_MODULE_4__thf_list_item_component__["a" /* ThfListItemComponent */], - __WEBPACK_IMPORTED_MODULE_5__thf_list_item_detail_component__["a" /* ThfListItemDetailComponent */], - __WEBPACK_IMPORTED_MODULE_6__thf_list_item_content_component__["a" /* ThfListItemContentComponent */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_2__thf_list_component__["a" /* ThfListComponent */], - __WEBPACK_IMPORTED_MODULE_4__thf_list_item_component__["a" /* ThfListItemComponent */], - __WEBPACK_IMPORTED_MODULE_5__thf_list_item_detail_component__["a" /* ThfListItemDetailComponent */], - __WEBPACK_IMPORTED_MODULE_6__thf_list_item_content_component__["a" /* ThfListItemContentComponent */] - ], - providers: [], - schemas: [] - },] }, - ]; - /** @nocollapse */ - ThfListModule.ctorParameters = function () { return []; }; - return ThfListModule; -}()); - -function ThfListModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfListModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfListModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-loading/index.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__thf_loading_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-loading/thf-loading.module.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__thf_loading_module__["a"]; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-loading/thf-loading-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfLoadingBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * Este componente tem o objetivo de mostrar visualmente aos usuários que a aplicação está processando - * ou aguardando a resposta de alguma requisição. - */ -var ThfLoadingBaseComponent = /** @class */ (function () { - function ThfLoadingBaseComponent() { - /** - * Texto a ser exibido no componente. - */ - this.text = 'Carregando'; - } - ThfLoadingBaseComponent.propDecorators = { - "text": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-text',] },], - }; - return ThfLoadingBaseComponent; -}()); - -function ThfLoadingBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfLoadingBaseComponent.propDecorators; - /** - * Texto a ser exibido no componente. - * @type {?} - */ - ThfLoadingBaseComponent.prototype.text; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-loading/thf-loading.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfLoadingComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_loading_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-loading/thf-loading-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsPrivate - * - * \@docsExtends ThfLoadingBaseComponent - */ -var ThfLoadingComponent = /** @class */ (function (_super) { - __extends(ThfLoadingComponent, _super); - function ThfLoadingComponent() { - return _super !== null && _super.apply(this, arguments) || this; - } - ThfLoadingComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-loading', template: "
    {{text}}
    " - },] }, - ]; - /** @nocollapse */ - ThfLoadingComponent.ctorParameters = function () { return []; }; - return ThfLoadingComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_loading_base_component__["a" /* ThfLoadingBaseComponent */])); - -function ThfLoadingComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfLoadingComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfLoadingComponent.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-loading/thf-loading.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfLoadingModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_loading_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-loading/thf-loading.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsPrivate - * - * \@description - * - * Módulo do componente thf-loading. - */ -var ThfLoadingModule = /** @class */ (function () { - function ThfLoadingModule() { - } - ThfLoadingModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */] - ], - declarations: [__WEBPACK_IMPORTED_MODULE_2__thf_loading_component__["a" /* ThfLoadingComponent */]], - exports: [__WEBPACK_IMPORTED_MODULE_2__thf_loading_component__["a" /* ThfLoadingComponent */]] - },] }, - ]; - /** @nocollapse */ - ThfLoadingModule.ctorParameters = function () { return []; }; - return ThfLoadingModule; -}()); - -function ThfLoadingModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfLoadingModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfLoadingModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-menu/services/thf-menu-items.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfMenuItemsService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Subject__ = __webpack_require__("../../../../rxjs/_esm5/Subject.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsPrivate - * - * \@description - * - * Serviço que implementa a comunicação entre os items do thf-menu. - */ -var ThfMenuItemsService = /** @class */ (function () { - function ThfMenuItemsService() { - this.subjectParent = new __WEBPACK_IMPORTED_MODULE_1_rxjs_Subject__["a" /* Subject */](); - this.subjectChild = new __WEBPACK_IMPORTED_MODULE_1_rxjs_Subject__["a" /* Subject */](); - } - // Envia informações do click do thf-menu-item para o thf-menu - /** - * @param {?} menu - * @return {?} - */ - ThfMenuItemsService.prototype.sendToParentMenuClicked = /** - * @param {?} menu - * @return {?} - */ - function (menu) { - this.subjectChild.next(menu); - }; - // Recebe do thf-menu-item sua informação de click. - /** - * @return {?} - */ - ThfMenuItemsService.prototype.receiveFromChildMenuClicked = /** - * @return {?} - */ - function () { - return this.subjectChild.asObservable(); - }; - // Envia para os thf-menu-item a resposta do processamento de click de um thf-menu-item. - /** - * @param {?} menu - * @return {?} - */ - ThfMenuItemsService.prototype.sendToChildMenuClicked = /** - * @param {?} menu - * @return {?} - */ - function (menu) { - this.subjectParent.next(menu); - }; - // Recebe do thf-menu as informações processadas do click de um thf-menu-item. - /** - * @return {?} - */ - ThfMenuItemsService.prototype.receiveFromParentMenuClicked = /** - * @return {?} - */ - function () { - return this.subjectParent.asObservable(); - }; - ThfMenuItemsService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, - ]; - /** @nocollapse */ - ThfMenuItemsService.ctorParameters = function () { return []; }; - return ThfMenuItemsService; -}()); - -function ThfMenuItemsService_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfMenuItemsService.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfMenuItemsService.ctorParameters; - /** @type {?} */ - ThfMenuItemsService.prototype.subjectParent; - /** @type {?} */ - ThfMenuItemsService.prototype.subjectChild; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-menu/thf-menu-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfMenuBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_uuid__ = __webpack_require__("../../../../uuid/index.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_uuid___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_uuid__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * - * Este é um componente de menu lateral que é utilizado para navegação nas páginas de uma aplicação. - * - * O componente thf-menu recebe uma lista de objetos do tipo ```MenuItem``` com as informações dos itens de menu como - * textos, links para redirecionamento, ações, até 4 níveis de menu e ícones para o primeiro nível de menu. - */ -var ThfMenuBaseComponent = /** @class */ (function () { - function ThfMenuBaseComponent() { - this._filter = false; - this._maxLevel = 4; - } - Object.defineProperty(ThfMenuBaseComponent.prototype, "menus", { - get: /** - * @return {?} - */ - function () { - return this._menus; - }, - set: /** - * Lista dos itens do menu. Se o valor estiver indefinido ou inválido, será inicializado como um array vazio. - * @param {?} menus - * @return {?} - */ - function (menus) { - this._menus = Array.isArray(menus) ? menus : []; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfMenuBaseComponent.prototype, "maxLevel", { - get: /** - * @return {?} - */ - function () { - return this._maxLevel; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfMenuBaseComponent.prototype, "filter", { - get: /** - * @return {?} - */ - function () { - return this._filter; - }, - set: /** - * \@optional - * - * \@description - * - * Propriedade para adição de um campo para pesquisa no menu. - * A pesquisa é realizada em todos os níveis do menu e busca apenas pelos itens que contém uma ação e/ou link definidos. - * - * \@default false - * @param {?} filter - * @return {?} - */ - function (filter) { - this._filter = /** @type {?} */ (filter) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(filter); - this.filteredItems = this._menus.slice(); - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfMenuBaseComponent.prototype.setMenuExtraProperties = /** - * @return {?} - */ - function () { - var _this = this; - this.allowIcons = true; - this.menus.forEach(function (menuItem) { - _this._level = 1; - _this.allowIcons = _this.allowIcons ? Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["n" /* validValue */])(menuItem.icon) : false; - _this.setMenuItemProperties(menuItem); - if (menuItem.subItems) { - _this._level++; - _this.processSubItems(menuItem); - } - }); - }; - /** - * @param {?} menus - * @return {?} - */ - ThfMenuBaseComponent.prototype.validateMenus = /** - * @param {?} menus - * @return {?} - */ - function (menus) { - var _this = this; - menus.forEach(function (menu) { return _this.validateMenu(menu); }); - }; - /** - * @param {?} menu - * @return {?} - */ - ThfMenuBaseComponent.prototype.processSubItems = /** - * @param {?} menu - * @return {?} - */ - function (menu) { - var _this = this; - menu.subItems.forEach(function (menuItem, index, menuItems) { - var /** @type {?} */ previousItem = menuItems[index - 1]; - if (previousItem && previousItem.subItems) { - _this._level = previousItem['level']; - } - if (_this._level <= _this.maxLevel) { - _this.setMenuItemProperties(menuItem); - if (menuItem.subItems) { - _this._level++; - _this.processSubItems(menuItem); - } - } - }); - }; - /** - * @param {?} menuItem - * @return {?} - */ - ThfMenuBaseComponent.prototype.setMenuItemProperties = /** - * @param {?} menuItem - * @return {?} - */ - function (menuItem) { - menuItem['id'] = menuItem['id'] || Object(__WEBPACK_IMPORTED_MODULE_1_uuid__["v4"])(); - menuItem['level'] = this._level; - menuItem['type'] = this.setMenuType(menuItem); - }; - /** - * @param {?} menuItem - * @return {?} - */ - ThfMenuBaseComponent.prototype.setMenuType = /** - * @param {?} menuItem - * @return {?} - */ - function (menuItem) { - if (menuItem.subItems && menuItem.subItems.length > 0 && this._level < this.maxLevel) { - return 'subItems'; - } - if (!menuItem.link) { - return 'noLink'; - } - if (Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["g" /* isExternalLink */])(menuItem.link)) { - return 'externalLink'; - } - return 'internalLink'; - }; - /** - * @param {?} menuItem - * @return {?} - */ - ThfMenuBaseComponent.prototype.validateMenu = /** - * @param {?} menuItem - * @return {?} - */ - function (menuItem) { - var _this = this; - if (!menuItem.label || menuItem.label.trim() === '') { - throw new Error('O atributo ThfMenuItem.label não pode ser vazio.'); - } - else if (menuItem.subItems) { - menuItem.subItems.forEach(function (subItem) { - _this.validateMenu(subItem); - }); - } - }; - ThfMenuBaseComponent.propDecorators = { - "menus": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-menus',] },], - "filter": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-filter',] },], - }; - return ThfMenuBaseComponent; -}()); - -function ThfMenuBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfMenuBaseComponent.propDecorators; - /** @type {?} */ - ThfMenuBaseComponent.prototype._filter; - /** @type {?} */ - ThfMenuBaseComponent.prototype._menus; - /** @type {?} */ - ThfMenuBaseComponent.prototype._level; - /** @type {?} */ - ThfMenuBaseComponent.prototype._maxLevel; - /** @type {?} */ - ThfMenuBaseComponent.prototype.allowIcons; - /** @type {?} */ - ThfMenuBaseComponent.prototype.filteredItems; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-menu/thf-menu-filter/thf-menu-filter.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfMenuFilterComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * Componente que apresenta o campo de pesquisa no thf-menu. - */ -var ThfMenuFilterComponent = /** @class */ (function () { - function ThfMenuFilterComponent(viewRef) { - // Variável necessária para o thf-clean identificar que deve ser criado. - this.clean = true; - this.parentRef = viewRef['_view']['component']; - } - /** - * @return {?} - */ - ThfMenuFilterComponent.prototype.filterItems = /** - * @return {?} - */ - function () { - this.filterAction.call(this.parentRef, this.inputFilterElement.nativeElement.value); - }; - ThfMenuFilterComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-menu-filter', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfMenuFilterComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - ]; }; - ThfMenuFilterComponent.propDecorators = { - "inputFilterElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['inputFilter', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "filterAction": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-filter-action',] },], - }; - return ThfMenuFilterComponent; -}()); - -function ThfMenuFilterComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfMenuFilterComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfMenuFilterComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfMenuFilterComponent.propDecorators; - /** @type {?} */ - ThfMenuFilterComponent.prototype.clean; - /** @type {?} */ - ThfMenuFilterComponent.prototype.parentRef; - /** @type {?} */ - ThfMenuFilterComponent.prototype.inputFilterElement; - /** @type {?} */ - ThfMenuFilterComponent.prototype.filterAction; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-menu/thf-menu-item/thf-menu-item.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfMenuItemComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__services_thf_menu_items_service__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-menu/services/thf-menu-items.service.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsPrivate - * - * \@description - * - * Componente que implementa cada item do thf-menu. - */ -var ThfMenuItemComponent = /** @class */ (function () { - function ThfMenuItemComponent(menuItemsService) { - this.menuItemsService = menuItemsService; - this.maxHeight = 0; - this.subItemSize = 74; - } - /** - * @return {?} - */ - ThfMenuItemComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - var _this = this; - // subscribe to menu component messages - this.menuItemsService.receiveFromParentMenuClicked().subscribe(function (menu) { - _this.processMenuItem(menu); - }); - }; - /** - * @param {?} event - * @return {?} - */ - ThfMenuItemComponent.prototype.clickMenuItem = /** - * @param {?} event - * @return {?} - */ - function (event) { - if (!(event.ctrlKey || event.metaKey)) { - event.preventDefault(); - // Emmit to parent - this.menuItemsService.sendToParentMenuClicked({ - link: this.link, - action: this.action, - id: this.id, - icon: this.icon, - label: this.label, - level: this.level, - subItems: this.subItems, - isSelected: this.isSelected, - isOpened: this.isOpened, - type: this.type - }); - } - }; - /** - * @param {?} menu - * @return {?} - */ - ThfMenuItemComponent.prototype.activateMenu = /** - * @param {?} menu - * @return {?} - */ - function (menu) { - this.isSelected = menu && this.id === menu.id; - }; - /** - * @param {?} menuActive - * @param {?} menuOpened - * @param {?=} activatedByRoute - * @return {?} - */ - ThfMenuItemComponent.prototype.groupedMenu = /** - * @param {?} menuActive - * @param {?} menuOpened - * @param {?=} activatedByRoute - * @return {?} - */ - function (menuActive, menuOpened, activatedByRoute) { - if (activatedByRoute === void 0) { activatedByRoute = false; } - var /** @type {?} */ hasSubItemOpened = (menuOpened && this.id !== menuOpened['id']) ? this.hasSubItem(this.subItems, menuOpened['id']) : false; - this.isOpened = this.isMenuOpened(menuOpened, hasSubItemOpened); - this.isSelected = (menuActive && !this.isOpened) ? this.hasSubItem(this.subItems, menuActive['id']) : false; - if (!this.isOpened) { - this.maxHeight = 0; - return; - } - this.accordionAnimation(menuActive, menuOpened, hasSubItemOpened, activatedByRoute); - }; - /** - * @param {?} menuOpened - * @param {?} hasSubItemOpened - * @return {?} - */ - ThfMenuItemComponent.prototype.isMenuOpened = /** - * @param {?} menuOpened - * @param {?} hasSubItemOpened - * @return {?} - */ - function (menuOpened, hasSubItemOpened) { - if (menuOpened) { - return (this.id === menuOpened['id']) ? menuOpened['isOpened'] : hasSubItemOpened; - } - return false; - }; - /** - * @param {?} subItems - * @param {?} id - * @return {?} - */ - ThfMenuItemComponent.prototype.hasSubItem = /** - * @param {?} subItems - * @param {?} id - * @return {?} - */ - function (subItems, id) { - var _this = this; - if (subItems) { - return subItems.some(function (item) { - return item['id'] === id ? true : _this.hasSubItem(item.subItems, id); - }); - } - }; - /** - * @param {?} menu - * @return {?} - */ - ThfMenuItemComponent.prototype.processMenuItem = /** - * @param {?} menu - * @return {?} - */ - function (menu) { - if (this.type === 'internalLink') { - this.activateMenu(menu.active); - return; - } - if (this.type === 'subItems') { - this.groupedMenu(menu.active, menu.grouped, menu.activatedByRoute); - return; - } - }; - /** - * @param {?} menuActive - * @param {?} menuOpened - * @param {?} hasSubItemOpened - * @param {?} activatedByRoute - * @return {?} - */ - ThfMenuItemComponent.prototype.accordionAnimation = /** - * @param {?} menuActive - * @param {?} menuOpened - * @param {?} hasSubItemOpened - * @param {?} activatedByRoute - * @return {?} - */ - function (menuActive, menuOpened, hasSubItemOpened, activatedByRoute) { - if (this.id === menuOpened['id']) { - this.maxHeight = this.subItems.length * this.subItemSize; - } - if (hasSubItemOpened) { - this.maxHeight = menuOpened['isOpened'] ? - (this.maxHeight + menuOpened.subItems.length * this.subItemSize) : - (this.maxHeight - menuOpened.subItems.length * this.subItemSize); - if (activatedByRoute) { - this.maxHeight = this.getMinimumHeight(0, this, menuActive); - } - } - }; - /** - * @param {?} minimumHeight - * @param {?} menuItem - * @param {?} menuActive - * @return {?} - */ - ThfMenuItemComponent.prototype.getMinimumHeight = /** - * @param {?} minimumHeight - * @param {?} menuItem - * @param {?} menuActive - * @return {?} - */ - function (minimumHeight, menuItem, menuActive) { - minimumHeight += this.subItemSize; - if (menuItem.subItems && this.hasSubItem(menuItem.subItems, menuActive['id'])) { - for (var /** @type {?} */ index = 0; index < menuItem.subItems.length; index++) { - minimumHeight = this.getMinimumHeight(minimumHeight, menuItem.subItems[index], menuActive); - } - } - return minimumHeight; - }; - ThfMenuItemComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-menu-item', template: "
    {{ label }}
    " - },] }, - ]; - /** @nocollapse */ - ThfMenuItemComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__services_thf_menu_items_service__["a" /* ThfMenuItemsService */], }, - ]; }; - ThfMenuItemComponent.propDecorators = { - "action": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-action',] },], - "icon": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-icon',] },], - "id": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-id',] },], - "isSelected": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-is-selected',] },], - "isOpened": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-is-opened',] },], - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "level": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-level',] },], - "link": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-link',] },], - "subItems": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-sub-items',] },], - "type": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-type',] },], - }; - return ThfMenuItemComponent; -}()); - -function ThfMenuItemComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfMenuItemComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfMenuItemComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfMenuItemComponent.propDecorators; - /** @type {?} */ - ThfMenuItemComponent.prototype.maxHeight; - /** @type {?} */ - ThfMenuItemComponent.prototype.subItemSize; - /** @type {?} */ - ThfMenuItemComponent.prototype.action; - /** @type {?} */ - ThfMenuItemComponent.prototype.icon; - /** @type {?} */ - ThfMenuItemComponent.prototype.id; - /** @type {?} */ - ThfMenuItemComponent.prototype.isSelected; - /** @type {?} */ - ThfMenuItemComponent.prototype.isOpened; - /** @type {?} */ - ThfMenuItemComponent.prototype.label; - /** @type {?} */ - ThfMenuItemComponent.prototype.level; - /** @type {?} */ - ThfMenuItemComponent.prototype.link; - /** @type {?} */ - ThfMenuItemComponent.prototype.subItems; - /** @type {?} */ - ThfMenuItemComponent.prototype.type; - /** @type {?} */ - ThfMenuItemComponent.prototype.menuItemsService; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-menu/thf-menu.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfMenuComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_menu_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-menu/thf-menu-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__services_thf_menu_items_service__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-menu/services/thf-menu-items.service.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - -/** - * \@docsExtends ThfMenuBaseComponent - * - * \@description - * - * Aparece completo em telas com largura maior que 1200px, caso contrário o menu é escondido e chamado por meio de um botão. - * - * Para o menu funcionar corretamente é necessário importar o `RouterModule` e `Routes` do módulo principal de - * sua aplicação: - * - * ```` - * import { RouterModule, Routes } from '\@angular/router'; - * - * ... - * - * \@NgModule({ - * imports: [ - * RouterModule, - * Routes, - * ... - * ThfModule, - * ... - * ], - * declarations: [ - * AppComponent - * ], - * providers: [], - * bootstrap: [AppComponent] - * }) - * export class AppModule { } - * ``` - * - * Além disso é necessário criar um módulo configurando as rotas da aplicação. - * - * ``` - * import { NgModule } from '\@angular/core'; - * - * import { RouterModule, Routes } from '\@angular/router'; - * - * import { HelloWorldComponent } from './hello-world/hello-world.component'; - * - * const routes: Routes = [ - * {path: 'hello-world', component: HelloWorldComponent} - * ]; - * - * \@NgModule({ - * imports: [RouterModule.forRoot(routes, {useHash: true})], - * exports: [RouterModule] - * }) - * export class AppRoutingModule {} - * ``` - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfMenuComponent = /** @class */ (function (_super) { - __extends(ThfMenuComponent, _super); - function ThfMenuComponent(viewRef, location, router, menuItemsService, changeDetector) { - var _this = _super.call(this) || this; - _this.location = location; - _this.router = router; - _this.menuItemsService = menuItemsService; - _this.changeDetector = changeDetector; - _this.menuMobileOpened = false; - _this.filteringItems = false; - _this.menuInitialized = false; - _this.menuPrevious = null; - _this.parentRef = viewRef['_view']['component']; - return _this; - } - /** - * @return {?} - */ - ThfMenuComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - this.subscribeToMenuItem(); - this.subscribeToRoute(); - }; - /** - * @return {?} - */ - ThfMenuComponent.prototype.ngDoCheck = /** - * @return {?} - */ - function () { - if (this.filteringItems && this.filter) { - return; - } - var /** @type {?} */ menuCurrent = JSON.stringify(this.menus); - if (this.menuPrevious !== menuCurrent || !this.menuInitialized) { - this.updateMenu(); - } - }; - /** - * @return {?} - */ - ThfMenuComponent.prototype.subscribeToRoute = /** - * @return {?} - */ - function () { - var _this = this; - this.router.events.subscribe(function (val) { - if (val instanceof __WEBPACK_IMPORTED_MODULE_2__angular_router__["a" /* NavigationEnd */]) { - _this.checkActiveMenuByUrl(_this.location.path()); - } - }); - }; - /** - * @return {?} - */ - ThfMenuComponent.prototype.subscribeToMenuItem = /** - * @return {?} - */ - function () { - var _this = this; - this.menuItemsService.receiveFromChildMenuClicked().subscribe(function (menu) { - _this.clickMenuItem(menu); - }); - }; - /** - * @param {?} urlPath - * @return {?} - */ - ThfMenuComponent.prototype.checkActiveMenuByUrl = /** - * @param {?} urlPath - * @return {?} - */ - function (urlPath) { - if (!this.linkActive || this.linkActive !== urlPath) { - this.activateMenuByUrl(urlPath, this.menus); - } - }; - /** - * @param {?} urlPath - * @param {?} menus - * @return {?} - */ - ThfMenuComponent.prototype.activateMenuByUrl = /** - * @param {?} urlPath - * @param {?} menus - * @return {?} - */ - function (urlPath, menus) { - var _this = this; - if (menus) { - return menus.some(function (menu) { - var /** @type {?} */ menuLink = Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["f" /* getFormattedLink */])(menu.link); - if (Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["f" /* getFormattedLink */])(menu.link) === urlPath) { - _this.activateMenuItem(menu); - return true; - } - else { - return _this.activateMenuByUrl(urlPath, menu.subItems); - } - }); - } - }; - /** - * @return {?} - */ - ThfMenuComponent.prototype.toggleMenuMobile = /** - * @return {?} - */ - function () { - this.menuMobileOpened = !this.menuMobileOpened; - }; - /** - * @param {?} filter - * @return {?} - */ - ThfMenuComponent.prototype.debounceFilter = /** - * @param {?} filter - * @return {?} - */ - function (filter) { - var _this = this; - clearTimeout(this.timeoutResize); - this.timeoutResize = setTimeout(function () { - _this.filterItems(filter); - }, 300); - }; - /** - * @param {?} filter - * @return {?} - */ - ThfMenuComponent.prototype.filterItems = /** - * @param {?} filter - * @return {?} - */ - function (filter) { - if (filter && filter.trim()) { - this.filteredItems = []; - this.findItems(this.menus, filter.toLowerCase()); - this.filteringItems = true; - } - else { - this.filteredItems = this.menus.slice(); - this.filteringItems = false; - } - this.changeDetector.detectChanges(); - this.menuItemsService.sendToChildMenuClicked({ active: this.activeMenuItem, grouped: this.groupedMenuItem }); - }; - /** - * @param {?} menus - * @param {?} filter - * @return {?} - */ - ThfMenuComponent.prototype.findItems = /** - * @param {?} menus - * @param {?} filter - * @return {?} - */ - function (menus, filter) { - var _this = this; - menus.forEach(function (menu) { - if ((menu.label.toLowerCase().includes(filter) && !menu.subItems) || - (menu.subItems && _this.findItems(menu.subItems, filter))) { - _this.filteredItems.push(menu); - } - }); - }; - /** - * @param {?} menu - * @return {?} - */ - ThfMenuComponent.prototype.clickMenuItem = /** - * @param {?} menu - * @return {?} - */ - function (menu) { - if (menu.action) { - this.executeMenuAction(menu); - } - if (menu['type'] === 'externalLink') { - Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["j" /* openExternalLink */])(menu.link); - } - else if (menu['type'] === 'internalLink') { - this.activateMenuItem(menu); - } - else if (menu['type'] === 'subItems') { - if (this.filteringItems) { - this.filteringItems = false; - } - this.groupMenuItem(menu); - } - if (menu['type'] !== 'subItems') { - this.menuMobileOpened = false; - } - }; - /** - * @param {?} menu - * @return {?} - */ - ThfMenuComponent.prototype.activateMenuItem = /** - * @param {?} menu - * @return {?} - */ - function (menu) { - this.activeMenuItem = menu; - this.linkActive = Object(__WEBPACK_IMPORTED_MODULE_3__utils_util__["f" /* getFormattedLink */])(menu.link); - if (this.activeMenuItem['level'] > 1) { - this.openParentMenu(this.activeMenuItem); - } - else { - this.groupedMenuItem = null; - } - this.menuItemsService.sendToChildMenuClicked({ active: this.activeMenuItem, grouped: this.groupedMenuItem, activatedByRoute: true }); - }; - /** - * @param {?} menu - * @return {?} - */ - ThfMenuComponent.prototype.groupMenuItem = /** - * @param {?} menu - * @return {?} - */ - function (menu) { - menu['isOpened'] = !menu['isOpened']; - this.groupedMenuItem = menu; - this.menuItemsService.sendToChildMenuClicked({ active: this.activeMenuItem, grouped: this.groupedMenuItem }); - }; - /** - * @param {?} childMenu - * @return {?} - */ - ThfMenuComponent.prototype.openParentMenu = /** - * @param {?} childMenu - * @return {?} - */ - function (childMenu) { - var /** @type {?} */ parent = this.findParent(this.menus, childMenu); - parent['isOpened'] = true; - this.groupedMenuItem = parent; - }; - /** - * @param {?} menus - * @param {?} menuItem - * @return {?} - */ - ThfMenuComponent.prototype.findParent = /** - * @param {?} menus - * @param {?} menuItem - * @return {?} - */ - function (menus, menuItem) { - var /** @type {?} */ getParent = function (menuItems, id) { - if (menuItems) { - for (var /** @type {?} */ index = 0; index < menuItems.length; index++) { - var /** @type {?} */ menu = menuItems[index]; - if (menu.subItems && menu.subItems.find(function (subItem) { return subItem['id'] === id; })) { - return menu; - } - var /** @type {?} */ found = getParent(menu.subItems, id); - if (found) { - return found; - } - } - } - }; - return getParent(menus, menuItem['id']); - }; - /** - * @param {?} menu - * @return {?} - */ - ThfMenuComponent.prototype.executeMenuAction = /** - * @param {?} menu - * @return {?} - */ - function (menu) { - if (typeof menu.action === 'string') { - this.parentRef[menu.action](menu); - } - else { - menu.action.call(this.parentRef, menu); - } - }; - /** - * @return {?} - */ - ThfMenuComponent.prototype.updateMenu = /** - * @return {?} - */ - function () { - this.menuInitialized = true; - this.setMenuExtraProperties(); - this.filteredItems = this.menus.slice(); - this.menuPrevious = JSON.stringify(this.menus); - this.validateMenus(this.menus); - }; - ThfMenuComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-menu', template: "
    ", - providers: [__WEBPACK_IMPORTED_MODULE_5__services_thf_menu_items_service__["a" /* ThfMenuItemsService */]] - },] }, - ]; - /** @nocollapse */ - ThfMenuComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_1__angular_common__["f" /* Location */], }, - { type: __WEBPACK_IMPORTED_MODULE_2__angular_router__["b" /* Router */], }, - { type: __WEBPACK_IMPORTED_MODULE_5__services_thf_menu_items_service__["a" /* ThfMenuItemsService */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["k" /* ChangeDetectorRef */], }, - ]; }; - return ThfMenuComponent; -}(__WEBPACK_IMPORTED_MODULE_4__thf_menu_base_component__["a" /* ThfMenuBaseComponent */])); - -function ThfMenuComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfMenuComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfMenuComponent.ctorParameters; - /** @type {?} */ - ThfMenuComponent.prototype.linkActive; - /** @type {?} */ - ThfMenuComponent.prototype.parentRef; - /** @type {?} */ - ThfMenuComponent.prototype.menuMobileOpened; - /** @type {?} */ - ThfMenuComponent.prototype.activeMenuItem; - /** @type {?} */ - ThfMenuComponent.prototype.groupedMenuItem; - /** @type {?} */ - ThfMenuComponent.prototype.timeoutResize; - /** @type {?} */ - ThfMenuComponent.prototype.filteringItems; - /** @type {?} */ - ThfMenuComponent.prototype.menuInitialized; - /** @type {?} */ - ThfMenuComponent.prototype.menuPrevious; - /** @type {?} */ - ThfMenuComponent.prototype.location; - /** @type {?} */ - ThfMenuComponent.prototype.router; - /** @type {?} */ - ThfMenuComponent.prototype.menuItemsService; - /** @type {?} */ - ThfMenuComponent.prototype.changeDetector; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-menu/thf-menu.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfMenuModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_field_thf_field_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-field.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_menu_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-menu/thf-menu.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__thf_menu_filter_thf_menu_filter_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-menu/thf-menu-filter/thf-menu-filter.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__thf_menu_item_thf_menu_item_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-menu/thf-menu-item/thf-menu-item.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - - -/** - * \@description - * - * Módulo do componente thf-menu. - */ -var ThfMenuModule = /** @class */ (function () { - function ThfMenuModule() { - } - ThfMenuModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_2__angular_common__["b" /* CommonModule */], - __WEBPACK_IMPORTED_MODULE_1__angular_router__["c" /* RouterModule */], - __WEBPACK_IMPORTED_MODULE_3__thf_field_thf_field_module__["a" /* ThfFieldModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_4__thf_menu_component__["a" /* ThfMenuComponent */], - __WEBPACK_IMPORTED_MODULE_5__thf_menu_filter_thf_menu_filter_component__["a" /* ThfMenuFilterComponent */], - __WEBPACK_IMPORTED_MODULE_6__thf_menu_item_thf_menu_item_component__["a" /* ThfMenuItemComponent */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_4__thf_menu_component__["a" /* ThfMenuComponent */] - ] - },] }, - ]; - /** @nocollapse */ - ThfMenuModule.ctorParameters = function () { return []; }; - return ThfMenuModule; -}()); - -function ThfMenuModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfMenuModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfMenuModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-modal/thf-modal-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfModalBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@description - * - * O componente thf-modal é utilizado para incluir conteúdos rápidos e informativos. - * O rodapé possui um botão de ação primária, e um de ação secundária no qual permite adicionar uma ação, e um label por botão. - * Além de title no cabeçalho do componente, e o conteúdo no body do componente para inserir algum conteúdo informativo. - */ -var ThfModalBaseComponent = /** @class */ (function () { - function ThfModalBaseComponent() { - this._size = 'md'; - /** - * Define o fechamento da modal ao clicar fora da mesma. Informe o valor "true" para ativar o fechamento ao clicar fora da modal. - */ - this.clickOut = false; - /** - * Permite esconder o ícone de fechar do título da modal - */ - this.hideClose = false; - // Controla se o modal fica oculto ou visível, por padrão é oculto - this.isHidden = true; - this.onXClosed = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - Object.defineProperty(ThfModalBaseComponent.prototype, "size", { - get: /** - * @return {?} - */ - function () { - return this._size; - }, - set: /** - * Define o tamanho da modal, esta proriedade aceita os valores 'sm' (pequeno), 'md' (médio), 'lg' (grande), - * 'xl' (extra grande) e 'auto' (automático). - * Quando informado 'auto' o modal calculará automaticamente o tamanho da modal baseado em seu conteúdo. - * Caso não seja informado um valor, a modal terá o tamanho definido como 'md' (médio). - * @param {?} value - * @return {?} - */ - function (value) { - var /** @type {?} */ sizes = ['sm', 'md', 'lg', 'xl', 'auto']; - this._size = sizes.indexOf(value) > -1 ? value : 'md'; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfModalBaseComponent.prototype, "setClickOut", { - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - this.clickOut = (value === '') ? false : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(value); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfModalBaseComponent.prototype, "setHideClose", { - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - this.hideClose = (value === '') ? false : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(value); - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfModalBaseComponent.prototype.onClickOut = /** - * @return {?} - */ - function () { - if (this.clickOut) { - this.close(); - } - }; - /** Função para fechar a modal */ - /** - * Função para fechar a modal - * @param {?=} xClosed - * @return {?} - */ - ThfModalBaseComponent.prototype.close = /** - * Função para fechar a modal - * @param {?=} xClosed - * @return {?} - */ - function (xClosed) { - if (xClosed === void 0) { xClosed = false; } - this.isHidden = true; - if (xClosed) { - this.onXClosed.emit(xClosed); - } - }; - /** Função para abrir a modal */ - /** - * Função para abrir a modal - * @return {?} - */ - ThfModalBaseComponent.prototype.open = /** - * Função para abrir a modal - * @return {?} - */ - function () { - this.validPrimaryAction(); - this.isHidden = false; - }; - /** - * @return {?} - */ - ThfModalBaseComponent.prototype.validPrimaryAction = /** - * @return {?} - */ - function () { - var _this = this; - if (!this.primaryAction) { - this.primaryAction = { - action: function () { return _this.close(); }, - label: 'Ok', - }; - } - if (!this.primaryAction['action']) { - this.primaryAction['action'] = function () { return _this.close(); }; - } - if (!this.primaryAction['label']) { - this.primaryAction['label'] = 'Ok'; - } - }; - ThfModalBaseComponent.propDecorators = { - "title": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-title',] },], - "primaryAction": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-primary-action',] },], - "secondaryAction": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-secondary-action',] },], - "size": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-size',] },], - "setClickOut": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-click-out',] },], - "setHideClose": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-hide-close',] },], - }; - return ThfModalBaseComponent; -}()); - -function ThfModalBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfModalBaseComponent.propDecorators; - /** @type {?} */ - ThfModalBaseComponent.prototype._size; - /** - * Título da modal. - * @type {?} - */ - ThfModalBaseComponent.prototype.title; - /** - * Deve ser definido um objeto que implementa a interface ThfModalAction contendo a label e a função da primeira ação. - * Caso esta propriedade não seja definida ou esteja incompleta, automaticamente será adicionado um botão de ação com - * a função de fechar a modal. - * @type {?} - */ - ThfModalBaseComponent.prototype.primaryAction; - /** - * Deve ser definido um objeto que implementa a interface ThfModalAction contendo a label e a função da segunda ação. - * @type {?} - */ - ThfModalBaseComponent.prototype.secondaryAction; - /** - * Define o fechamento da modal ao clicar fora da mesma. Informe o valor "true" para ativar o fechamento ao clicar fora da modal. - * @type {?} - */ - ThfModalBaseComponent.prototype.clickOut; - /** - * Permite esconder o ícone de fechar do título da modal - * @type {?} - */ - ThfModalBaseComponent.prototype.hideClose; - /** @type {?} */ - ThfModalBaseComponent.prototype.isHidden; - /** @type {?} */ - ThfModalBaseComponent.prototype.onXClosed; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-modal/thf-modal.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfModalComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_modal_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-modal/thf-modal-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsExtends ThfModalBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfModalComponent = /** @class */ (function (_super) { - __extends(ThfModalComponent, _super); - function ThfModalComponent() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.focusableElements = 'input, select, textarea, button, a'; - return _this; - } - /** - * @return {?} - */ - ThfModalComponent.prototype.open = /** - * @return {?} - */ - function () { - _super.prototype.open.call(this); - this.handleFocus(); - }; - /** - * @param {?=} xClosed - * @return {?} - */ - ThfModalComponent.prototype.close = /** - * @param {?=} xClosed - * @return {?} - */ - function (xClosed) { - if (xClosed === void 0) { xClosed = false; } - _super.prototype.close.call(this, xClosed); - document.removeEventListener('focus', this.focusFunction, true); - }; - /** - * @return {?} - */ - ThfModalComponent.prototype.handleFocus = /** - * @return {?} - */ - function () { - var _this = this; - setTimeout(function () { - if (_this.modalContent) { - _this.initFocus(); - document.addEventListener('focus', _this.focusFunction, true); - } - }); - }; - /** - * @return {?} - */ - ThfModalComponent.prototype.initFocus = /** - * @return {?} - */ - function () { - var _this = this; - this.focusFunction = function (event) { - var /** @type {?} */ modalElement = _this.modalContent.nativeElement; - if (!modalElement.contains(event.target)) { - event.stopPropagation(); - _this.firstElement.focus(); - } - }; - this.setFirstElement(); - if (!this.hideClose) { - var /** @type {?} */ firstFieldElement = this.modalContent.nativeElement.querySelectorAll(this.focusableElements)[1]; - firstFieldElement.focus(); - } - else { - this.firstElement.focus(); - } - }; - /** - * @return {?} - */ - ThfModalComponent.prototype.setFirstElement = /** - * @return {?} - */ - function () { - this.firstElement = this.modalContent.nativeElement.querySelector(this.focusableElements); - }; - ThfModalComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-modal', template: "
    {{ title }}
    " - },] }, - ]; - /** @nocollapse */ - ThfModalComponent.ctorParameters = function () { return []; }; - ThfModalComponent.propDecorators = { - "modalContent": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['modalContent', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - }; - return ThfModalComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_modal_base_component__["a" /* ThfModalBaseComponent */])); - -function ThfModalComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfModalComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfModalComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfModalComponent.propDecorators; - /** @type {?} */ - ThfModalComponent.prototype.modalContent; - /** @type {?} */ - ThfModalComponent.prototype.firstElement; - /** @type {?} */ - ThfModalComponent.prototype.focusFunction; - /** @type {?} */ - ThfModalComponent.prototype.focusableElements; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-modal/thf-modal.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfModalModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_button_thf_button_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button/thf-button.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_modal_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-modal/thf-modal.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@description - * Módulo do componente thf-modal - */ -var ThfModalModule = /** @class */ (function () { - function ThfModalModule() { - } - ThfModalModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */], - __WEBPACK_IMPORTED_MODULE_2__thf_button_thf_button_module__["a" /* ThfButtonModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_3__thf_modal_component__["a" /* ThfModalComponent */] - ], - exports: [__WEBPACK_IMPORTED_MODULE_3__thf_modal_component__["a" /* ThfModalComponent */]], - providers: [] - },] }, - ]; - /** @nocollapse */ - ThfModalModule.ctorParameters = function () { return []; }; - return ThfModalModule; -}()); - -function ThfModalModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfModalModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfModalModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageBaseComponent; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** - * \@docsPrivate - * - * \@description - * - * O componente **thf-page** é utilizado como container principal para os componentes thf-page-header, thf-page-content - * e para as ações dos componentes thf-page-edit e thf-page-detail. - * - * Quando estiver sendo utilizado o componente thf-menu junto ao thf-page, ambos devem estar no mesmo nível - * e inseridos em uma div com a classe **thf-wrapper**. Esta classe será responsável por fazer os cálculos - * necessários de alinhamento dos componentes. - * - * O componente **thf-page** também pode ser utilizado sem o thf-menu e neste caso o corpo da página deve ser - * definido com a altura de 100% para que o thf-page maximize seu tamanho. - * ``` - * html, body { - * height:100%; - * } - * ``` - */ -var /** - * \@docsPrivate - * - * \@description - * - * O componente **thf-page** é utilizado como container principal para os componentes thf-page-header, thf-page-content - * e para as ações dos componentes thf-page-edit e thf-page-detail. - * - * Quando estiver sendo utilizado o componente thf-menu junto ao thf-page, ambos devem estar no mesmo nível - * e inseridos em uma div com a classe **thf-wrapper**. Esta classe será responsável por fazer os cálculos - * necessários de alinhamento dos componentes. - * - * O componente **thf-page** também pode ser utilizado sem o thf-menu e neste caso o corpo da página deve ser - * definido com a altura de 100% para que o thf-page maximize seu tamanho. - * ``` - * html, body { - * height:100%; - * } - * ``` - */ -ThfPageBaseComponent = /** @class */ (function () { - function ThfPageBaseComponent() { - } - return ThfPageBaseComponent; -}()); -/** - * \@docsPrivate - * - * \@description - * - * O componente **thf-page** é utilizado como container principal para os componentes thf-page-header, thf-page-content - * e para as ações dos componentes thf-page-edit e thf-page-detail. - * - * Quando estiver sendo utilizado o componente thf-menu junto ao thf-page, ambos devem estar no mesmo nível - * e inseridos em uma div com a classe **thf-wrapper**. Esta classe será responsável por fazer os cálculos - * necessários de alinhamento dos componentes. - * - * O componente **thf-page** também pode ser utilizado sem o thf-menu e neste caso o corpo da página deve ser - * definido com a altura de 100% para que o thf-page maximize seu tamanho. - * ``` - * html, body { - * height:100%; - * } - * ``` - */ - - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-content/thf-page-content-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageContentBaseComponent; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** - * \@docsPrivate - * - * \@description - * - * O componente **thf-page-content** é utilizado como o container para o conteúdo da página. - */ -var /** - * \@docsPrivate - * - * \@description - * - * O componente **thf-page-content** é utilizado como o container para o conteúdo da página. - */ -ThfPageContentBaseComponent = /** @class */ (function () { - function ThfPageContentBaseComponent() { - } - return ThfPageContentBaseComponent; -}()); -/** - * \@docsPrivate - * - * \@description - * - * O componente **thf-page-content** é utilizado como o container para o conteúdo da página. - */ - - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-content/thf-page-content.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageContentComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_page_content_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-content/thf-page-content-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsPrivate - * - * \@docsExtends ThfPageContentBaseComponent - */ -var ThfPageContentComponent = /** @class */ (function (_super) { - __extends(ThfPageContentComponent, _super); - function ThfPageContentComponent(renderer) { - var _this = _super.call(this) || this; - _this.height = '90%'; - _this.marginTop = ''; - _this.overflowY = 'none'; - renderer.listenGlobal('window', 'resize', function (event) { - _this.setHeightContent(_this.pageHeaderElement, _this.bottomActions, _this.toolbarElement); - }); - return _this; - } - /** - * @return {?} - */ - ThfPageContentComponent.prototype.ngAfterViewInit = /** - * @return {?} - */ - function () { - var _this = this; - setTimeout(function () { - _this.pageHeaderElement = /** @type {?} */ (document.querySelector('div.thf-page-header')); - _this.bottomActions = /** @type {?} */ (document.querySelector('div.thf-page-bottom-container')); - _this.toolbarElement = /** @type {?} */ (document.querySelector('div.thf-toolbar')); - _this.setHeightContent(_this.pageHeaderElement, _this.bottomActions, _this.toolbarElement); - }); - }; - /** - * @param {?} thfPageHeader - * @param {?} bottomActions - * @param {?} toolbarElement - * @return {?} - */ - ThfPageContentComponent.prototype.setHeightContent = /** - * @param {?} thfPageHeader - * @param {?} bottomActions - * @param {?} toolbarElement - * @return {?} - */ - function (thfPageHeader, bottomActions, toolbarElement) { - var /** @type {?} */ toolbarElementHeight = toolbarElement ? 33 : 0; - var /** @type {?} */ pageHeaderHeight = thfPageHeader ? thfPageHeader.offsetHeight : 0; - var /** @type {?} */ bottomActionsHeight = bottomActions ? bottomActions.offsetHeight : 0; - var /** @type {?} */ bodyHeight = document.body.clientHeight; - var /** @type {?} */ newHeight = bodyHeight - (pageHeaderHeight + bottomActionsHeight + toolbarElementHeight); - this.overflowY = bottomActions ? 'auto' : 'none'; - this.height = newHeight + "px"; - this.marginTop = pageHeaderHeight + toolbarElementHeight + "px"; - }; - ThfPageContentComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-page-content', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfPageContentComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["W" /* Renderer */], }, - ]; }; - return ThfPageContentComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_page_content_base_component__["a" /* ThfPageContentBaseComponent */])); - -function ThfPageContentComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfPageContentComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfPageContentComponent.ctorParameters; - /** @type {?} */ - ThfPageContentComponent.prototype.height; - /** @type {?} */ - ThfPageContentComponent.prototype.toolbarElement; - /** @type {?} */ - ThfPageContentComponent.prototype.pageHeaderElement; - /** @type {?} */ - ThfPageContentComponent.prototype.bottomActions; - /** @type {?} */ - ThfPageContentComponent.prototype.marginTop; - /** @type {?} */ - ThfPageContentComponent.prototype.overflowY; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-default/thf-page-default-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageDefaultBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@description - * - * O componente `thf-page-default` é utilizado como o container principal para as telas sem um template definido. - * @abstract - */ -var ThfPageDefaultBaseComponent = /** @class */ (function () { - function ThfPageDefaultBaseComponent() { - this._actions = []; - } - Object.defineProperty(ThfPageDefaultBaseComponent.prototype, "actions", { - get: /** - * @return {?} - */ - function () { - return this._actions; - }, - set: /** - * \@optional - * - * Nesta propriedade deve ser definido um array de objetos que implementam a interface `ThfPageAction`. - * @param {?} actions - * @return {?} - */ - function (actions) { - this._actions = actions; - this.setDropdownActions(); - }, - enumerable: true, - configurable: true - }); - ThfPageDefaultBaseComponent.propDecorators = { - "title": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-title',] },], - "actions": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-actions',] },], - }; - return ThfPageDefaultBaseComponent; -}()); - -function ThfPageDefaultBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfPageDefaultBaseComponent.propDecorators; - /** @type {?} */ - ThfPageDefaultBaseComponent.prototype._actions; - /** - * Título da página - * @type {?} - */ - ThfPageDefaultBaseComponent.prototype.title; - /** - * @abstract - * @return {?} - */ - ThfPageDefaultBaseComponent.prototype.setDropdownActions = function () { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-default/thf-page-default.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageDefaultComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_page_default_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-default/thf-page-default-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsExtends ThfPageDefaultBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfPageDefaultComponent = /** @class */ (function (_super) { - __extends(ThfPageDefaultComponent, _super); - function ThfPageDefaultComponent(viewRef, renderer, router) { - var _this = _super.call(this) || this; - _this.renderer = renderer; - _this.router = router; - _this.limitPrimaryActions = 3; - _this.maxWidthMobile = 480; - _this.parentRef = viewRef['_view']['component']; - return _this; - } - /** - * @return {?} - */ - ThfPageDefaultComponent.prototype.ngAfterContentInit = /** - * @return {?} - */ - function () { - var _this = this; - this.setIsMobile(); - this.setDropdownActions(); - this.renderer.listenGlobal('window', 'resize', function (event) { - _this.onResize(event); - }); - }; - /** - * @param {?} changes - * @return {?} - */ - ThfPageDefaultComponent.prototype.ngOnChanges = /** - * @param {?} changes - * @return {?} - */ - function (changes) { - this.setDropdownActions(); - }; - /** - * @param {?} item - * @return {?} - */ - ThfPageDefaultComponent.prototype.callAction = /** - * @param {?} item - * @return {?} - */ - function (item) { - if (item.url) { - this.router.navigate([item.url]); - } - else if (item.action) { - Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["a" /* callFunction */])(item.action, this.parentRef); - } - }; - /** - * @param {?} event - * @return {?} - */ - ThfPageDefaultComponent.prototype.onResize = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ width = (/** @type {?} */ (event.target)).innerWidth; - if (width < this.maxWidthMobile) { - this.isMobile = true; - this.limitPrimaryActions = 2; - this.setDropdownActions(); - } - else { - this.isMobile = false; - this.limitPrimaryActions = 3; - this.setDropdownActions(); - } - }; - /** - * @return {?} - */ - ThfPageDefaultComponent.prototype.setIsMobile = /** - * @return {?} - */ - function () { - if (window.innerWidth < this.maxWidthMobile) { - this.isMobile = true; - this.limitPrimaryActions = 2; - } - }; - /** - * @return {?} - */ - ThfPageDefaultComponent.prototype.setDropdownActions = /** - * @return {?} - */ - function () { - if (this.actions.length > this.limitPrimaryActions) { - this.dropdownActions = this.actions.slice(this.limitPrimaryActions - 1); - } - }; - ThfPageDefaultComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-page-default', template: "
    limitPrimaryActions\" t-label=\"Outras ações\" [t-actions]=\"dropdownActions\">
    " - },] }, - ]; - /** @nocollapse */ - ThfPageDefaultComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["W" /* Renderer */], }, - { type: __WEBPACK_IMPORTED_MODULE_1__angular_router__["b" /* Router */], }, - ]; }; - return ThfPageDefaultComponent; -}(__WEBPACK_IMPORTED_MODULE_3__thf_page_default_base_component__["a" /* ThfPageDefaultBaseComponent */])); - -function ThfPageDefaultComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfPageDefaultComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfPageDefaultComponent.ctorParameters; - /** @type {?} */ - ThfPageDefaultComponent.prototype.limitPrimaryActions; - /** @type {?} */ - ThfPageDefaultComponent.prototype.dropdownActions; - /** @type {?} */ - ThfPageDefaultComponent.prototype.isMobile; - /** @type {?} */ - ThfPageDefaultComponent.prototype.maxWidthMobile; - /** @type {?} */ - ThfPageDefaultComponent.prototype.parentRef; - /** @type {?} */ - ThfPageDefaultComponent.prototype.renderer; - /** @type {?} */ - ThfPageDefaultComponent.prototype.router; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-detail/thf-page-detail-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageDetailBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@description - * - * O componente **thf-page-detail** é utilizado como container principal para a tela de detalhamento de um registro. - * Por padrão possui 3 ações, cada ação na tela executa uma função no componente que está utilizando o thf-page-detail, - * são elas: - * - Voltar (função: back); - * - Editar (função: edit); - * - Remover (função: remove); - * - * Caso não estiver implementado alguma função, listado anteriormente, o mesmo não será apresentado. - */ -var ThfPageDetailBaseComponent = /** @class */ (function () { - function ThfPageDetailBaseComponent() { - } - ThfPageDetailBaseComponent.propDecorators = { - "title": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-title',] },], - }; - return ThfPageDetailBaseComponent; -}()); - -function ThfPageDetailBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfPageDetailBaseComponent.propDecorators; - /** - * Título da página - * @type {?} - */ - ThfPageDetailBaseComponent.prototype.title; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-detail/thf-page-detail.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageDetailComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_page_detail_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-detail/thf-page-detail-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_page_util_thf_page_util__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-util/thf-page-util.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfPageDetailBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfPageDetailComponent = /** @class */ (function (_super) { - __extends(ThfPageDetailComponent, _super); - function ThfPageDetailComponent(viewRef) { - var _this = _super.call(this) || this; - _this.callActionFn = __WEBPACK_IMPORTED_MODULE_2__thf_page_util_thf_page_util__["a" /* callAction */]; - _this.hasActionFn = __WEBPACK_IMPORTED_MODULE_2__thf_page_util_thf_page_util__["b" /* hasAction */]; - _this.parentContext = viewRef['_view']['component']; - return _this; - } - /** - * @return {?} - */ - ThfPageDetailComponent.prototype.hasAnyAction = /** - * @return {?} - */ - function () { - return this.hasActionFn('back', this.parentContext) || - this.hasActionFn('edit', this.parentContext) || - this.hasActionFn('remove', this.parentContext); - }; - ThfPageDetailComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-page-detail', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfPageDetailComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - ]; }; - return ThfPageDetailComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_page_detail_base_component__["a" /* ThfPageDetailBaseComponent */])); - -function ThfPageDetailComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfPageDetailComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfPageDetailComponent.ctorParameters; - /** @type {?} */ - ThfPageDetailComponent.prototype.callActionFn; - /** @type {?} */ - ThfPageDetailComponent.prototype.hasActionFn; - /** @type {?} */ - ThfPageDetailComponent.prototype.parentContext; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-edit/thf-page-edit-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageEditBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@description - * - * O componente **thf-page-edit** é utilizado como container principal para tela de edição ou adição de um - * registro. - * Por padrão possui 3 ações, cada ação na tela executa uma função no componente que está utilizando o thf-page-edit, - * são elas: - * - Cancelar (função: cancel); - * - Salvar e Novo (função: saveNew); - * - Salvar (função: save); - * - * Caso não estiver implementado alguma função, listado anteriormente, o mesmo não será apresentado. - * - * Os botões "Salvar" e "Salvar e Novo" podem ser habilitados/desabilitados utilizando a propriedade t-disable-submit. - * Esta propriedade pode ser utilizada para desabilitar os botões caso exista um formulário inválido na página ou alguma - * regra de negócio não tenha sido atendida. - */ -var ThfPageEditBaseComponent = /** @class */ (function () { - function ThfPageEditBaseComponent() { - } - ThfPageEditBaseComponent.propDecorators = { - "title": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-title',] },], - "disableSubmit": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disable-submit',] },], - }; - return ThfPageEditBaseComponent; -}()); - -function ThfPageEditBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfPageEditBaseComponent.propDecorators; - /** - * Título da página - * @type {?} - */ - ThfPageEditBaseComponent.prototype.title; - /** - * Desabilita botões de submissão (save e saveNew) - * @type {?} - */ - ThfPageEditBaseComponent.prototype.disableSubmit; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-edit/thf-page-edit.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageEditComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_page_edit_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-edit/thf-page-edit-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_page_util_thf_page_util__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-util/thf-page-util.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfPageEditBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfPageEditComponent = /** @class */ (function (_super) { - __extends(ThfPageEditComponent, _super); - function ThfPageEditComponent(viewRef) { - var _this = _super.call(this) || this; - _this.hasAction = __WEBPACK_IMPORTED_MODULE_2__thf_page_util_thf_page_util__["b" /* hasAction */]; - _this.callAction = __WEBPACK_IMPORTED_MODULE_2__thf_page_util_thf_page_util__["a" /* callAction */]; - _this.parentContext = viewRef['_view']['component']; - return _this; - } - /** - * @return {?} - */ - ThfPageEditComponent.prototype.hasAnyAction = /** - * @return {?} - */ - function () { - return Object(__WEBPACK_IMPORTED_MODULE_2__thf_page_util_thf_page_util__["b" /* hasAction */])('cancel', this.parentContext) || Object(__WEBPACK_IMPORTED_MODULE_2__thf_page_util_thf_page_util__["b" /* hasAction */])('saveNew', this.parentContext) || Object(__WEBPACK_IMPORTED_MODULE_2__thf_page_util_thf_page_util__["b" /* hasAction */])('save', this.parentContext); - }; - ThfPageEditComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-page-edit', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfPageEditComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - ]; }; - return ThfPageEditComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_page_edit_base_component__["a" /* ThfPageEditBaseComponent */])); - -function ThfPageEditComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfPageEditComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfPageEditComponent.ctorParameters; - /** @type {?} */ - ThfPageEditComponent.prototype.hasAction; - /** @type {?} */ - ThfPageEditComponent.prototype.callAction; - /** @type {?} */ - ThfPageEditComponent.prototype.parentContext; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-header/thf-page-header-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageHeaderBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * O componente **thf-page-header** é responsável pelo título da página e container dos botões de ações dos componentes - * thf-page-list e thf-page-base. - */ -var ThfPageHeaderBaseComponent = /** @class */ (function () { - function ThfPageHeaderBaseComponent() { - } - ThfPageHeaderBaseComponent.propDecorators = { - "title": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-title',] },], - }; - return ThfPageHeaderBaseComponent; -}()); - -function ThfPageHeaderBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfPageHeaderBaseComponent.propDecorators; - /** - * Título da página - * @type {?} - */ - ThfPageHeaderBaseComponent.prototype.title; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-header/thf-page-header.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageHeaderComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_page_header_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-header/thf-page-header-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsPrivate - * \@docsExtends ThfPageHeaderBaseComponent - */ -var ThfPageHeaderComponent = /** @class */ (function (_super) { - __extends(ThfPageHeaderComponent, _super); - function ThfPageHeaderComponent() { - return _super !== null && _super.apply(this, arguments) || this; - } - ThfPageHeaderComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-page-header', template: "
    {{title}}
    " - },] }, - ]; - /** @nocollapse */ - ThfPageHeaderComponent.ctorParameters = function () { return []; }; - return ThfPageHeaderComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_page_header_base_component__["a" /* ThfPageHeaderBaseComponent */])); - -function ThfPageHeaderComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfPageHeaderComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfPageHeaderComponent.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-list/thf-advanced-filter/thf-advanced-filter-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfAdvancedFilterBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * Filtro de busca avançada criado a partir de um formulário dinâmico. - * Componente de uso interno. - */ -var ThfAdvancedFilterBaseComponent = /** @class */ (function () { - function ThfAdvancedFilterBaseComponent() { - /** - * Coleção de objetos que implementam a interface ThfDynamicFormField, para definição dos campos que serão criados - * dinamicamente. - */ - this.fields = []; - /** - * Função que será disparada e receberá os valores do formulário ao ser clicado no botão buscar. - */ - this.searchEvent = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - // Retorna os models dos campos preenchidos - /** - * @param {?} fields - * @param {?} form - * @return {?} - */ - ThfAdvancedFilterBaseComponent.prototype.getValuesFromForm = /** - * @param {?} fields - * @param {?} form - * @return {?} - */ - function (fields, form) { - var /** @type {?} */ models = {}; - Object.keys(fields).forEach(function (key) { - var /** @type {?} */ property = fields[key]['property']; - var /** @type {?} */ value = form.get(property).value; - if (value || value === 0) { - models[property] = value; - } - }); - return models; - }; - ThfAdvancedFilterBaseComponent.propDecorators = { - "fields": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-fields',] },], - "searchEvent": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-search-event',] },], - }; - return ThfAdvancedFilterBaseComponent; -}()); - -function ThfAdvancedFilterBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfAdvancedFilterBaseComponent.propDecorators; - /** - * Coleção de objetos que implementam a interface ThfDynamicFormField, para definição dos campos que serão criados - * dinamicamente. - * @type {?} - */ - ThfAdvancedFilterBaseComponent.prototype.fields; - /** - * Função que será disparada e receberá os valores do formulário ao ser clicado no botão buscar. - * @type {?} - */ - ThfAdvancedFilterBaseComponent.prototype.searchEvent; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-list/thf-advanced-filter/thf-advanced-filter.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfAdvancedFilterComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_advanced_filter_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-list/thf-advanced-filter/thf-advanced-filter-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_dynamic_form_thf_dynamic_form_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_modal_thf_modal_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-modal/thf-modal.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsPrivate - * - * \@docsExtends ThfAdvancedFilterBaseComponent - * - * \@examplePrivate - * - * - * - * - * - */ -var ThfAdvancedFilterComponent = /** @class */ (function (_super) { - __extends(ThfAdvancedFilterComponent, _super); - function ThfAdvancedFilterComponent() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.primaryAction = { - action: function () { - var /** @type {?} */ models = _this.getValuesFromForm(_this.thfDynamicForm.fields, _this.thfDynamicForm.form); - _this.searchEvent.emit(models); - _this.thfModal.close(); - }, - label: 'Buscar' - }; - _this.secondaryAction = { - action: function () { - _this.thfModal.close(); - }, - label: 'Cancelar' - }; - return _this; - } - /** - * @return {?} - */ - ThfAdvancedFilterComponent.prototype.open = /** - * @return {?} - */ - function () { - this.thfModal.open(); - }; - ThfAdvancedFilterComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-advanced-filter', template: " " - },] }, - ]; - /** @nocollapse */ - ThfAdvancedFilterComponent.ctorParameters = function () { return []; }; - ThfAdvancedFilterComponent.propDecorators = { - "thfModal": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: [__WEBPACK_IMPORTED_MODULE_3__thf_modal_thf_modal_component__["a" /* ThfModalComponent */],] },], - "thfDynamicForm": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: [__WEBPACK_IMPORTED_MODULE_2__thf_dynamic_form_thf_dynamic_form_component__["a" /* ThfDynamicFormComponent */],] },], - }; - return ThfAdvancedFilterComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_advanced_filter_base_component__["a" /* ThfAdvancedFilterBaseComponent */])); - -function ThfAdvancedFilterComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfAdvancedFilterComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfAdvancedFilterComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfAdvancedFilterComponent.propDecorators; - /** @type {?} */ - ThfAdvancedFilterComponent.prototype.thfModal; - /** @type {?} */ - ThfAdvancedFilterComponent.prototype.thfDynamicForm; - /** @type {?} */ - ThfAdvancedFilterComponent.prototype.primaryAction; - /** @type {?} */ - ThfAdvancedFilterComponent.prototype.secondaryAction; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-list/thf-page-list-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageListBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_page_default_thf_page_default_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-default/thf-page-default-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@description - * - * O componente **thf-page-list** é utilizado como o container principal para as telas de listagem de dados, - * podendo ser apresentado como lista ou tabela. - * É possível também filtrar o conteúdo da lista e adicionar ações para a mesma. - * @abstract - */ -var ThfPageListBaseComponent = /** @class */ (function (_super) { - __extends(ThfPageListBaseComponent, _super); - function ThfPageListBaseComponent() { - return _super !== null && _super.apply(this, arguments) || this; - } - ThfPageListBaseComponent.propDecorators = { - "filter": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-filter',] },], - }; - return ThfPageListBaseComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_page_default_thf_page_default_base_component__["a" /* ThfPageDefaultBaseComponent */])); - -function ThfPageListBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfPageListBaseComponent.propDecorators; - /** - * Nesta propriedade deve ser definido um objeto que implementa a interface ThfPageFilter. - * @type {?} - */ - ThfPageListBaseComponent.prototype.filter; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-list/thf-page-list.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageListComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_page_list_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-list/thf-page-list-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsExtends ThfPageListBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfPageListComponent = /** @class */ (function (_super) { - __extends(ThfPageListComponent, _super); - function ThfPageListComponent(viewRef, renderer, router) { - var _this = _super.call(this) || this; - _this.renderer = renderer; - _this.router = router; - _this.limitPrimaryActions = 3; - _this.maxWidthMobile = 480; - _this.callFunction = __WEBPACK_IMPORTED_MODULE_2__utils_util__["a" /* callFunction */]; - _this.parentRef = viewRef['_view']['component']; - return _this; - } - /** - * @return {?} - */ - ThfPageListComponent.prototype.ngAfterContentInit = /** - * @return {?} - */ - function () { - var _this = this; - this.setIsMobile(); - this.setDropdownActions(); - this.renderer.listenGlobal('window', 'resize', function (event) { - _this.onResize(event); - }); - }; - /** - * @param {?} changes - * @return {?} - */ - ThfPageListComponent.prototype.ngOnChanges = /** - * @param {?} changes - * @return {?} - */ - function (changes) { - this.setDropdownActions(); - }; - /** - * @param {?} item - * @return {?} - */ - ThfPageListComponent.prototype.callAction = /** - * @param {?} item - * @return {?} - */ - function (item) { - if (item.url) { - this.router.navigate([item.url]); - } - else if (item.action) { - Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["a" /* callFunction */])(item.action, this.parentRef); - } - }; - /** - * @param {?} event - * @return {?} - */ - ThfPageListComponent.prototype.onResize = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ width = (/** @type {?} */ (event.target)).innerWidth; - if (width < this.maxWidthMobile) { - this.isMobile = true; - this.limitPrimaryActions = 2; - this.setDropdownActions(); - } - else { - this.isMobile = false; - this.limitPrimaryActions = 3; - this.setDropdownActions(); - } - }; - /** - * @return {?} - */ - ThfPageListComponent.prototype.setIsMobile = /** - * @return {?} - */ - function () { - if (window.innerWidth < this.maxWidthMobile) { - this.isMobile = true; - this.limitPrimaryActions = 2; - } - }; - /** - * @return {?} - */ - ThfPageListComponent.prototype.setDropdownActions = /** - * @return {?} - */ - function () { - if (this.actions.length > this.limitPrimaryActions) { - this.dropdownActions = this.actions.slice(this.limitPrimaryActions - 1); - } - }; - /** - * @param {?} field - * @return {?} - */ - ThfPageListComponent.prototype.callActionFilter = /** - * @param {?} field - * @return {?} - */ - function (field) { - this.callFunction(this.filter[field], this.parentRef); - }; - /** - * @param {?} key - * @return {?} - */ - ThfPageListComponent.prototype.onkeypress = /** - * @param {?} key - * @return {?} - */ - function (key) { - if (key === 13) { - this.callActionFilter('action'); - } - }; - /** - * @param {?} newModel - * @return {?} - */ - ThfPageListComponent.prototype.changeModel = /** - * @param {?} newModel - * @return {?} - */ - function (newModel) { - this.parentRef[this.filter.ngModel] = newModel; - }; - ThfPageListComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-page-list', template: "
    limitPrimaryActions\" t-label=\"Outras ações\" [t-actions]=\"dropdownActions\">
    " - },] }, - ]; - /** @nocollapse */ - ThfPageListComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["W" /* Renderer */], }, - { type: __WEBPACK_IMPORTED_MODULE_1__angular_router__["b" /* Router */], }, - ]; }; - return ThfPageListComponent; -}(__WEBPACK_IMPORTED_MODULE_3__thf_page_list_base_component__["a" /* ThfPageListBaseComponent */])); - -function ThfPageListComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfPageListComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfPageListComponent.ctorParameters; - /** @type {?} */ - ThfPageListComponent.prototype.limitPrimaryActions; - /** @type {?} */ - ThfPageListComponent.prototype.dropdownActions; - /** @type {?} */ - ThfPageListComponent.prototype.isMobile; - /** @type {?} */ - ThfPageListComponent.prototype.maxWidthMobile; - /** @type {?} */ - ThfPageListComponent.prototype.parentRef; - /** @type {?} */ - ThfPageListComponent.prototype.callFunction; - /** @type {?} */ - ThfPageListComponent.prototype.renderer; - /** @type {?} */ - ThfPageListComponent.prototype.router; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-login/thf-page-login-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export thfPageLoginLocales */ -/* unused harmony export thfPageLoginLocaleDefault */ -/* unused harmony export thfPageLoginLiteralsDefault */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageLoginBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -var __assign = (this && this.__assign) || Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; -}; -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -var /** @type {?} */ thfPageLoginLocales = ['pt', 'en', 'es']; -var /** @type {?} */ thfPageLoginLocaleDefault = 'pt'; -var /** @type {?} */ thfPageLoginLiteralsDefault = { - en: /** @type {?} */ ({ - title: 'Welcome', - loginErrorPattern: 'Invalid Login', - loginPlaceholder: 'Insert your e-mail', - passwordErrorPattern: 'Invalid Password', - passwordPlaceholder: 'Insert your password', - rememberUser: 'Remember User', - submitLabel: 'Enter', - forgotPassword: 'Forgot your Password?', - highlightInfo: '' - }), - es: /** @type {?} */ ({ - title: 'Sea bienvenido', - loginErrorPattern: 'Login inválido', - loginPlaceholder: 'Inserte su e-mail', - passwordErrorPattern: 'Contraseña inválida', - passwordPlaceholder: 'Inserte su contraseña', - rememberUser: 'Recordar usuario', - submitLabel: 'Entrar', - forgotPassword: 'Olvidaste tu contraseña?', - highlightInfo: '' - }), - pt: /** @type {?} */ ({ - title: 'Seja bem-vindo', - loginErrorPattern: 'Login inválido', - loginPlaceholder: 'Insira seu e-mail', - passwordErrorPattern: 'Senha inválida', - passwordPlaceholder: 'Insira sua senha', - rememberUser: 'Lembrar usuário', - submitLabel: 'Entrar', - forgotPassword: 'Esqueceu sua senha?', - highlightInfo: '' - }) -}; -/** - * \@description - * - * O componente `thf-page-login` é utilizado como template para tela de login. - * Com ele é possível definirmos valores para usuário, senha e definir ações para recuperação de senha e gravação de dados do usuário. - * O template conta também com a possibilidade de inserção de imagem com conjunto com um texto de destaque. - */ -var ThfPageLoginBaseComponent = /** @class */ (function () { - function ThfPageLoginBaseComponent(router) { - this.router = router; - this._hideRememberUser = false; - this._title = 'Seja bem-vindo'; - this.rememberUser = false; - // properties for model (two-way-databinding) - this.loginChange = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Evento disparado ao submeter o formulário de login (apertando `Enter` dentro dos campos ou pressionando o botão de confirmação). - * - * Esse evento receberá como parâmetro um objeto do tipo `ThfPageLogin` com os dados informados no formulário. - * - * > Para mais detalhes consulte a documentação sobre a interface `ThfPageLogin` mais abaixo. - */ - this.loginSubmit = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - Object.defineProperty(ThfPageLoginBaseComponent.prototype, "hideRememberUser", { - get: /** - * @return {?} - */ - function () { - return this._hideRememberUser; - }, - set: /** - * \@optional - * - * \@description - * - * Esconde a função "Lembrar usuário" do formulário de login. - * - * Quando essa propriedade é setada com `true` a propriedade `rememberUser` enviada no evento `t-login-submit` será sempre - * `false`. - * - * > Veja a propriedade `t-literals` para customizar a literal `rememberUser`. - * - * \@default `false` - * @param {?} value - * @return {?} - */ - function (value) { - this._hideRememberUser = /** @type {?} */ (value) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(value); - if (this._hideRememberUser) { - this.rememberUser = false; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfPageLoginBaseComponent.prototype, "literals", { - get: /** - * @return {?} - */ - function () { - return this._literals || thfPageLoginLiteralsDefault[this.browserLanguage()]; - }, - set: /** - * \@optional - * - * \@description - * - * Objeto com as literais usadas no `thf-page-login`. - * - * Existem 2 maneiras de customizar o componente, passando um objeto com todas as literais disponíveis: - * - * ``` - * const customLiterals: ThfPageLoginLiterals = { - * title: 'Seja bem-vindo', - * loginErrorPattern: 'Login obrigatório', - * loginPlaceholder: 'Insira seu usuário de acesso', - * passwordErrorPattern: 'Senha obrigatória', - * passwordPlaceholder: 'Insira sua senha de acesso' - * rememberUser: 'Lembrar usuário', - * submitLabel: 'Acessar sistema' - * forgotPassword: 'Esqueceu sua senha?' - * }; - * ``` - * - * Ou passando apenas as literais que deseja customizar: - * - * ``` - * const customLiterals: ThfPageLoginLiterals = { - * loginPlaceholder: 'Insira seu usuário de acesso', - * passwordPlaceholder: 'Insira sua senha de acesso' - * submitLabel: 'Acessar sistema' - * }; - * ``` - * - * E para carregar as literais customizadas, basta apenas passar o objeto para o componente. - * - * ``` - * - * - * ``` - * - * > O objeto padrão de literais será traduzido de acordo com o idioma do browser (pt, en, es). - * @param {?} value - * @return {?} - */ - function (value) { - if (value instanceof Object && !(value instanceof Array)) { - this._literals = __assign({}, thfPageLoginLiteralsDefault[thfPageLoginLocaleDefault], thfPageLoginLiteralsDefault[this.browserLanguage()], value); - } - else { - this._literals = thfPageLoginLiteralsDefault[this.browserLanguage()]; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfPageLoginBaseComponent.prototype, "login", { - get: /** - * @return {?} - */ - function () { - return this._login; - }, - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - this._login = value; - this.loginChange.emit(this._login); - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfPageLoginBaseComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - this.greetingMessage = this.initGreetingMessage(); - }; - /** - * @return {?} - */ - ThfPageLoginBaseComponent.prototype.onLoginSubmit = /** - * @return {?} - */ - function () { - var /** @type {?} */ loginForm = { - login: this.login, - password: this.password, - rememberUser: this.rememberUser - }; - this.loginSubmit.emit(loginForm); - }; - /** - * @return {?} - */ - ThfPageLoginBaseComponent.prototype.onForgotPassword = /** - * @return {?} - */ - function () { - var /** @type {?} */ regexUrl = /(http(s?))\:\/\//gi; - if (regexUrl.test(this.recoveryUrl)) { - window.open(this.recoveryUrl, '_blank'); - } - else { - this.router.navigate([this.recoveryUrl]); - } - }; - /** - * @return {?} - */ - ThfPageLoginBaseComponent.prototype.initGreetingMessage = /** - * @return {?} - */ - function () { - var /** @type {?} */ locale = this.browserLanguage(); - var /** @type {?} */ greet = { - pt: { - morning: 'Bom dia', - afternoom: 'Boa tarde', - evening: 'Boa noite' - }, - en: { - morning: 'Good morning', - afternoom: 'Good afternoon', - evening: 'Good evening' - }, - es: { - morning: 'Buen día', - afternoom: 'Buenas tardes', - evening: 'Buenas noches' - } - }; - var /** @type {?} */ hour = (new Date()).getHours(); - if (hour < 12) { - return greet[locale].morning; - } - else if (hour < 18) { - return greet[locale].afternoom; - } - else { - return greet[locale].evening; - } - }; - /** - * @return {?} - */ - ThfPageLoginBaseComponent.prototype.browserLanguage = /** - * @return {?} - */ - function () { - var /** @type {?} */ language = navigator.language.toLowerCase().substring(0, 2); - if (!thfPageLoginLocales.includes(language)) { - return thfPageLoginLocaleDefault; - } - return language; - }; - ThfPageLoginBaseComponent.propDecorators = { - "background": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-background',] },], - "hideRememberUser": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-hide-remember-user',] },], - "literals": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-literals',] },], - "loginChange": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-loginChange',] },], - "login": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-login',] },], - "loginPattern": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-login-pattern',] },], - "passwordPattern": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-password-pattern',] },], - "recoveryUrl": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-recovery-url',] },], - "loginSubmit": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-login-submit',] },], - }; - return ThfPageLoginBaseComponent; -}()); - -function ThfPageLoginBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfPageLoginBaseComponent.propDecorators; - /** @type {?} */ - ThfPageLoginBaseComponent.prototype._literals; - /** @type {?} */ - ThfPageLoginBaseComponent.prototype._login; - /** @type {?} */ - ThfPageLoginBaseComponent.prototype._hideRememberUser; - /** @type {?} */ - ThfPageLoginBaseComponent.prototype._title; - /** @type {?} */ - ThfPageLoginBaseComponent.prototype.greetingMessage; - /** @type {?} */ - ThfPageLoginBaseComponent.prototype.password; - /** @type {?} */ - ThfPageLoginBaseComponent.prototype.rememberUser; - /** - * O `thf-page-login` permite inserir uma imagem de destaque ao lado direito do formulário de login, caso a propriedade - * não seja preenchida o formulário será centralizado no espaço disponível. - * - * A fonte da imagem pode ser de um caminho local ou uma url de um servidor externo. - * - * Além da imagem, é possível adicionar um texto informativo por cima da imagem da imagem de destaque, para isso informe - * um valor para a literal `highlightInfo`. - * - * > Veja mais sobre as literais na propriedade `t-literals`. - * - * Exemplos de valores válidos: - * - **local**: `./assets/images/login-background.png` - * - **url externa**: `https://thf.totvs.com.br/assets/images/login-background.png` - * - * > Essa propriedade é ignorada para aplicações mobile. - * @type {?} - */ - ThfPageLoginBaseComponent.prototype.background; - /** @type {?} */ - ThfPageLoginBaseComponent.prototype.loginChange; - /** - * \@optional - * - * \@description - * - * Expressão regular para validar o campo de login, caso a expressão não seja atentida, a literal `loginErrorPattern` - * será exibida. - * - * Exemplos de valores válidos: - * - email: `[expressao-regular-email]` - * - cpf: `[expressao-regular-cpf]` - * - * > Veja a propriedade `t-literals` para customizar a literal `loginErrorPattern`. - * @type {?} - */ - ThfPageLoginBaseComponent.prototype.loginPattern; - /** - * \@optional - * - * \@description - * - * Expressão regular para validar o campo de password, caso a expressão não seja atentida, a literal `passwordErrorPattern` - * será exibida. - * - * Exemplos de valores válidos: - * - Apenas números: `\d?` - * - Letras mínusculas: `\z?` - * - * > Veja a propriedade `t-literals` para customizar a literal `passwordErrorPattern`. - * @type {?} - */ - ThfPageLoginBaseComponent.prototype.passwordPattern; - /** - * Caso a aplicação tenha um link de recuperação de login ou senha, informe uma url externa ou uma rota válida, dessa - * forma será exibido um link abaixo do formulário de login para os usuários da aplicação fazerem a recuperação dos dados - * de autenticação. - * - * > Veja a propriedade `t-literals` para customizar a literal `forgotPassword`. - * @type {?} - */ - ThfPageLoginBaseComponent.prototype.recoveryUrl; - /** - * Evento disparado ao submeter o formulário de login (apertando `Enter` dentro dos campos ou pressionando o botão de confirmação). - * - * Esse evento receberá como parâmetro um objeto do tipo `ThfPageLogin` com os dados informados no formulário. - * - * > Para mais detalhes consulte a documentação sobre a interface `ThfPageLogin` mais abaixo. - * @type {?} - */ - ThfPageLoginBaseComponent.prototype.loginSubmit; - /** @type {?} */ - ThfPageLoginBaseComponent.prototype.router; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-login/thf-page-login.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageLoginComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_page_login_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-login/thf-page-login-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfPageLoginBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfPageLoginComponent = /** @class */ (function (_super) { - __extends(ThfPageLoginComponent, _super); - function ThfPageLoginComponent(router) { - return _super.call(this, router) || this; - } - ThfPageLoginComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-page-login', template: " " - },] }, - ]; - /** @nocollapse */ - ThfPageLoginComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_router__["b" /* Router */], }, - ]; }; - return ThfPageLoginComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_page_login_base_component__["a" /* ThfPageLoginBaseComponent */])); - -function ThfPageLoginComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfPageLoginComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfPageLoginComponent.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page-util/thf-page-util.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["b"] = hasAction; -/* harmony export (immutable) */ __webpack_exports__["a"] = callAction; -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** - * \@description Verifica se existe a função dentro do contexto. - * - * @param {?} action Nome da função que será verificada a existência no parentContext. - * - * @param {?} parentContext Contexto da qual a função será verificada. - * @return {?} - */ -function hasAction(action, parentContext) { - return parentContext && parentContext[action]; -} -/** - * \@description Executa a função cujo o nome foi passado por parâmetro. - * - * @param {?} action Nome da função que será executada no parentContext. - * - * @param {?} parentContext Contexto da qual a função será executada. - * @return {?} - */ -function callAction(action, parentContext) { - if (hasAction(action, parentContext)) { - parentContext[action](); - } -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_page_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsPrivate - * - * \@docsExtends ThfPageBaseComponent - */ -var ThfPageComponent = /** @class */ (function (_super) { - __extends(ThfPageComponent, _super); - function ThfPageComponent() { - return _super !== null && _super.apply(this, arguments) || this; - } - ThfPageComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-page', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfPageComponent.ctorParameters = function () { return []; }; - return ThfPageComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_page_base_component__["a" /* ThfPageBaseComponent */])); - -function ThfPageComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfPageComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfPageComponent.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-page/thf-page.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPageModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_field_thf_field_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-field/thf-field.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__thf_button_thf_button_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button/thf-button.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__thf_dropdown_thf_dropdown_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-dropdown/thf-dropdown.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__thf_page_list_thf_advanced_filter_thf_advanced_filter_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-list/thf-advanced-filter/thf-advanced-filter.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__thf_dynamic_form_thf_dynamic_form_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-dynamic-form/thf-dynamic-form.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__thf_modal_thf_modal_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-modal/thf-modal.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__thf_page_default_thf_page_default_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-default/thf-page-default.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__thf_page_content_thf_page_content_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-content/thf-page-content.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__thf_page_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__thf_page_edit_thf_page_edit_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-edit/thf-page-edit.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__thf_page_detail_thf_page_detail_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-detail/thf-page-detail.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__thf_page_header_thf_page_header_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-header/thf-page-header.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__thf_page_list_thf_page_list_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-list/thf-page-list.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__thf_page_login_thf_page_login_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-page/thf-page-login/thf-page-login.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - - - - - - - - - - - - - -/** - * \@description - * Módulo dos componentes thf-page-default, thf-page-edit, thf-page-list, thf-page-login e thf-page-detail - */ -var ThfPageModule = /** @class */ (function () { - function ThfPageModule() { - } - ThfPageModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_0__angular_common__["b" /* CommonModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_forms__["d" /* FormsModule */], - __WEBPACK_IMPORTED_MODULE_3__angular_router__["c" /* RouterModule */], - __WEBPACK_IMPORTED_MODULE_5__thf_button_thf_button_module__["a" /* ThfButtonModule */], - __WEBPACK_IMPORTED_MODULE_8__thf_dynamic_form_thf_dynamic_form_module__["a" /* ThfDynamicFormModule */], - __WEBPACK_IMPORTED_MODULE_6__thf_dropdown_thf_dropdown_module__["a" /* ThfDropdownModule */], - __WEBPACK_IMPORTED_MODULE_4__thf_field_thf_field_module__["a" /* ThfFieldModule */], - __WEBPACK_IMPORTED_MODULE_9__thf_modal_thf_modal_module__["a" /* ThfModalModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_7__thf_page_list_thf_advanced_filter_thf_advanced_filter_component__["a" /* ThfAdvancedFilterComponent */], - __WEBPACK_IMPORTED_MODULE_11__thf_page_content_thf_page_content_component__["a" /* ThfPageContentComponent */], - __WEBPACK_IMPORTED_MODULE_12__thf_page_component__["a" /* ThfPageComponent */], - __WEBPACK_IMPORTED_MODULE_10__thf_page_default_thf_page_default_component__["a" /* ThfPageDefaultComponent */], - __WEBPACK_IMPORTED_MODULE_14__thf_page_detail_thf_page_detail_component__["a" /* ThfPageDetailComponent */], - __WEBPACK_IMPORTED_MODULE_13__thf_page_edit_thf_page_edit_component__["a" /* ThfPageEditComponent */], - __WEBPACK_IMPORTED_MODULE_15__thf_page_header_thf_page_header_component__["a" /* ThfPageHeaderComponent */], - __WEBPACK_IMPORTED_MODULE_16__thf_page_list_thf_page_list_component__["a" /* ThfPageListComponent */], - __WEBPACK_IMPORTED_MODULE_17__thf_page_login_thf_page_login_component__["a" /* ThfPageLoginComponent */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_7__thf_page_list_thf_advanced_filter_thf_advanced_filter_component__["a" /* ThfAdvancedFilterComponent */], - __WEBPACK_IMPORTED_MODULE_14__thf_page_detail_thf_page_detail_component__["a" /* ThfPageDetailComponent */], - __WEBPACK_IMPORTED_MODULE_10__thf_page_default_thf_page_default_component__["a" /* ThfPageDefaultComponent */], - __WEBPACK_IMPORTED_MODULE_13__thf_page_edit_thf_page_edit_component__["a" /* ThfPageEditComponent */], - __WEBPACK_IMPORTED_MODULE_16__thf_page_list_thf_page_list_component__["a" /* ThfPageListComponent */], - __WEBPACK_IMPORTED_MODULE_17__thf_page_login_thf_page_login_component__["a" /* ThfPageLoginComponent */] - ] - },] }, - ]; - /** @nocollapse */ - ThfPageModule.ctorParameters = function () { return []; }; - return ThfPageModule; -}()); - -function ThfPageModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfPageModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfPageModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-popover/thf-popover-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPopoverBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__services_thf_control_position_thf_control_position_constants__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-control-position/thf-control-position.constants.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -var /** @type {?} */ THF_POPOVER_DEFAULT_POSITION = 'right'; -var /** @type {?} */ THF_POPOVER_TRIGGERS = ['click', 'hover']; -var /** @type {?} */ THF_POPOVER_DEFAULT_TRIGGER = 'click'; -/** - * \@description - * - * O componente thf-popover é um container pequeno recomendado para incluir vários tipos de conteúdo como: - * gráficos, textos, imagens e inputs. Ele abre sobreposto aos outros componentes. - * - * Para mostrar apenas pequenos textos recomenda-se o uso da diretiva - * [**thf-tooltip**](https://thf.totvs.com.br/documentation/thf-tooltip?view=doc). - * - * Para conteúdos maiores recomenda-se o uso do [**thf-modal**](https://thf.totvs.com.br/documentation/thf-modal?view=doc). - * - * Ele contém um título e também é possível escolher as posições do popover em relação ao componente pai, - * as posições permitidas são: `right`, `right-top`, `right-bottom`, `top`, `top-left`, `top-right`, - * `left`, `left-top`, `left-bottom`, `bottom`, `bottom-left` e `bottom-right`. - * - * Também é possível escolher entre os dois eventos que podem abrir o popover. - * Os eventos permitidos são: `click` e `hover`. - * - */ -var ThfPopoverBaseComponent = /** @class */ (function () { - function ThfPopoverBaseComponent() { - // Controla se o popover fica oculto ou visível, por padrão é oculto. - this.isHidden = true; - this._trigger = THF_POPOVER_DEFAULT_TRIGGER; - this._position = THF_POPOVER_DEFAULT_POSITION; - } - Object.defineProperty(ThfPopoverBaseComponent.prototype, "trigger", { - get: /** - * @return {?} - */ - function () { - return this._trigger; - }, - set: /** - * \@description - * - * Define o evento que abrirá o thf-popover. - * - * Valores válidos: - * - `click`: Abre ao clicar no componente alvo. - * - `hover`: Abre ao passar o mouse sobre o componente alvo. - * - * \@default click - * \@optional - * @param {?} value - * @return {?} - */ - function (value) { - this._trigger = THF_POPOVER_TRIGGERS.includes(value) ? value : THF_POPOVER_DEFAULT_TRIGGER; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfPopoverBaseComponent.prototype, "position", { - get: /** - * @return {?} - */ - function () { - return this._position; - }, - set: /** - * \@optional - * - * \@description - * - * Define a posição que o thf-popover abrirá em relação ao componente alvo. Sugere-se que seja - * usada a orientação "right" (direita), porém o mesmo é flexível e será rotacionado - * automaticamente para se adequar a tela, caso necessário. - * - * Posições válidas: - * - `right`: Posiciona o thf-popover no lado direito do componente alvo. - * - `right-bottom`: Posiciona o thf-popover no lado direito inferior do componente alvo. - * - `right-top`: Posiciona o thf-popover no lado direito superior do componente alvo. - * - `bottom`: Posiciona o thf-popover abaixo do componente alvo. - * - `bottom-left`: Posiciona o thf-popover abaixo e à esquerda do componente alvo. - * - `bottom-right`: Posiciona o thf-popover abaixo e à direita do componente alvo. - * - `left`: Posiciona o thf-popover no lado esquerdo do componente alvo. - * - `left-top`: Posiciona o thf-popover no lado esquerdo superior do componente alvo. - * - `left-bottom`: Posiciona o thf-popover no lado esquerdo inferior do componente alvo. - * - `top`: Posiciona o thf-popover acima do componente alvo. - * - `top-right`: Posiciona o thf-popover acima e à direita do componente alvo. - * - `top-left`: Posiciona o thf-popover acima e à esquerda do componente alvo. - * - * - * \@default right - * @param {?} value - * @return {?} - */ - function (value) { - this._position = __WEBPACK_IMPORTED_MODULE_1__services_thf_control_position_thf_control_position_constants__["a" /* THF_CONTROL_POSITIONS */].includes(value) ? value : THF_POPOVER_DEFAULT_POSITION; - }, - enumerable: true, - configurable: true - }); - ThfPopoverBaseComponent.propDecorators = { - "title": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-title',] },], - "target": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-target',] },], - "trigger": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-trigger',] },], - "position": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-position',] },], - }; - return ThfPopoverBaseComponent; -}()); - -function ThfPopoverBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfPopoverBaseComponent.propDecorators; - /** @type {?} */ - ThfPopoverBaseComponent.prototype.isHidden; - /** @type {?} */ - ThfPopoverBaseComponent.prototype._trigger; - /** @type {?} */ - ThfPopoverBaseComponent.prototype._position; - /** - * Título do popover. - * @type {?} - */ - ThfPopoverBaseComponent.prototype.title; - /** - * \@description - * - * ElementRef do componente de origem responsável por abrir o popover. - * Para utilizar o thf-popover deve-se colocar uma variável no componente que vai disparar o evento - * de abertura, exemplo: - * - * ``` - * - * - * - * - * - * ``` - * - * Também deve-se criar um ViewChild para cada popover, passando como referência o elemento do - * HTML que irá disparar o evento. Exemplo: - * - * ``` - * \@ViewChild(ThfButtonComponent, {read: ElementRef}) thfButton: ThfButtonComponent; - * ``` - * - * @type {?} - */ - ThfPopoverBaseComponent.prototype.target; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-popover/thf-popover.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPopoverComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__services_thf_control_position_thf_control_position_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-control-position/thf-control-position.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_popover_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-popover/thf-popover-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * - * \@docsExtends ThfPopoverBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfPopoverComponent = /** @class */ (function (_super) { - __extends(ThfPopoverComponent, _super); - function ThfPopoverComponent(renderer, thfControlPosition) { - var _this = _super.call(this) || this; - _this.renderer = renderer; - _this.thfControlPosition = thfControlPosition; - _this.arrowDirection = 'left'; - return _this; - } - /** - * @return {?} - */ - ThfPopoverComponent.prototype.ngAfterViewInit = /** - * @return {?} - */ - function () { - this.initEventListenerFunction(); - var /** @type {?} */ popoverOffset = 8; - this.thfControlPosition.setElements(this.popoverElement.nativeElement, popoverOffset, this.target); - this.setRendererListenInit(); - }; - /** - * @return {?} - */ - ThfPopoverComponent.prototype.close = /** - * @return {?} - */ - function () { - this.isHidden = true; - this.removeScrollEventListener(); - }; - /** - * @return {?} - */ - ThfPopoverComponent.prototype.debounceResize = /** - * @return {?} - */ - function () { - var _this = this; - clearTimeout(this.timeoutResize); - this.timeoutResize = setTimeout(function () { - _this.setPopoverPosition(); - }, 200); - }; - /** - * @return {?} - */ - ThfPopoverComponent.prototype.open = /** - * @return {?} - */ - function () { - var _this = this; - this.addScrollEventListener(); - this.isHidden = false; - this.setOpacity(0); - setTimeout(function () { - _this.thfControlPosition.adjustPosition(_this.position); - _this.arrowDirection = _this.thfControlPosition.getArrowDirection(); - _this.setOpacity(1); - }); - }; - /** - * @param {?} value - * @return {?} - */ - ThfPopoverComponent.prototype.setOpacity = /** - * @param {?} value - * @return {?} - */ - function (value) { - this.popoverElement.nativeElement.style.opacity = value; - }; - /** - * @return {?} - */ - ThfPopoverComponent.prototype.setPopoverPosition = /** - * @return {?} - */ - function () { - this.thfControlPosition.adjustPosition(this.position); - this.arrowDirection = this.thfControlPosition.getArrowDirection(); - }; - /** - * @return {?} - */ - ThfPopoverComponent.prototype.setRendererListenInit = /** - * @return {?} - */ - function () { - var _this = this; - this.renderer.listen('window', 'resize', function (event) { - if (!_this.isHidden) { - _this.debounceResize(); - } - }); - if (this.trigger === 'hover') { - this.renderer.listen(this.target.nativeElement, 'mouseenter', function (event) { - _this.open(); - }); - this.renderer.listen(this.target.nativeElement, 'mouseleave', function (event) { - _this.close(); - }); - } - else { - this.renderer.listen('document', 'click', function (event) { - _this.open(); - _this.togglePopup(event); - }); - } - }; - /** - * @param {?} event - * @return {?} - */ - ThfPopoverComponent.prototype.togglePopup = /** - * @param {?} event - * @return {?} - */ - function (event) { - if (!this.popoverElement.nativeElement.contains(event.target) && - !this.target.nativeElement.contains(event.target)) { - this.close(); - } - else if (this.target.nativeElement.contains(event.target)) { - this.popoverElement.nativeElement.hidden ? this.open() : this.close(); - } - }; - /** - * @return {?} - */ - ThfPopoverComponent.prototype.addScrollEventListener = /** - * @return {?} - */ - function () { - window.addEventListener('scroll', this.eventListenerFunction, true); - }; - /** - * @return {?} - */ - ThfPopoverComponent.prototype.initEventListenerFunction = /** - * @return {?} - */ - function () { - var _this = this; - this.eventListenerFunction = function () { - _this.setPopoverPosition(); - }; - }; - /** - * @return {?} - */ - ThfPopoverComponent.prototype.removeScrollEventListener = /** - * @return {?} - */ - function () { - window.removeEventListener('scroll', this.eventListenerFunction, true); - }; - ThfPopoverComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-popover', template: "
    {{ title }}
    ", - providers: [__WEBPACK_IMPORTED_MODULE_1__services_thf_control_position_thf_control_position_service__["a" /* ThfControlPositionService */]] - },] }, - ]; - /** @nocollapse */ - ThfPopoverComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["X" /* Renderer2 */], }, - { type: __WEBPACK_IMPORTED_MODULE_1__services_thf_control_position_thf_control_position_service__["a" /* ThfControlPositionService */], }, - ]; }; - ThfPopoverComponent.propDecorators = { - "popoverElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['popoverElement', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - }; - return ThfPopoverComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_popover_base_component__["a" /* ThfPopoverBaseComponent */])); - -function ThfPopoverComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfPopoverComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfPopoverComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfPopoverComponent.propDecorators; - /** @type {?} */ - ThfPopoverComponent.prototype.arrowDirection; - /** @type {?} */ - ThfPopoverComponent.prototype.timeoutResize; - /** @type {?} */ - ThfPopoverComponent.prototype.eventListenerFunction; - /** @type {?} */ - ThfPopoverComponent.prototype.popoverElement; - /** @type {?} */ - ThfPopoverComponent.prototype.renderer; - /** @type {?} */ - ThfPopoverComponent.prototype.thfControlPosition; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-popover/thf-popover.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPopoverModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_popover_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-popover/thf-popover.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * Módulo do componente thf-popover. - */ -var ThfPopoverModule = /** @class */ (function () { - function ThfPopoverModule() { - } - ThfPopoverModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_0__angular_common__["b" /* CommonModule */] - ], - declarations: [__WEBPACK_IMPORTED_MODULE_2__thf_popover_component__["a" /* ThfPopoverComponent */]], - exports: [__WEBPACK_IMPORTED_MODULE_2__thf_popover_component__["a" /* ThfPopoverComponent */]] - },] }, - ]; - /** @nocollapse */ - ThfPopoverModule.ctorParameters = function () { return []; }; - return ThfPopoverModule; -}()); - -function ThfPopoverModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfPopoverModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfPopoverModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-stepper/thf-stepper-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfStepperBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_stepper_status_enum__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-stepper/thf-stepper-status.enum.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -var /** @type {?} */ THF_STEPPER_MODES = ['horizontal', 'vertical']; -var /** @type {?} */ THF_STEPPER_MODE_DEFAULT = 'horizontal'; -/** - * \@description - * - * O `thf-stepper` permite que um processo seja dividido em passos para que o usuário o realize - * mais facilmente. - * - * Através dos modes, é possível identificar se o stepper será disposto horizontal ou verticalmente na tela - * - * ### Boas práticas - * - * - Evite `labels` extensos que quebram o layout do `thf-stepper`, use `labels` diretos, curtos e intuitivos. - * - Utilize apenas um `thf-stepper` por página. - */ -var ThfStepperBaseComponent = /** @class */ (function () { - function ThfStepperBaseComponent() { - this._barLeftTop = 'left'; - this._barRightBottom = 'right'; - this._mode = THF_STEPPER_MODE_DEFAULT; - this._sequential = true; - this._step = 1; - this._steps = []; - /** - * Ação que será executada quando o usuário mudar o passo do `thf-stepper`. - */ - this.onChangeStep = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - Object.defineProperty(ThfStepperBaseComponent.prototype, "mode", { - get: /** - * @return {?} - */ - function () { - return this._mode; - }, - set: /** - * \@optional - * - * \@description - * - * Define a disposição do `thf-stepper`. - * - * Valore válidos: - * - `horizontal`: estilo padrão do `thf-stepper`. - * - `vertical`: deixa o `thf-stepper` disposto verticalmente na página - * - * \@default `horizontal` - * - * @param {?} value - * @return {?} - */ - function (value) { - this._mode = THF_STEPPER_MODES.includes(value) ? value : THF_STEPPER_MODE_DEFAULT; - this.toggleBarClass(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfStepperBaseComponent.prototype, "step", { - get: /** - * @return {?} - */ - function () { - return this._step; - }, - set: /** - * \@optional - * - * \@description - * - * Controla o passo atual do `thf-stepper`. - * - * \@default `1` - * - * @param {?} step - * @return {?} - */ - function (step) { - if (step >= 1 && step <= this.steps.length) { - this._step = step; - this._steps[this._step - 1].status = __WEBPACK_IMPORTED_MODULE_1__thf_stepper_status_enum__["a" /* ThfStepperStatus */].Active; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfStepperBaseComponent.prototype, "steps", { - get: /** - * @return {?} - */ - function () { - return this._steps; - }, - set: /** - * Lista dos itens do stepper. Se o valor estiver indefinido ou inválido, será inicializado como um array vazio. - * @param {?} steps - * @return {?} - */ - function (steps) { - this._steps = Array.isArray(steps) ? steps : []; - this._steps.forEach(function (step) { return step.status = __WEBPACK_IMPORTED_MODULE_1__thf_stepper_status_enum__["a" /* ThfStepperStatus */].Default; }); - this.step = 1; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfStepperBaseComponent.prototype, "sequential", { - get: /** - * @return {?} - */ - function () { - return this._sequential; - }, - set: /** - * \@optional - * - * \@description - * - * Define se o `thf-stepper` será sequencial ou aleatório. - * - * \@default `true` - * - * @param {?} sequential - * @return {?} - */ - function (sequential) { - this._sequential = /** @type {?} */ (sequential) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_2__utils_util__["d" /* convertToBoolean */])(sequential); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfStepperBaseComponent.prototype, "barLeftTop", { - get: /** - * @return {?} - */ - function () { - return this._barLeftTop; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfStepperBaseComponent.prototype, "barRightBottom", { - get: /** - * @return {?} - */ - function () { - return this._barRightBottom; - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfStepperBaseComponent.prototype.toggleBarClass = /** - * @return {?} - */ - function () { - if (this._mode === THF_STEPPER_MODE_DEFAULT) { - this._barLeftTop = 'left'; - this._barRightBottom = 'right'; - } - else { - this._barLeftTop = 'top'; - this._barRightBottom = 'bottom'; - } - }; - ThfStepperBaseComponent.propDecorators = { - "mode": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-mode',] },], - "step": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-step',] },], - "steps": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-steps',] },], - "sequential": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-sequential',] },], - "onChangeStep": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-change-step',] },], - }; - return ThfStepperBaseComponent; -}()); - -function ThfStepperBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfStepperBaseComponent.propDecorators; - /** @type {?} */ - ThfStepperBaseComponent.prototype._barLeftTop; - /** @type {?} */ - ThfStepperBaseComponent.prototype._barRightBottom; - /** @type {?} */ - ThfStepperBaseComponent.prototype._mode; - /** @type {?} */ - ThfStepperBaseComponent.prototype._sequential; - /** @type {?} */ - ThfStepperBaseComponent.prototype._step; - /** @type {?} */ - ThfStepperBaseComponent.prototype._steps; - /** - * Ação que será executada quando o usuário mudar o passo do `thf-stepper`. - * @type {?} - */ - ThfStepperBaseComponent.prototype.onChangeStep; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-stepper/thf-stepper-status.enum.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfStepperStatus; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** @enum {string} */ -var ThfStepperStatus = { - /** Enum para informações do tipo Completo */ - Done: 'done', - /** Enum para informações do tipo Ativo */ - Active: 'active', - /** Enum para informações do tipo Padrão */ - Default: 'default', -}; - - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-stepper/thf-stepper.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfStepperComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_stepper_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-stepper/thf-stepper-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_stepper_status_enum__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-stepper/thf-stepper-status.enum.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfStepperBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfStepperComponent = /** @class */ (function (_super) { - __extends(ThfStepperComponent, _super); - function ThfStepperComponent() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * @param {?} stepNumber - * @return {?} - */ - ThfStepperComponent.prototype.changeStep = /** - * @param {?} stepNumber - * @return {?} - */ - function (stepNumber) { - if (stepNumber !== this.step && this.canJumpStep(stepNumber)) { - this.onChangeStep.emit(stepNumber); - } - }; - /** - * @param {?} stepNumber - * @return {?} - */ - ThfStepperComponent.prototype.canJumpStep = /** - * @param {?} stepNumber - * @return {?} - */ - function (stepNumber) { - if (!this.sequential) { - return true; - } - return this.steps.slice(this.step, stepNumber - 1) - .every(function (step) { return step.status === __WEBPACK_IMPORTED_MODULE_2__thf_stepper_status_enum__["a" /* ThfStepperStatus */].Done; }); - }; - ThfStepperComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-stepper', template: "
    {{i+1}}
    {{step.label}}
    " - },] }, - ]; - /** @nocollapse */ - ThfStepperComponent.ctorParameters = function () { return []; }; - return ThfStepperComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_stepper_base_component__["a" /* ThfStepperBaseComponent */])); - -function ThfStepperComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfStepperComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfStepperComponent.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-stepper/thf-stepper.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfStepperModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_stepper_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-stepper/thf-stepper.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * Módulo do componente thf-stepper - */ -var ThfStepperModule = /** @class */ (function () { - function ThfStepperModule() { - } - ThfStepperModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */], - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_2__thf_stepper_component__["a" /* ThfStepperComponent */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_2__thf_stepper_component__["a" /* ThfStepperComponent */] - ] - },] }, - ]; - /** @nocollapse */ - ThfStepperModule.ctorParameters = function () { return []; }; - return ThfStepperModule; -}()); - -function ThfStepperModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfStepperModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfStepperModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-table/thf-table-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTableBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -var /** @type {?} */ THF_TABLE_NO_DATA_DEFAULT = 'Nenhum dado encontrado.'; -/** - * \@description - * - * Este componente de tabela é utilizado para exibição de listas, com diferentes tipos de dados que podem ser textos, - * datas e números com formatos personalizados. - * - * É possivel criar uma tabela com ordenação de dados, linhas com detalhes (master-detail), coluna de seleção de linhas, - * coluna com ações e também carregamento por demanda com o botão "Carregar mais resultados". - * @abstract - */ -var ThfTableBaseComponent = /** @class */ (function () { - function ThfTableBaseComponent() { - this._actions = []; - this._hideDetail = false; - this._noData = THF_TABLE_NO_DATA_DEFAULT; - /** - * Recebe uma ação de clique para o botão "Carregar mais resultados", caso não seja definida uma ação, o botão - * não é visível. - */ - this.showMore = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */]; - this.selectAll = false; - this.sortedColumn = { column: /** @type {?} */ (null), ascending: true }; - } - Object.defineProperty(ThfTableBaseComponent.prototype, "items", { - get: /** - * @return {?} - */ - function () { - return this._items; - }, - set: /** - * Lista de itens da tabela. Se o valor estiver indefinido ou inválido, será inicializado como um array vazio. - * @param {?} items - * @return {?} - */ - function (items) { - this._items = Array.isArray(items) ? items : []; - // when haven't items, selectAll should be unchecked. - if (!this.hasItems()) { - this.selectAll = false; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTableBaseComponent.prototype, "columns", { - get: /** - * @return {?} - */ - function () { - return this._columns; - }, - set: /** - * Lista das colunas da tabela. - * Essa propriedade deve receber um array de objetos que implementam a interface ThfTableColumn. - * @param {?} columns - * @return {?} - */ - function (columns) { - this._columns = columns; - this.setColumnLink(); - this.calculateWidthHeaders(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTableBaseComponent.prototype, "height", { - get: /** - * @return {?} - */ - function () { - return this._height; - }, - set: /** - * \@optional - * - * \@description - * - * Define a altura da tabela em pixels e fixa o cabeçalho. - * @param {?} height - * @return {?} - */ - function (height) { - this._height = height; - this.calculateHeightTableContainer(height); - this.calculateWidthHeaders(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTableBaseComponent.prototype, "hideDetail", { - get: /** - * @return {?} - */ - function () { - return this._hideDetail; - }, - set: /** - * \@optional - * - * \@description - * - * Habilita a visualização da lista de detalhes de cada linha da coluna. - * - * \@default false - * @param {?} hideDetail - * @return {?} - */ - function (hideDetail) { - this._hideDetail = hideDetail != null && hideDetail.toString() === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(hideDetail); - this.calculateWidthHeaders(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTableBaseComponent.prototype, "checkbox", { - get: /** - * @return {?} - */ - function () { - return this._checkbox; - }, - set: /** - * \@optional - * - * \@description - * - * Habilita na primeira coluna a opção de selecionar linhas, - * todos os itens da lista possuem a propriedade dinâmica $selected para identificar se a linha está selecionada. - * > Exemplo: `item.$selected` ou `item['$selected']`. - * - * > Os itens filhos possuem comportamento independente do item pai. - * - * \@default false - * @param {?} checkbox - * @return {?} - */ - function (checkbox) { - this._checkbox = /** @type {?} */ (checkbox) === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(checkbox); - this.calculateWidthHeaders(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTableBaseComponent.prototype, "actions", { - get: /** - * @return {?} - */ - function () { - return this._actions; - }, - set: /** - * \@optional - * - * \@description - * - * Lista de ações exibidas no menu que aparece ao clicar na coluna de ações de cada linha. - * Essa propriedade deve receber um array de objetos que implementam a interface ThfColumnAction, caso o - * array esteja vazio a coluna será escondida. - * @param {?} actions - * @return {?} - */ - function (actions) { - this._actions = actions; - this.calculateWidthHeaders(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTableBaseComponent.prototype, "setSort", { - set: /** - * @param {?} sort - * @return {?} - */ - function (sort) { - this.sort = sort === '' ? false : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(sort); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTableBaseComponent.prototype, "setShowMoreDisabled", { - set: /** - * @param {?} showMoreDisabled - * @return {?} - */ - function (showMoreDisabled) { - this.showMoreDisabled = showMoreDisabled === '' ? false : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(showMoreDisabled); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTableBaseComponent.prototype, "setStriped", { - set: /** - * @param {?} striped - * @return {?} - */ - function (striped) { - this.striped = striped === '' ? false : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(striped); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTableBaseComponent.prototype, "setHideSelectAll", { - set: /** - * @param {?} hideSelectAll - * @return {?} - */ - function (hideSelectAll) { - this.hideSelectAll = hideSelectAll === '' ? false : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(hideSelectAll); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTableBaseComponent.prototype, "setSingleSelect", { - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - this.singleSelect = value === '' ? true : Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(value); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTableBaseComponent.prototype, "noData", { - get: /** - * @return {?} - */ - function () { - return this._noData; - }, - set: /** - * \@optional - * - * \@description - * - * Texto que será apresentado quando a tabela não houver dados. - * - * \@default "Nenhum dado encontrado." - * @param {?} value - * @return {?} - */ - function (value) { - this._noData = value || THF_TABLE_NO_DATA_DEFAULT; - }, - enumerable: true, - configurable: true - }); - /** - * @return {?} - */ - ThfTableBaseComponent.prototype.ngOnChanges = /** - * @return {?} - */ - function () { - if (this.singleSelect || this.hideSelectAll) { - this.selectAll = false; - this.hideSelectAll = true; - } - }; - /** - * @return {?} - */ - ThfTableBaseComponent.prototype.selectAllRows = /** - * @return {?} - */ - function () { - var _this = this; - if (!this.hideSelectAll) { - this.selectAll = !this.selectAll; - this.items.forEach(function (item) { - item.$selected = _this.selectAll; - }); - } - }; - /** - * @param {?} row - * @param {?=} isDetailRow - * @return {?} - */ - ThfTableBaseComponent.prototype.selectRow = /** - * @param {?} row - * @param {?=} isDetailRow - * @return {?} - */ - function (row, isDetailRow) { - if (isDetailRow === void 0) { isDetailRow = false; } - row.$selected = !row.$selected; - if (!isDetailRow) { - this.configAfterSelectRow(this.items, row); - } - }; - // Colunas que são inseridas no da tabela - /** - * @return {?} - */ - ThfTableBaseComponent.prototype.getMainColumns = /** - * @return {?} - */ - function () { - var /** @type {?} */ typesValid = ['string', 'number', 'date', 'currency', 'subtitle', 'link', 'label', 'icon']; - return this.columns.filter(function (col) { return !col.type || typesValid.includes(col.type); }); - }; - // Retorna a coluna da lista de colunas que é do tipo detail - /** - * @return {?} - */ - ThfTableBaseComponent.prototype.getColumnMasterDetail = /** - * @return {?} - */ - function () { - return this.columns.find(function (col) { return col.type === 'detail'; }); - }; - /** - * @param {?} row - * @param {?} column - * @return {?} - */ - ThfTableBaseComponent.prototype.getClassColor = /** - * @param {?} row - * @param {?} column - * @return {?} - */ - function (row, column) { - return column.color ? "thf-column-text-" + this.getColumnColor(row, column) : ''; - }; - // Retorna as colunas com status - /** - * @return {?} - */ - ThfTableBaseComponent.prototype.getSubtitleColumns = /** - * @return {?} - */ - function () { - return this.columns.filter(function (col) { return col.type === 'subtitle'; }); - }; - // Retorna as colunas com ícones - /** - * @return {?} - */ - ThfTableBaseComponent.prototype.getIconColumns = /** - * @return {?} - */ - function () { - return this.columns.filter(function (col) { return col.type === 'icon'; }); - }; - // Retorna o nome da coluna do tipo detail - /** - * @return {?} - */ - ThfTableBaseComponent.prototype.getNameColumnDetail = /** - * @return {?} - */ - function () { - var /** @type {?} */ detail = this.getColumnMasterDetail(); - return detail ? detail.column : null; - }; - /** - * @param {?} row - * @return {?} - */ - ThfTableBaseComponent.prototype.toggleRowAction = /** - * @param {?} row - * @return {?} - */ - function (row) { - var /** @type {?} */ toggleShowAction = row.$showAction; - this.items.forEach(function (item) { - if (item.$showAction) { - item.$showAction = false; - } - }); - row.$showAction = !toggleShowAction; - }; - /** - * @param {?} column - * @return {?} - */ - ThfTableBaseComponent.prototype.sortColumn = /** - * @param {?} column - * @return {?} - */ - function (column) { - if (!this.sort || column.type === 'detail') { - return; - } - this.sortedColumn.ascending = this.sortedColumn.column === column ? !this.sortedColumn.ascending : true; - this.sortArray(column, this.sortedColumn.ascending); - this.sortedColumn.column = column; - }; - /** - * @param {?} date - * @return {?} - */ - ThfTableBaseComponent.prototype.parseDate = /** - * @param {?} date - * @return {?} - */ - function (date) { - var /** @type {?} */ parts; - if (date.indexOf('-') >= 0) { - parts = date.split('-'); - return new Date(parts[0], parts[1] - 1, parts[2]); - } - else if (date.indexOf('/') >= 0) { - parts = date.split('/'); - return new Date(parts[2], parts[1] - 1, parts[0]); - } - else { - return null; - } - }; - /** - * @param {?} leftSide - * @param {?} rightSide - * @param {?} ascending - * @return {?} - */ - ThfTableBaseComponent.prototype.sortValidate = /** - * @param {?} leftSide - * @param {?} rightSide - * @param {?} ascending - * @return {?} - */ - function (leftSide, rightSide, ascending) { - if (ascending) { - if (leftSide < rightSide) { - return -1; - } - else if (leftSide > rightSide) { - return 1; - } - } - else { - if (leftSide < rightSide) { - return 1; - } - else if (leftSide > rightSide) { - return -1; - } - } - return 0; - }; - /** - * @param {?} column - * @param {?} ascending - * @return {?} - */ - ThfTableBaseComponent.prototype.sortArray = /** - * @param {?} column - * @param {?} ascending - * @return {?} - */ - function (column, ascending) { - var _this = this; - this.items.sort(function (leftSide, rightSide) { - if (column.type === 'date') { - var /** @type {?} */ leftSideDate = _this.parseDate(leftSide[column.column]); - var /** @type {?} */ rightSideDate = _this.parseDate(rightSide[column.column]); - var /** @type {?} */ leftSideMil = leftSideDate ? leftSideDate.getTime() : Number.NEGATIVE_INFINITY; - var /** @type {?} */ rightSideMil = rightSideDate ? rightSideDate.getTime() : Number.NEGATIVE_INFINITY; - return _this.sortValidate(leftSideMil, rightSideMil, ascending); - } - if (ascending) { - if (leftSide[column.column] < rightSide[column.column]) { - return -1; - } - else if (leftSide[column.column] > rightSide[column.column]) { - return 1; - } - } - else { - if (leftSide[column.column] < rightSide[column.column]) { - return 1; - } - else if (leftSide[column.column] > rightSide[column.column]) { - return -1; - } - } - return 0; - }); - }; - /** - * @return {?} - */ - ThfTableBaseComponent.prototype.onShowMore = /** - * @return {?} - */ - function () { - this.showMore.emit(null); - }; - /** - * @return {?} - */ - ThfTableBaseComponent.prototype.hasItems = /** - * @return {?} - */ - function () { - return this.items && this.items.length > 0; - }; - /** - * @param {?} rows - * @param {?} row - * @return {?} - */ - ThfTableBaseComponent.prototype.configAfterSelectRow = /** - * @param {?} rows - * @param {?} row - * @return {?} - */ - function (rows, row) { - if (this.singleSelect) { - this.unselectOtherRows(rows, row); - } - else if (!this.hideSelectAll) { - this.selectAll = this.isEverySelected(rows); - } - }; - /** - * @param {?} row - * @param {?} column - * @return {?} - */ - ThfTableBaseComponent.prototype.getColumnColor = /** - * @param {?} row - * @param {?} column - * @return {?} - */ - function (row, column) { - var /** @type {?} */ columnColor = column.color; - return Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["i" /* isTypeof */])(columnColor, 'string') ? columnColor : columnColor(row, column.column); - }; - /** - * @param {?} items - * @return {?} - */ - ThfTableBaseComponent.prototype.isEverySelected = /** - * @param {?} items - * @return {?} - */ - function (items) { - var /** @type {?} */ someCheckedOrIndeterminate = function (item) { return item.$selected || item.$selected === null; }; - var /** @type {?} */ everyChecked = function (item) { return item.$selected; }; - if (items.every(everyChecked)) { - return true; - } - if (items.some(someCheckedOrIndeterminate)) { - return null; - } - return false; - }; - /** - * @return {?} - */ - ThfTableBaseComponent.prototype.setColumnLink = /** - * @return {?} - */ - function () { - this.columns.forEach(function (column) { - if (column['type'] === 'link' && !column['link']) { - column['link'] = 'link'; - } - }); - }; - /** - * @param {?} rows - * @param {?} row - * @return {?} - */ - ThfTableBaseComponent.prototype.unselectOtherRows = /** - * @param {?} rows - * @param {?} row - * @return {?} - */ - function (rows, row) { - rows.forEach(function (item) { - if (item !== row) { - item.$selected = false; - } - }); - }; - ThfTableBaseComponent.propDecorators = { - "items": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-items',] },], - "columns": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-columns',] },], - "height": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-height',] },], - "hideDetail": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-hide-detail',] },], - "checkbox": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-checkbox',] },], - "actions": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-actions',] },], - "setSort": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-sort',] },], - "setShowMoreDisabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-show-more-disabled',] },], - "setStriped": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-striped',] },], - "setHideSelectAll": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-hide-select-all',] },], - "setSingleSelect": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-single-select',] },], - "noData": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-no-data',] },], - "showMore": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-show-more',] },], - }; - return ThfTableBaseComponent; -}()); - -function ThfTableBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfTableBaseComponent.propDecorators; - /** @type {?} */ - ThfTableBaseComponent.prototype._actions; - /** @type {?} */ - ThfTableBaseComponent.prototype._checkbox; - /** @type {?} */ - ThfTableBaseComponent.prototype._columns; - /** @type {?} */ - ThfTableBaseComponent.prototype._items; - /** @type {?} */ - ThfTableBaseComponent.prototype._hideDetail; - /** @type {?} */ - ThfTableBaseComponent.prototype._height; - /** @type {?} */ - ThfTableBaseComponent.prototype._noData; - /** - * Habilita em todas colunas a opção de ordenação de dados. - * @type {?} - */ - ThfTableBaseComponent.prototype.sort; - /** - * Habilita ou desabilita o botão "Carregar mais resultados". - * @type {?} - */ - ThfTableBaseComponent.prototype.showMoreDisabled; - /** - * Habilita ou desabilita o estilo listrado da tabela (striped). Por padrão vem desabilitado. Recomendado para tabelas - * com maior número de dados, facilitando a sua visualização na tabela. - * @type {?} - */ - ThfTableBaseComponent.prototype.striped; - /** - * Esconde o checkbox para seleção de todas as linhas, por padrão recebe o valor `false`. - * - * Sempre receberá `true` se a tabela permitir a seleção de apenas uma linha. - * @type {?} - */ - ThfTableBaseComponent.prototype.hideSelectAll; - /** - * Define que somente uma linha da tabela pode ser selecionada. - * - * > Esta definição não se aplica aos itens filhos, todos itens filhos poderão ser selecionados. - * @type {?} - */ - ThfTableBaseComponent.prototype.singleSelect; - /** - * Recebe uma ação de clique para o botão "Carregar mais resultados", caso não seja definida uma ação, o botão - * não é visível. - * @type {?} - */ - ThfTableBaseComponent.prototype.showMore; - /** @type {?} */ - ThfTableBaseComponent.prototype.selectAll; - /** @type {?} */ - ThfTableBaseComponent.prototype.sortedColumn; - /** - * @abstract - * @param {?} height - * @return {?} - */ - ThfTableBaseComponent.prototype.calculateHeightTableContainer = function (height) { }; - /** - * @abstract - * @return {?} - */ - ThfTableBaseComponent.prototype.calculateWidthHeaders = function () { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-table/thf-table-column-icon/thf-table-column-icon.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTableColumnIconComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * Componente responsável por exibir ícones nas colunas. - */ -var ThfTableColumnIconComponent = /** @class */ (function () { - function ThfTableColumnIconComponent() { - } - Object.defineProperty(ThfTableColumnIconComponent.prototype, "icons", { - get: /** - * @return {?} - */ - function () { - return this._icons; - }, - set: /** - * Lista de um ou mais ícones que serão exibidos em sua respectiva coluna. - * @param {?} value - * @return {?} - */ - function (value) { - this._icons = this.checkValueType(value); - }, - enumerable: true, - configurable: true - }); - /** - * @param {?} value - * @return {?} - */ - ThfTableColumnIconComponent.prototype.checkValueType = /** - * @param {?} value - * @return {?} - */ - function (value) { - if (value instanceof Array) { - return value; - } - if (value && typeof value === 'string') { - return [value]; - } - return []; - }; - ThfTableColumnIconComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-table-column-icon', template: " " - },] }, - ]; - /** @nocollapse */ - ThfTableColumnIconComponent.ctorParameters = function () { return []; }; - ThfTableColumnIconComponent.propDecorators = { - "icons": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-icons',] },], - }; - return ThfTableColumnIconComponent; -}()); - -function ThfTableColumnIconComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfTableColumnIconComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfTableColumnIconComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfTableColumnIconComponent.propDecorators; - /** @type {?} */ - ThfTableColumnIconComponent.prototype._icons; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-table/thf-table-column-label/thf-table-column-label.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTableColumnLabelComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * Componente para a criação da representação da legenda, em formato de texto . - */ -var ThfTableColumnLabelComponent = /** @class */ (function () { - function ThfTableColumnLabelComponent() { - } - ThfTableColumnLabelComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-table-column-label', template: " {{ value?.label }} " - },] }, - ]; - /** @nocollapse */ - ThfTableColumnLabelComponent.ctorParameters = function () { return []; }; - ThfTableColumnLabelComponent.propDecorators = { - "value": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-value',] },], - }; - return ThfTableColumnLabelComponent; -}()); - -function ThfTableColumnLabelComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfTableColumnLabelComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfTableColumnLabelComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfTableColumnLabelComponent.propDecorators; - /** - * Objeto com os dados do label - * @type {?} - */ - ThfTableColumnLabelComponent.prototype.value; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-table/thf-table-subtitle-circle/thf-table-subtitle-circle.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTableSubtitleCircleComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * Componente para a criação da representação da legenda, em formato de círculo. - */ -var ThfTableSubtitleCircleComponent = /** @class */ (function () { - function ThfTableSubtitleCircleComponent() { - // Esconde a tooltip - this.hideTitle = false; - } - ThfTableSubtitleCircleComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-table-subtitle-circle', template: " {{ subtitle?.content }} " - },] }, - ]; - /** @nocollapse */ - ThfTableSubtitleCircleComponent.ctorParameters = function () { return []; }; - ThfTableSubtitleCircleComponent.propDecorators = { - "subtitle": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-subtitle',] },], - "hideTitle": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-hide-title',] },], - }; - return ThfTableSubtitleCircleComponent; -}()); - -function ThfTableSubtitleCircleComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfTableSubtitleCircleComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfTableSubtitleCircleComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfTableSubtitleCircleComponent.propDecorators; - /** @type {?} */ - ThfTableSubtitleCircleComponent.prototype.subtitle; - /** @type {?} */ - ThfTableSubtitleCircleComponent.prototype.hideTitle; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-table/thf-table-subtitle-footer/thf-table-subtitle-footer.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTableSubtitleFooterComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * - * \@description - * - * Componente para a criação de um conjunto de legendas. - */ -var ThfTableSubtitleFooterComponent = /** @class */ (function () { - function ThfTableSubtitleFooterComponent() { - } - ThfTableSubtitleFooterComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-table-subtitle-footer', template: "
    {{ subtitle.label }}
    " - },] }, - ]; - /** @nocollapse */ - ThfTableSubtitleFooterComponent.ctorParameters = function () { return []; }; - ThfTableSubtitleFooterComponent.propDecorators = { - "subtitles": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-subtitles',] },], - }; - return ThfTableSubtitleFooterComponent; -}()); - -function ThfTableSubtitleFooterComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfTableSubtitleFooterComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfTableSubtitleFooterComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfTableSubtitleFooterComponent.propDecorators; - /** @type {?} */ - ThfTableSubtitleFooterComponent.prototype.subtitles; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-table/thf-table.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTableComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_thf_control_position_thf_control_position_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-control-position/thf-control-position.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_table_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-table/thf-table-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsExtends ThfTableBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfTableComponent = /** @class */ (function (_super) { - __extends(ThfTableComponent, _super); - function ThfTableComponent(differs, viewRef, renderer, changeDetector, element, router, thfControlPosition) { - var _this = _super.call(this) || this; - _this.changeDetector = changeDetector; - _this.element = element; - _this.router = router; - _this.thfControlPosition = thfControlPosition; - _this.tableOpacity = 0; - _this.initialized = false; - _this.visibleElement = false; - _this.parentRef = viewRef['_view']['component']; - _this.differ = differs.find([]).create(null); - renderer.listen('document', 'click', function (event) { - _this.wasClickedonAction(event); - }); - renderer.listen('window', 'resize', function (event) { - _this.debounceResize(); - }); - document.addEventListener('scroll', function () { - _this.closeDropdownActions(); - }, true); - return _this; - } - /** - * @return {?} - */ - ThfTableComponent.prototype.ngAfterViewInit = /** - * @return {?} - */ - function () { - this.initialized = true; - }; - /** - * @return {?} - */ - ThfTableComponent.prototype.ngDoCheck = /** - * @return {?} - */ - function () { - this.checkChangesItems(); - this.verifyCalculateHeightTableContainer(); - // Permite que os cabeçalhos sejam calculados na primeira vez que o componente torna-se visível, - // evitando com isso, problemas com Tabs ou Divs que iniciem escondidas. - if (this.element.nativeElement.offsetWidth && !this.visibleElement && this.initialized) { - this.debounceResize(); - this.visibleElement = true; - } - }; - /** - * @param {?} event - * @return {?} - */ - ThfTableComponent.prototype.wasClickedonAction = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ clickedOutIconAction = this.hasClikedIcon(event); - var /** @type {?} */ clickedOutAction = this.hasClikedDropdown(event); - if (clickedOutAction && clickedOutIconAction) { - this.closeDropdownActions(); - } - }; - /** - * @param {?} row - * @param {?} tableAction - * @return {?} - */ - ThfTableComponent.prototype.executeTableAction = /** - * @param {?} row - * @param {?} tableAction - * @return {?} - */ - function (row, tableAction) { - if (!row.disabled && !this.validateTableAction(row, tableAction)) { - if (typeof tableAction.action === 'string') { - this.parentRef[tableAction.action](row); - } - else { - tableAction.action.call(this.parentRef, row); - } - this.toggleRowAction(row); - } - }; - /** - * @param {?} row - * @param {?} rowIndex - * @return {?} - */ - ThfTableComponent.prototype.processDropdownAction = /** - * @param {?} row - * @param {?} rowIndex - * @return {?} - */ - function (row, rowIndex) { - this.toggleRowAction(row); - this.changeDetector.detectChanges(); - this.setDropdownPosition(row, rowIndex); - }; - /** - * @param {?} row - * @param {?} rowIndex - * @return {?} - */ - ThfTableComponent.prototype.setDropdownPosition = /** - * @param {?} row - * @param {?} rowIndex - * @return {?} - */ - function (row, rowIndex) { - if (this.height && row.$showAction) { - var /** @type {?} */ offsetDropdown = 8; - this.thfControlPosition.setElements(this.actionsElement.toArray()[rowIndex].nativeElement, offsetDropdown, this.actionsIconElement.toArray()[rowIndex]); - this.thfControlPosition.adjustPosition('bottom-left'); - } - }; - /** - * @return {?} - */ - ThfTableComponent.prototype.columnCountForMasterDetail = /** - * @return {?} - */ - function () { - return (this.getMainColumns().length + 1) + (this.actions.length > 0 ? 1 : 0) + (this.checkbox ? 1 : 0); - }; - /** - * @return {?} - */ - ThfTableComponent.prototype.columnCount = /** - * @return {?} - */ - function () { - return (this.getMainColumns().length + - (this.actions.length > 0 ? 1 : 0) + - (this.checkbox ? 1 : 0) + - (!this.hideDetail && this.getColumnMasterDetail() !== undefined ? 1 : 0)); - }; - /** - * @param {?} row - * @param {?} subtitleColumn - * @return {?} - */ - ThfTableComponent.prototype.getSubtitleColumn = /** - * @param {?} row - * @param {?} subtitleColumn - * @return {?} - */ - function (row, subtitleColumn) { - return subtitleColumn.subtitles.find(function (subtitleItem) { return row[subtitleColumn.column] === subtitleItem.value; }); - }; - /** - * @param {?} row - * @param {?} columnLabel - * @return {?} - */ - ThfTableComponent.prototype.getColumnLabel = /** - * @param {?} row - * @param {?} columnLabel - * @return {?} - */ - function (row, columnLabel) { - return columnLabel.labels.find(function (labelItem) { return row[columnLabel.column] === labelItem.value; }); - }; - /** - * @return {?} - */ - ThfTableComponent.prototype.verifyWidthColumnsPixels = /** - * @return {?} - */ - function () { - return this.getMainColumns().every(function (column) { return column.width && column.width.includes('px'); }); - }; - /** - * @return {?} - */ - ThfTableComponent.prototype.calculateWidthHeaders = /** - * @return {?} - */ - function () { - var _this = this; - setTimeout(function () { - if (_this.height) { - _this.headersTable.forEach(function (header) { - var /** @type {?} */ divHeader = header.nativeElement.querySelector('.thf-table-header-fixed-inner'); - if (divHeader) { - divHeader.style.width = header.nativeElement.offsetWidth + "px"; - } - }); - } - }); - }; - /** - * @param {?} row - * @return {?} - */ - ThfTableComponent.prototype.containsMasterDetail = /** - * @param {?} row - * @return {?} - */ - function (row) { - return row[this.getNameColumnDetail()] && row[this.getNameColumnDetail()].length; - }; - /** - * @param {?} row - * @return {?} - */ - ThfTableComponent.prototype.isShowMasterDetail = /** - * @param {?} row - * @return {?} - */ - function (row) { - return !this.hideDetail && - this.getNameColumnDetail() && - row.$showDetail && - this.containsMasterDetail(row); - }; - /** - * @return {?} - */ - ThfTableComponent.prototype.verifyChangeHeightInFooter = /** - * @return {?} - */ - function () { - return this.footerHeight !== this.getHeightTableFooter(); - }; - /** - * @return {?} - */ - ThfTableComponent.prototype.verifyCalculateHeightTableContainer = /** - * @return {?} - */ - function () { - if (this.height && this.verifyChangeHeightInFooter()) { - this.footerHeight = this.getHeightTableFooter(); - this.calculateHeightTableContainer(this.height); - } - }; - /** - * @param {?} height - * @return {?} - */ - ThfTableComponent.prototype.calculateHeightTableContainer = /** - * @param {?} height - * @return {?} - */ - function (height) { - var /** @type {?} */ value = parseFloat(height); - this.heightTableContainer = value ? (value - this.getHeightTableFooter()) : undefined; - }; - /** - * @return {?} - */ - ThfTableComponent.prototype.checkChangesItems = /** - * @return {?} - */ - function () { - var /** @type {?} */ changesItems = this.differ.diff(this.items); - if (changesItems && this.selectAll) { - this.selectAll = null; - } - }; - /** - * @return {?} - */ - ThfTableComponent.prototype.getHeightTableFooter = /** - * @return {?} - */ - function () { - return this.tableFooterElement ? this.tableFooterElement.nativeElement.offsetHeight : 0; - }; - /** - * @param {?} event - * @return {?} - */ - ThfTableComponent.prototype.hasClikedIcon = /** - * @param {?} event - * @return {?} - */ - function (event) { - return this.actionsIconElement && - !this.actionsIconElement.some(function (actionIcon) { return actionIcon.nativeElement.isEqualNode(event.target); }); - }; - /** - * @param {?} event - * @return {?} - */ - ThfTableComponent.prototype.hasClikedDropdown = /** - * @param {?} event - * @return {?} - */ - function (event) { - return this.actionsElement && - (!event.target || !event.target['className'] || !event.target['className'].includes('thf-table-action-disabled')); - }; - /** - * @param {?} row - * @param {?} tableAction - * @return {?} - */ - ThfTableComponent.prototype.validateTableAction = /** - * @param {?} row - * @param {?} tableAction - * @return {?} - */ - function (row, tableAction) { - if (typeof tableAction.disabled === 'function') { - return tableAction.disabled.call(this.parentRef, row); - } - else { - return tableAction.disabled; - } - }; - /** - * @return {?} - */ - ThfTableComponent.prototype.debounceResize = /** - * @return {?} - */ - function () { - var _this = this; - clearTimeout(this.timeoutResize); - this.timeoutResize = setTimeout(function () { - _this.calculateWidthHeaders(); - // show the table - // show the table - _this.setTableOpacity(1); - }); - }; - /** - * @return {?} - */ - ThfTableComponent.prototype.closeDropdownActions = /** - * @return {?} - */ - function () { - if (!this.hasItems()) { - return; - } - this.items.some(function (item) { - if (item.$showAction) { - item.$showAction = false; - return true; - } - }); - }; - /** - * @param {?} row - * @param {?} column - * @return {?} - */ - ThfTableComponent.prototype.getTypeColumnLink = /** - * @param {?} row - * @param {?} column - * @return {?} - */ - function (row, column) { - if (column.action) { - return 'action'; - } - if (row[column.link].startsWith('http')) { - return 'externalLink'; - } - return 'internalLink'; - }; - /** - * @param {?} value - * @return {?} - */ - ThfTableComponent.prototype.setTableOpacity = /** - * @param {?} value - * @return {?} - */ - function (value) { - this.tableOpacity = value; - }; - ThfTableComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-table', template: "
  • {{ column.label }}
    1 && hasItems()\" class=\"thf-table-header-action\">
    {{noData}}
    {{ row[column.column] | currency:column.format:'symbol':'1.2-2' }} {{ row[column.column] | date: (column.format ? column.format : 'dd/MM/yyyy') }} {{ row[column.column] }} {{ row[column.column] }} {{ row[column.column] }} {{ row[column.column] }}
    {{ actions[0].label }} 1\" class=\"thf-table-column-actions\">
    {{ action.label }}
    {{ detail.label }}: {{ detailsItem[detail.column] }}
    " - },] }, - ]; - /** @nocollapse */ - ThfTableComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["F" /* IterableDiffers */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["X" /* Renderer2 */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["k" /* ChangeDetectorRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_1__angular_router__["b" /* Router */], }, - { type: __WEBPACK_IMPORTED_MODULE_2__services_thf_control_position_thf_control_position_service__["a" /* ThfControlPositionService */], }, - ]; }; - ThfTableComponent.propDecorators = { - "tableFooterElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['tableFooter', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "actionsIconElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* ViewChildren */], args: ['actionsIconElement', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "actionsElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* ViewChildren */], args: ['actionsElement', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "headersTable": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_11" /* ViewChildren */], args: ['headersTable',] },], - }; - return ThfTableComponent; -}(__WEBPACK_IMPORTED_MODULE_3__thf_table_base_component__["a" /* ThfTableBaseComponent */])); - -function ThfTableComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfTableComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfTableComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfTableComponent.propDecorators; - /** @type {?} */ - ThfTableComponent.prototype.tableFooterElement; - /** @type {?} */ - ThfTableComponent.prototype.actionsIconElement; - /** @type {?} */ - ThfTableComponent.prototype.actionsElement; - /** @type {?} */ - ThfTableComponent.prototype.headersTable; - /** @type {?} */ - ThfTableComponent.prototype.heightTableContainer; - /** @type {?} */ - ThfTableComponent.prototype.parentRef; - /** @type {?} */ - ThfTableComponent.prototype.tableOpacity; - /** @type {?} */ - ThfTableComponent.prototype.differ; - /** @type {?} */ - ThfTableComponent.prototype.footerHeight; - /** @type {?} */ - ThfTableComponent.prototype.initialized; - /** @type {?} */ - ThfTableComponent.prototype.timeoutResize; - /** @type {?} */ - ThfTableComponent.prototype.visibleElement; - /** @type {?} */ - ThfTableComponent.prototype.changeDetector; - /** @type {?} */ - ThfTableComponent.prototype.element; - /** @type {?} */ - ThfTableComponent.prototype.router; - /** @type {?} */ - ThfTableComponent.prototype.thfControlPosition; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-table/thf-table.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTableModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_button_thf_button_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-button/thf-button.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_table_column_icon_thf_table_column_icon_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-table/thf-table-column-icon/thf-table-column-icon.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__thf_table_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-table/thf-table.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__thf_table_column_label_thf_table_column_label_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-table/thf-table-column-label/thf-table-column-label.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__thf_table_subtitle_circle_thf_table_subtitle_circle_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-table/thf-table-subtitle-circle/thf-table-subtitle-circle.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__thf_table_subtitle_footer_thf_table_subtitle_footer_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-table/thf-table-subtitle-footer/thf-table-subtitle-footer.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - - - - -/** - * \@description - * Módulo do componente thf-table - */ -var ThfTableModule = /** @class */ (function () { - function ThfTableModule() { - } - ThfTableModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_0__angular_common__["b" /* CommonModule */], - __WEBPACK_IMPORTED_MODULE_2__angular_router__["c" /* RouterModule */], - __WEBPACK_IMPORTED_MODULE_3__thf_button_thf_button_module__["a" /* ThfButtonModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_5__thf_table_component__["a" /* ThfTableComponent */], - __WEBPACK_IMPORTED_MODULE_4__thf_table_column_icon_thf_table_column_icon_component__["a" /* ThfTableColumnIconComponent */], - __WEBPACK_IMPORTED_MODULE_6__thf_table_column_label_thf_table_column_label_component__["a" /* ThfTableColumnLabelComponent */], - __WEBPACK_IMPORTED_MODULE_7__thf_table_subtitle_circle_thf_table_subtitle_circle_component__["a" /* ThfTableSubtitleCircleComponent */], - __WEBPACK_IMPORTED_MODULE_8__thf_table_subtitle_footer_thf_table_subtitle_footer_component__["a" /* ThfTableSubtitleFooterComponent */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_5__thf_table_component__["a" /* ThfTableComponent */] - ] - },] }, - ]; - /** @nocollapse */ - ThfTableModule.ctorParameters = function () { return []; }; - return ThfTableModule; -}()); - -function ThfTableModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfTableModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfTableModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-tabs/thf-tab-button/thf-tab-button.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTabButtonComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -var ThfTabButtonComponent = /** @class */ (function () { - function ThfTabButtonComponent(el) { - this.el = el; - // Método recebido do usuário para ser disparado quando clicar na aba - this.clickCallback = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */]; - this.clickTab = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */]; - } - /** - * @param {?} e - * @return {?} - */ - ThfTabButtonComponent.prototype.onClick = /** - * @param {?} e - * @return {?} - */ - function (e) { - if (!this.disabled) { - this.clickTab.emit(this.id); - this.clickCallback.emit(this.id); - } - }; - /** - * @return {?} - */ - ThfTabButtonComponent.prototype.controlDisabled = /** - * @return {?} - */ - function () { - if (this.disabled) { - this.el.nativeElement.classList.add('thf-tab-disabled'); - } - else { - this.el.nativeElement.classList.remove('thf-tab-disabled'); - } - }; - /** - * @return {?} - */ - ThfTabButtonComponent.prototype.controlActive = /** - * @return {?} - */ - function () { - if (this.active) { - this.el.nativeElement.classList.add('thf-tab-active'); - } - else { - this.el.nativeElement.classList.remove('thf-tab-active'); - } - }; - /** - * @return {?} - */ - ThfTabButtonComponent.prototype.ngAfterViewChecked = /** - * @return {?} - */ - function () { - if (this.hide) { - this.el.nativeElement.style.display = 'none'; - } - else { - this.el.nativeElement.style.display = ''; - this.el.nativeElement.style.width = this.width + '%'; - } - this.controlDisabled(); - this.controlActive(); - }; - ThfTabButtonComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-tab-button', template: "
    {{label}}
    " - },] }, - ]; - /** @nocollapse */ - ThfTabButtonComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - ThfTabButtonComponent.propDecorators = { - "id": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - "active": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - "width": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - "small": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - "disabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - "hide": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */] },], - "clickCallback": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */] },], - "clickTab": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */] },], - "tab": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['tab',] },], - "onClick": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["z" /* HostListener */], args: ['click', ['$event'],] },], - }; - return ThfTabButtonComponent; -}()); - -function ThfTabButtonComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfTabButtonComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfTabButtonComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfTabButtonComponent.propDecorators; - /** @type {?} */ - ThfTabButtonComponent.prototype.id; - /** @type {?} */ - ThfTabButtonComponent.prototype.active; - /** @type {?} */ - ThfTabButtonComponent.prototype.label; - /** @type {?} */ - ThfTabButtonComponent.prototype.width; - /** @type {?} */ - ThfTabButtonComponent.prototype.small; - /** @type {?} */ - ThfTabButtonComponent.prototype.disabled; - /** @type {?} */ - ThfTabButtonComponent.prototype.hide; - /** @type {?} */ - ThfTabButtonComponent.prototype.clickCallback; - /** @type {?} */ - ThfTabButtonComponent.prototype.clickTab; - /** @type {?} */ - ThfTabButtonComponent.prototype.tab; - /** @type {?} */ - ThfTabButtonComponent.prototype.el; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-tabs/thf-tab/thf-tab-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTabBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@description - * - * Cada thf-tab gera uma aba com o conteúdo HTML inserido dentro dele. - */ -var ThfTabBaseComponent = /** @class */ (function () { - function ThfTabBaseComponent() { - /** - * Para a aba parecer ativa e mostrar o conteúdo quando iniciar - */ - this.active = false; - /** - * Esconder a aba - */ - this.hide = false; - /** - * Desabilitar a aba - */ - this.disabled = false; - /** - * ID da aba - */ - this.id = String(Math.random()); - /** - * Método disparado ao clicar na aba - */ - this.click = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */]; - } - Object.defineProperty(ThfTabBaseComponent.prototype, "setActive", { - set: /** - * @param {?} active - * @return {?} - */ - function (active) { - (active === '') ? this.active = true : this.active = Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(active); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTabBaseComponent.prototype, "setHide", { - set: /** - * @param {?} hide - * @return {?} - */ - function (hide) { - (hide === '') ? this.hide = true : this.hide = Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(hide); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTabBaseComponent.prototype, "setDisabled", { - set: /** - * @param {?} disabled - * @return {?} - */ - function (disabled) { - (disabled === '') ? this.disabled = true : this.disabled = Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(disabled); - }, - enumerable: true, - configurable: true - }); - ThfTabBaseComponent.propDecorators = { - "label": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-label',] },], - "setActive": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-active',] },], - "setHide": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-hide',] },], - "setDisabled": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-disabled',] },], - "id": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-id',] },], - "click": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-click',] },], - }; - return ThfTabBaseComponent; -}()); - -function ThfTabBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfTabBaseComponent.propDecorators; - /** - * Label que aparecerá na aba - * @type {?} - */ - ThfTabBaseComponent.prototype.label; - /** - * Para a aba parecer ativa e mostrar o conteúdo quando iniciar - * @type {?} - */ - ThfTabBaseComponent.prototype.active; - /** - * Esconder a aba - * @type {?} - */ - ThfTabBaseComponent.prototype.hide; - /** - * Desabilitar a aba - * @type {?} - */ - ThfTabBaseComponent.prototype.disabled; - /** - * ID da aba - * @type {?} - */ - ThfTabBaseComponent.prototype.id; - /** - * Método disparado ao clicar na aba - * @type {?} - */ - ThfTabBaseComponent.prototype.click; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-tabs/thf-tab/thf-tab.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTabComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_tab_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-tabs/thf-tab/thf-tab-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsExtends ThfTabBaseComponent - */ -var ThfTabComponent = /** @class */ (function (_super) { - __extends(ThfTabComponent, _super); - function ThfTabComponent(el) { - var _this = _super.call(this) || this; - _this.el = el; - return _this; - } - /** - * @return {?} - */ - ThfTabComponent.prototype.ngAfterViewChecked = /** - * @return {?} - */ - function () { - this.el.nativeElement.style.display = (this.active) ? '' : 'none'; - }; - ThfTabComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-tab', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfTabComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - return ThfTabComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_tab_base_component__["a" /* ThfTabBaseComponent */])); - -function ThfTabComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfTabComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfTabComponent.ctorParameters; - /** @type {?} */ - ThfTabComponent.prototype.el; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-tabs/thf-tabs-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTabsBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_util__ = __webpack_require__("../../../../@totvs/thf-ui/utils/util.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@description - * - * O thf-tabs é o componente de abas que facilita a organização de conteúdos - */ -var ThfTabsBaseComponent = /** @class */ (function () { - function ThfTabsBaseComponent() { - /** - * Usado para indicar se a aba será pequena - */ - this.small = false; - } - Object.defineProperty(ThfTabsBaseComponent.prototype, "setSmall", { - set: /** - * @param {?} small - * @return {?} - */ - function (small) { - (small === '') ? this.small = true : this.small = Object(__WEBPACK_IMPORTED_MODULE_1__utils_util__["d" /* convertToBoolean */])(small); - }, - enumerable: true, - configurable: true - }); - ThfTabsBaseComponent.propDecorators = { - "setSmall": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-small',] },], - }; - return ThfTabsBaseComponent; -}()); - -function ThfTabsBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfTabsBaseComponent.propDecorators; - /** - * Usado para indicar se a aba será pequena - * @type {?} - */ - ThfTabsBaseComponent.prototype.small; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-tabs/thf-tabs.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTabsComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_tabs_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-tabs/thf-tabs-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_tab_button_thf_tab_button_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-tabs/thf-tab-button/thf-tab-button.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_tab_thf_tab_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-tabs/thf-tab/thf-tab.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsExtends ThfTabsBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfTabsComponent = /** @class */ (function (_super) { - __extends(ThfTabsComponent, _super); - function ThfTabsComponent(resolver) { - var _this = _super.call(this) || this; - _this.resolver = resolver; - // Id do componente - _this.listButtons = []; - _this.created = false; - return _this; - } - /** - * @return {?} - */ - ThfTabsComponent.prototype.ngAfterContentInit = /** - * @return {?} - */ - function () { - var _this = this; - var /** @type {?} */ ComponentFactory = this.resolver.resolveComponentFactory(__WEBPACK_IMPORTED_MODULE_2__thf_tab_button_thf_tab_button_component__["a" /* ThfTabButtonComponent */]); - // Calcula a largura das tabs - var /** @type {?} */ width = this.calculateWidth(this.countVisibledTabs()); - // Percorre tabs - this.tabsChild.forEach(function (tab) { - // Cria os botões - var /** @type {?} */ compButton = _this.nav.createComponent(ComponentFactory); - compButton.instance.label = tab.label; - compButton.instance.id = tab.id; - compButton.instance.active = tab.active; - compButton.instance.hide = tab.hide; - compButton.instance.disabled = tab.disabled; - compButton.instance.width = width; - compButton.instance.small = _this.small; - compButton.instance.clickCallback = tab.click; - // É necessário esta arrow function para não perder o contexto. - // Caso contrário, a funcão não teria mais acesso ao "this" deste component - compButton.instance.clickTab.subscribe(function (id) { return _this.selectedTab(id); }); - _this.listButtons.push(compButton.instance); - }); - this.created = true; - }; - /** - * @return {?} - */ - ThfTabsComponent.prototype.ngAfterViewChecked = /** - * @return {?} - */ - function () { - var _this = this; - if (this.created) { - // Váriaveis utilizadas para trocar aba ativa, - // quando a aba ativa está desabilitada ou escondida - var /** @type {?} */ changeTab_1 = false; - var /** @type {?} */ lastEnabledTab_1 = null; - var /** @type {?} */ lastEnabledButton_1 = null; - // Calcula a largura das tabs - var /** @type {?} */ width_1 = this.calculateWidth(this.countVisibledTabs()); - this.tabsChild.forEach(function (tab) { - _this.listButtons.forEach(function (button) { - if (button.id === tab.id) { - // Atualiza a largura dos botões de acordo com os botões visíveis - button.width = width_1; - button.active = tab.active; - if (tab.disabled || tab.hide) { - // Verifica se uma desativada ou escondida está ativa - if (tab.active) { - tab.active = false; - button.active = false; - changeTab_1 = true; - } - } - else { - // Armazena a aba que não esteja escondida para trocar de aba automaticamente - // caso a aba ativa seja escondida ou desabilitada. - if (!changeTab_1) { - lastEnabledTab_1 = tab; - lastEnabledButton_1 = button; - } - else if (!lastEnabledTab_1) { - lastEnabledTab_1 = tab; - lastEnabledButton_1 = button; - } - } - // Atualiza as propriedades disabled e hide das abas - button.disabled = tab.disabled; - button.hide = tab.hide; - } - }); - }); - // Habilita uma aba ativa - if (changeTab_1 && lastEnabledTab_1) { - lastEnabledTab_1.active = true; - lastEnabledButton_1.active = true; - } - } - }; - // Função disparada para trocar abas - /** - * @param {?} id - * @return {?} - */ - ThfTabsComponent.prototype.selectedTab = /** - * @param {?} id - * @return {?} - */ - function (id) { - this.tabsChild.forEach(function (tab) { - tab.active = (tab.id === id); - }); - this.listButtons.forEach(function (button) { - if (button.id === id) { - button.active = true; - } - else { - button.active = false; - } - }); - }; - // Conta quantas abas estão visíveis - /** - * @return {?} - */ - ThfTabsComponent.prototype.countVisibledTabs = /** - * @return {?} - */ - function () { - var /** @type {?} */ cont = 0; - this.tabsChild.forEach(function (tab) { - cont = (tab.hide) ? cont : cont + 1; - }); - return cont; - }; - // Calcula a largura das tabs não deixando passar de 100% no total de todas as abas - /** - * @param {?} visibledTabs - * @return {?} - */ - ThfTabsComponent.prototype.calculateWidth = /** - * @param {?} visibledTabs - * @return {?} - */ - function (visibledTabs) { - var /** @type {?} */ width = parseFloat((100 / visibledTabs).toFixed(2)); - if (width * visibledTabs > 100) { - width = parseFloat(String(width).substring(0, String(width).length - 1)); - } - return width; - }; - ThfTabsComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-tabs', template: "
    " - },] }, - ]; - /** @nocollapse */ - ThfTabsComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["p" /* ComponentFactoryResolver */], }, - ]; }; - ThfTabsComponent.propDecorators = { - "tabsChild": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["s" /* ContentChildren */], args: [__WEBPACK_IMPORTED_MODULE_3__thf_tab_thf_tab_component__["a" /* ThfTabComponent */],] },], - "nav": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['nav', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */] },] },], - }; - return ThfTabsComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_tabs_base_component__["a" /* ThfTabsBaseComponent */])); - -function ThfTabsComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfTabsComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfTabsComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfTabsComponent.propDecorators; - /** @type {?} */ - ThfTabsComponent.prototype.tabsChild; - /** @type {?} */ - ThfTabsComponent.prototype.nav; - /** @type {?} */ - ThfTabsComponent.prototype.listButtons; - /** @type {?} */ - ThfTabsComponent.prototype.created; - /** @type {?} */ - ThfTabsComponent.prototype.resolver; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-tabs/thf-tabs.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTabsModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_tabs_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-tabs/thf-tabs.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_tab_thf_tab_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-tabs/thf-tab/thf-tab.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_tab_button_thf_tab_button_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-tabs/thf-tab-button/thf-tab-button.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - -/** - * \@description - * Módulo do componente thf-tabs - */ -var ThfTabsModule = /** @class */ (function () { - function ThfTabsModule() { - } - ThfTabsModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_2__thf_tabs_component__["a" /* ThfTabsComponent */], - __WEBPACK_IMPORTED_MODULE_3__thf_tab_thf_tab_component__["a" /* ThfTabComponent */], - __WEBPACK_IMPORTED_MODULE_4__thf_tab_button_thf_tab_button_component__["a" /* ThfTabButtonComponent */] - ], - entryComponents: [ - __WEBPACK_IMPORTED_MODULE_4__thf_tab_button_thf_tab_button_component__["a" /* ThfTabButtonComponent */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_2__thf_tabs_component__["a" /* ThfTabsComponent */], - __WEBPACK_IMPORTED_MODULE_3__thf_tab_thf_tab_component__["a" /* ThfTabComponent */] - ] - },] }, - ]; - /** @nocollapse */ - ThfTabsModule.ctorParameters = function () { return []; }; - return ThfTabsModule; -}()); - -function ThfTabsModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfTabsModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfTabsModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-toolbar/thf-toolbar-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfToolbarBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@description - * - * O componente **thf-toolbar** é um container para título e para informações de usuário, localizado no topo de uma aplicação. - * - * Possui os seguintes elementos: - * - Título: nome da aplicação; - * - Notificação: um ícone na forma de sino que mostra o número de notificações; - * - Avatar: uma pequena imagem que representa o perfil do usuário. - * - * A ação do elemento de notificação é exibir uma lista com os itens que precisam da atenção do usuário da aplicação, - * como por exemplo um alerta de nova mensagem. A cada nova notificação, o número deste item é incrementado. - * - * O elemento de avatar de usuário, quando acionado, abre um menu com ações definidas no código, geralmente essas ações são para - * manipulação da conta do usuário logado, como por exemplo sair do sistema. - */ -var ThfToolbarBaseComponent = /** @class */ (function () { - function ThfToolbarBaseComponent() { - /** - * Mostra e esconde o ícone de notificação. (em desenvolvimento...) - */ - this.showNotification = true; - } - ThfToolbarBaseComponent.propDecorators = { - "title": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-title',] },], - "userSrc": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-user-src',] },], - "userName": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-user-name',] },], - "userActions": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-user-actions',] },], - "showNotification": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-show-notification',] },], - "notificationNumber": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-notification-number',] },], - "notificationActions": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-notification-actions',] },], - }; - return ThfToolbarBaseComponent; -}()); - -function ThfToolbarBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfToolbarBaseComponent.propDecorators; - /** - * Título da aplicação - * @type {?} - */ - ThfToolbarBaseComponent.prototype.title; - /** - * Fonte da imagem do avatar de usuário que pode ser um caminho local: ```'./assets/images/logo-black-small.png'``` - * ou servidor externo: ```https://thf.totvs.com.br/assets/images/logo-black-small.png```. - * Se o valor não for definido, o avatar de usuário não aparece - * @type {?} - */ - ThfToolbarBaseComponent.prototype.userSrc; - /** - * Nome para visualização no menu do avatar de usuário. (em desenvolvimento...) - * @type {?} - */ - ThfToolbarBaseComponent.prototype.userName; - /** - * Lista de itens com ações do menu de usuário. (em desenvolvimento...) - * @type {?} - */ - ThfToolbarBaseComponent.prototype.userActions; - /** - * Mostra e esconde o ícone de notificação. (em desenvolvimento...) - * @type {?} - */ - ThfToolbarBaseComponent.prototype.showNotification; - /** - * Número de notificações. (em desenvolvimento...) - * @type {?} - */ - ThfToolbarBaseComponent.prototype.notificationNumber; - /** - * Lista de mensagens de notificações. (em desenvolvimento...) - * @type {?} - */ - ThfToolbarBaseComponent.prototype.notificationActions; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-toolbar/thf-toolbar.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfToolbarComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser__ = __webpack_require__("../../../platform-browser/esm5/platform-browser.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_toolbar_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-toolbar/thf-toolbar-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfToolbarBaseComponent - * - * \@description - * - * O título da página web assumirá o valor da propriedade `t-title`. - * - * \@example - * - * - * - * - * - * - * - * - * - * - */ -var ThfToolbarComponent = /** @class */ (function (_super) { - __extends(ThfToolbarComponent, _super); - function ThfToolbarComponent(titleService, renderer, viewRef) { - var _this = _super.call(this) || this; - _this.titleService = titleService; - _this.notificationMenu = false; - _this.userMenu = false; - _this.parentRef = viewRef['_view']['component']; - renderer.listenGlobal('document', 'click', function (event) { - _this.wasClickedOnToggle(event); - }); - return _this; - } - /** - * @return {?} - */ - ThfToolbarComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - this.setTitle(this.title); - }; - /** - * @param {?} event - * @return {?} - */ - ThfToolbarComponent.prototype.wasClickedOnToggle = /** - * @param {?} event - * @return {?} - */ - function (event) { - var /** @type {?} */ clickOutNotification = this.notificationElement && !this.notificationElement.nativeElement.contains(event.target); - var /** @type {?} */ clickOutUser = this.userElement && !this.userElement.nativeElement.contains(event.target); - if (this.notificationElement && this.userElement && clickOutNotification && clickOutUser) { - this.userMenu = false; - this.notificationMenu = false; - } - else if (this.userElement && !this.notificationElement && clickOutUser) { - this.userMenu = false; - } - else if (this.notificationElement && !this.userElement && clickOutNotification) { - this.notificationMenu = false; - } - }; - // Altera o título da página web para o título da toolbar - /** - * @param {?} newTitle - * @return {?} - */ - ThfToolbarComponent.prototype.setTitle = /** - * @param {?} newTitle - * @return {?} - */ - function (newTitle) { - this.titleService.setTitle(newTitle); - }; - // Mostra o menu de notificações - /** - * @return {?} - */ - ThfToolbarComponent.prototype.showNotificationMenu = /** - * @return {?} - */ - function () { - this.notificationMenu = !this.notificationMenu; - this.userMenu = false; - }; - // Mostra o menu de usuários - /** - * @return {?} - */ - ThfToolbarComponent.prototype.showUserMenu = /** - * @return {?} - */ - function () { - this.userMenu = !this.userMenu; - this.notificationMenu = false; - }; - ThfToolbarComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-toolbar', template: "
    {{title}}
    0\" class=\"thf-toolbar-notification-badge\">{{ notificationNumber }}
    {{ userName }}

    {{ userAction.label }}
    {{ notificationAction.label }}
    " - },] }, - ]; - /** @nocollapse */ - ThfToolbarComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser__["d" /* Title */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["W" /* Renderer */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - ]; }; - ThfToolbarComponent.propDecorators = { - "notificationElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['notificationElement', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "userElement": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['userElement', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - }; - return ThfToolbarComponent; -}(__WEBPACK_IMPORTED_MODULE_2__thf_toolbar_base_component__["a" /* ThfToolbarBaseComponent */])); - -function ThfToolbarComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfToolbarComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfToolbarComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfToolbarComponent.propDecorators; - /** @type {?} */ - ThfToolbarComponent.prototype.notificationMenu; - /** @type {?} */ - ThfToolbarComponent.prototype.userMenu; - /** @type {?} */ - ThfToolbarComponent.prototype.parentRef; - /** @type {?} */ - ThfToolbarComponent.prototype.notificationElement; - /** @type {?} */ - ThfToolbarComponent.prototype.userElement; - /** @type {?} */ - ThfToolbarComponent.prototype.titleService; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-toolbar/thf-toolbar.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfToolbarModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_toolbar_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-toolbar/thf-toolbar.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_avatar_thf_avatar_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-avatar/thf-avatar.module.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@description - * Módulo do componente thf-toolbar - */ -var ThfToolbarModule = /** @class */ (function () { - function ThfToolbarModule() { - } - ThfToolbarModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */], - __WEBPACK_IMPORTED_MODULE_3__thf_avatar_thf_avatar_module__["a" /* ThfAvatarModule */] - ], - declarations: [ - __WEBPACK_IMPORTED_MODULE_2__thf_toolbar_component__["a" /* ThfToolbarComponent */] - ], - exports: [__WEBPACK_IMPORTED_MODULE_2__thf_toolbar_component__["a" /* ThfToolbarComponent */]], - providers: [], - schemas: [] - },] }, - ]; - /** @nocollapse */ - ThfToolbarModule.ctorParameters = function () { return []; }; - return ThfToolbarModule; -}()); - -function ThfToolbarModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfToolbarModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfToolbarModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-widget/thf-widget-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfWidgetBaseComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@description - * O componente thf-widget é recomendado para dashboards e pode ser utilizado - * para incluir vários tipos de conteúdo como: gráficos, tabelas, grids e imagens. - * Além da exibição de conteúdo, o thf-widget possibilita adicionar ações e um link - * para ajuda. - */ -var ThfWidgetBaseComponent = /** @class */ (function () { - function ThfWidgetBaseComponent() { - this._size = 'xl'; - /** - * Função que será chamada na primeira ação - */ - this.primaryAction = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - /** - * Função que será chamada na segunda ação - */ - this.secondaryAction = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */](); - } - Object.defineProperty(ThfWidgetBaseComponent.prototype, "size", { - get: /** - * @return {?} - */ - function () { - return this._size; - }, - set: /** - * \@optional - * - * \@description - * - * Largura do thf-widget. Opções: sm, md, lg, xl. Padrão: xl - * - * \@default `xl` - * - * @param {?} size - * @return {?} - */ - function (size) { - var /** @type {?} */ sizes = ['sm', 'md', 'lg', 'xl']; - this._size = (sizes.indexOf(size) > -1) ? size : 'xl'; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfWidgetBaseComponent.prototype, "setHeight", { - set: /** - * @param {?} value - * @return {?} - */ - function (value) { - this.height = parseInt(value, 10); - }, - enumerable: true, - configurable: true - }); - ThfWidgetBaseComponent.propDecorators = { - "title": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-title',] },], - "help": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-help',] },], - "primaryAction": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-primary-action',] },], - "primaryLabel": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-primary-label',] },], - "secondaryAction": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-secondary-action',] },], - "secondaryLabel": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-secondary-label',] },], - "background": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-background',] },], - "size": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-size',] },], - "setHeight": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-height',] },], - }; - return ThfWidgetBaseComponent; -}()); - -function ThfWidgetBaseComponent_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfWidgetBaseComponent.propDecorators; - /** @type {?} */ - ThfWidgetBaseComponent.prototype._size; - /** - * Título do thf-widget - * @type {?} - */ - ThfWidgetBaseComponent.prototype.title; - /** - * Link de ajuda - * @type {?} - */ - ThfWidgetBaseComponent.prototype.help; - /** - * Função que será chamada na primeira ação - * @type {?} - */ - ThfWidgetBaseComponent.prototype.primaryAction; - /** - * Descrição da primeira ação - * @type {?} - */ - ThfWidgetBaseComponent.prototype.primaryLabel; - /** - * Função que será chamada na segunda ação - * @type {?} - */ - ThfWidgetBaseComponent.prototype.secondaryAction; - /** - * Descrição da segunda ação - * @type {?} - */ - ThfWidgetBaseComponent.prototype.secondaryLabel; - /** - * Imagem de background do thf-widget - * @type {?} - */ - ThfWidgetBaseComponent.prototype.background; - /** - * Altura do thf-widget. - * Caso não seja definida, se ajustará automaticamente ao conteúdo - * @type {?} - */ - ThfWidgetBaseComponent.prototype.height; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-widget/thf-widget.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfWidgetComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_widget_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-widget/thf-widget-base.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsExtends ThfWidgetBaseComponent - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfWidgetComponent = /** @class */ (function (_super) { - __extends(ThfWidgetComponent, _super); - function ThfWidgetComponent(viewRef) { - var _this = _super.call(this) || this; - /** - * Função chamada ao clicar no ícone de configuração - */ - _this.setting = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* EventEmitter */]; - // Obtém a referência ao componente pai - // Obtém a referência ao componente pai - _this.parentRef = viewRef['_view']['component']; - return _this; - } - /** - * @return {?} - */ - ThfWidgetComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - if (this.background) { - // Seta uma imagem de background e um tamanho mínimo para que o Widget apareça - this.elBackground.nativeElement.style.backgroundImage = "url('" + this.background + "')"; - this.elBackground.nativeElement.style.minHeight = '20px'; - } - if (this.height) { - var /** @type {?} */ heightBody = this.height - 32; // 32 de padding - // Calcula tamanho restante para o Body, subtraindo title e footer se existirem - if (this.title) { - heightBody = heightBody - 40; - } - if (this.primaryLabel) { - heightBody = heightBody - 40; - } - // Seta o corpo do widget com o tamanho calculado - this.elBody.nativeElement.style.height = heightBody + "px"; - } - }; - /** - * @return {?} - */ - ThfWidgetComponent.prototype.runPrimaryAction = /** - * @return {?} - */ - function () { - this.primaryAction.emit(); - }; - /** - * @return {?} - */ - ThfWidgetComponent.prototype.runSecondaryAction = /** - * @return {?} - */ - function () { - this.secondaryAction.emit(); - }; - /** - * @return {?} - */ - ThfWidgetComponent.prototype.settingOutput = /** - * @return {?} - */ - function () { - this.setting.emit(); - }; - /** - * @return {?} - */ - ThfWidgetComponent.prototype.openHelp = /** - * @return {?} - */ - function () { - window.open(this.help, '_blank'); - }; - /** - * @param {?} object - * @param {?} type - * @return {?} - */ - ThfWidgetComponent.prototype.isTypeof = /** - * @param {?} object - * @param {?} type - * @return {?} - */ - function (object, type) { - return typeof object === type; - }; - ThfWidgetComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-widget', template: " " - },] }, - ]; - /** @nocollapse */ - ThfWidgetComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_12" /* ViewContainerRef */], }, - ]; }; - ThfWidgetComponent.propDecorators = { - "setting": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* Output */], args: ['t-setting',] },], - "elBackground": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['elemBackground', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - "elBody": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['elemBody', { read: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */] },] },], - }; - return ThfWidgetComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_widget_base_component__["a" /* ThfWidgetBaseComponent */])); - -function ThfWidgetComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfWidgetComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfWidgetComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfWidgetComponent.propDecorators; - /** - * Função chamada ao clicar no ícone de configuração - * @type {?} - */ - ThfWidgetComponent.prototype.setting; - /** @type {?} */ - ThfWidgetComponent.prototype.elBackground; - /** @type {?} */ - ThfWidgetComponent.prototype.elBody; - /** @type {?} */ - ThfWidgetComponent.prototype.parentRef; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/components/thf-widget/thf-widget.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfWidgetModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_widget_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-widget/thf-widget.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * - * Módulo do componente thf-widget - */ -var ThfWidgetModule = /** @class */ (function () { - function ThfWidgetModule() { - } - ThfWidgetModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_2__thf_widget_component__["a" /* ThfWidgetComponent */] - ], - declarations: [__WEBPACK_IMPORTED_MODULE_2__thf_widget_component__["a" /* ThfWidgetComponent */]] - },] }, - ]; - /** @nocollapse */ - ThfWidgetModule.ctorParameters = function () { return []; }; - return ThfWidgetModule; -}()); - -function ThfWidgetModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfWidgetModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfWidgetModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/directives/directives.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDirectivesModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_tooltip_thf_tooltip_module__ = __webpack_require__("../../../../@totvs/thf-ui/directives/thf-tooltip/thf-tooltip.module.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -var ThfDirectivesModule = /** @class */ (function () { - function ThfDirectivesModule() { - } - ThfDirectivesModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - declarations: [], - imports: [ - __WEBPACK_IMPORTED_MODULE_1__thf_tooltip_thf_tooltip_module__["a" /* ThfTooltipModule */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_1__thf_tooltip_thf_tooltip_module__["a" /* ThfTooltipModule */] - ], - providers: [], - bootstrap: [] - },] }, - ]; - /** @nocollapse */ - ThfDirectivesModule.ctorParameters = function () { return []; }; - return ThfDirectivesModule; -}()); - -function ThfDirectivesModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDirectivesModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDirectivesModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/directives/thf-tooltip/thf-tooltip-base.directive.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTooltipBaseDirective; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__services_thf_control_position_thf_control_position_constants__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-control-position/thf-control-position.constants.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -var /** @type {?} */ CONTENT_MAX_LENGTH = 140; -var /** @type {?} */ THF_TOOLTIP_POSITION_DEFAULT = 'bottom'; -/** - * \@description - * - * A diretiva thf-tooltip deve ser utilizada para oferecer informações adicionais quando os usuários - * passam o mouse sobre o elemento alvo ao qual ela está atribuída. - * - * O conteúdo é formado por um pequeno texto que deve contribuir para uma tomada de decisão ou - * orientação do usuário. A ativação dele pode estar em qualquer componente ou tag HTML. - * - * Para textos maiores ou no caso de haver a necessidade de utilizar algum outro elemento como - * conteúdo deve-se utilizar o [**thf-popover**](https://thf.totvs.com.br/documentation/thf-popover?view=doc). - */ -var ThfTooltipBaseDirective = /** @class */ (function () { - function ThfTooltipBaseDirective() { - this._tooltip = ''; - this._tooltipPosition = 'bottom'; - } - Object.defineProperty(ThfTooltipBaseDirective.prototype, "tooltip", { - get: /** - * @return {?} - */ - function () { - return this._tooltip; - }, - set: /** - * \@description - * - * Atribui um texto ao thf-tooltip, com limitação de 140 caracteres. - * @param {?} tooltip - * @return {?} - */ - function (tooltip) { - if (tooltip && tooltip.length > CONTENT_MAX_LENGTH) { - this._tooltip = tooltip.substring(0, CONTENT_MAX_LENGTH); - } - else { - this._tooltip = tooltip; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ThfTooltipBaseDirective.prototype, "tooltipPosition", { - get: /** - * @return {?} - */ - function () { - return this._tooltipPosition; - }, - set: /** - * \@optional - * - * \@description - * - * Define a posição que o thf-tooltip abrirá em relação ao componente alvo. Sugere-se que seja - * usada a orientação "bottom" (abaixo), porém o mesmo é flexível e será rotacionado - * automaticamente para se adequar a tela, caso necessário. - * - * Posições válidas: - * - `right`: Posiciona o thf-tooltip no lado direito do componente alvo. - * - `right-bottom`: Posiciona o thf-tooltip no lado direito inferior do componente alvo. - * - `right-top`: Posiciona o thf-tooltip no lado direito superior do componente alvo. - * - `bottom`: Posiciona o thf-tooltip abaixo do componente alvo. - * - `bottom-left`: Posiciona o thf-tooltip abaixo e à esquerda do componente alvo. - * - `bottom-right`: Posiciona o thf-tooltip abaixo e à direita do componente alvo. - * - `left`: Posiciona o thf-tooltip no lado esquerdo do componente alvo. - * - `left-top`: Posiciona o thf-tooltip no lado esquerdo superior do componente alvo. - * - `left-bottom`: Posiciona o thf-tooltip no lado esquerdo inferior do componente alvo. - * - `top`: Posiciona o thf-tooltip acima do componente alvo. - * - `top-right`: Posiciona o thf-tooltip acima e à direita do componente alvo. - * - `top-left`: Posiciona o thf-tooltip acima e à esquerda do componente alvo. - * - * \@default bottom - * @param {?} position - * @return {?} - */ - function (position) { - this._tooltipPosition = __WEBPACK_IMPORTED_MODULE_1__services_thf_control_position_thf_control_position_constants__["a" /* THF_CONTROL_POSITIONS */].includes(position) ? position : THF_TOOLTIP_POSITION_DEFAULT; - }, - enumerable: true, - configurable: true - }); - ThfTooltipBaseDirective.propDecorators = { - "tooltip": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-tooltip',] },], - "tooltipPosition": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* Input */], args: ['t-tooltip-position',] },], - }; - return ThfTooltipBaseDirective; -}()); - -function ThfTooltipBaseDirective_tsickle_Closure_declarations() { - /** @type {!Object)}>>} */ - ThfTooltipBaseDirective.propDecorators; - /** @type {?} */ - ThfTooltipBaseDirective.prototype._tooltip; - /** @type {?} */ - ThfTooltipBaseDirective.prototype._tooltipPosition; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/directives/thf-tooltip/thf-tooltip.directive.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTooltipDirective; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__services_thf_control_position_thf_control_position_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-control-position/thf-control-position.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_tooltip_base_directive__ = __webpack_require__("../../../../@totvs/thf-ui/directives/thf-tooltip/thf-tooltip-base.directive.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsExtends ThfTooltipBaseDirective - * - * \@example - * - * - * - * - * - * - * - * - * - * - */ -var ThfTooltipDirective = /** @class */ (function (_super) { - __extends(ThfTooltipDirective, _super); - function ThfTooltipDirective(elementRef, renderer, thfControlPosition) { - var _this = _super.call(this) || this; - _this.elementRef = elementRef; - _this.renderer = renderer; - _this.thfControlPosition = thfControlPosition; - _this.tooltipOffset = 8; - return _this; - } - /** - * @return {?} - */ - ThfTooltipDirective.prototype.ngOnInit = /** - * @return {?} - */ - function () { - this.initScrollEventListenerFunction(); - }; - /** - * @return {?} - */ - ThfTooltipDirective.prototype.onMouseEnter = /** - * @return {?} - */ - function () { - if (this.tooltipContent) { - this.showTooltip(); - } - else { - this.createTooltip(); - } - this.removeArrow(this.arrowDirection); - this.thfControlPosition.adjustPosition(this.tooltipPosition); - this.arrowDirection = this.thfControlPosition.getArrowDirection(); - this.addArrow(this.arrowDirection); - this.lastTooltipText = this.tooltip; - }; - /** - * @return {?} - */ - ThfTooltipDirective.prototype.onMouseLeave = /** - * @return {?} - */ - function () { - this.hideTooltip(); - }; - /** - * @param {?} arrowDirection - * @return {?} - */ - ThfTooltipDirective.prototype.addArrow = /** - * @param {?} arrowDirection - * @return {?} - */ - function (arrowDirection) { - this.renderer.addClass(this.divArrow, "thf-arrow-" + arrowDirection); - }; - /** - * @return {?} - */ - ThfTooltipDirective.prototype.addScrollEventListener = /** - * @return {?} - */ - function () { - window.addEventListener('scroll', this.eventListenerFunction, true); - }; - /** - * @return {?} - */ - ThfTooltipDirective.prototype.createTooltip = /** - * @return {?} - */ - function () { - this.tooltipContent = this.renderer.createElement('div'); - this.renderer.addClass(this.tooltipContent, 'thf-tooltip'); - this.divArrow = this.renderer.createElement('div'); - this.renderer.addClass(this.divArrow, 'thf-tooltip-arrow'); - this.divContent = this.renderer.createElement('div'); - this.renderer.addClass(this.divContent, 'thf-tooltip-content'); - this.textContent = this.renderer.createText(this.tooltip); - this.renderer.appendChild(this.divContent, this.textContent); - this.renderer.appendChild(this.tooltipContent, this.divArrow); - this.renderer.appendChild(this.tooltipContent, this.divContent); - this.renderer.appendChild(this.elementRef.nativeElement, this.tooltipContent); - this.thfControlPosition.setElements(this.tooltipContent, this.tooltipOffset, this.elementRef); - this.addScrollEventListener(); - }; - /** - * @return {?} - */ - ThfTooltipDirective.prototype.initScrollEventListenerFunction = /** - * @return {?} - */ - function () { - var _this = this; - this.eventListenerFunction = function () { - if (!_this.isHidden) { - setTimeout(function () { - _this.thfControlPosition.adjustPosition(_this.tooltipPosition); - }); - } - }; - }; - /** - * @return {?} - */ - ThfTooltipDirective.prototype.hideTooltip = /** - * @return {?} - */ - function () { - this.renderer.addClass(this.tooltipContent, 'thf-invisible'); - this.isHidden = true; - this.removeScrollEventListener(); - }; - /** - * @param {?} arrowDirection - * @return {?} - */ - ThfTooltipDirective.prototype.removeArrow = /** - * @param {?} arrowDirection - * @return {?} - */ - function (arrowDirection) { - if (this.elementRef.nativeElement.querySelector(".thf-arrow-" + arrowDirection)) { - this.renderer.removeClass(this.divArrow, "thf-arrow-" + arrowDirection); - } - }; - /** - * @return {?} - */ - ThfTooltipDirective.prototype.removeScrollEventListener = /** - * @return {?} - */ - function () { - window.removeEventListener('scroll', this.eventListenerFunction, true); - }; - /** - * @return {?} - */ - ThfTooltipDirective.prototype.showTooltip = /** - * @return {?} - */ - function () { - this.renderer.removeClass(this.tooltipContent, 'thf-invisible'); - this.updateTextContent(); - this.isHidden = false; - this.addScrollEventListener(); - }; - /** - * @return {?} - */ - ThfTooltipDirective.prototype.updateTextContent = /** - * @return {?} - */ - function () { - if (this.lastTooltipText !== this.tooltip) { - this.renderer.removeChild(this.divContent, this.textContent); - this.textContent = this.renderer.createText(this.tooltip); - this.renderer.appendChild(this.divContent, this.textContent); - } - }; - ThfTooltipDirective.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["t" /* Directive */], args: [{ - selector: '[t-tooltip]', - providers: [__WEBPACK_IMPORTED_MODULE_1__services_thf_control_position_thf_control_position_service__["a" /* ThfControlPositionService */]] - },] }, - ]; - /** @nocollapse */ - ThfTooltipDirective.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["X" /* Renderer2 */], }, - { type: __WEBPACK_IMPORTED_MODULE_1__services_thf_control_position_thf_control_position_service__["a" /* ThfControlPositionService */], }, - ]; }; - ThfTooltipDirective.propDecorators = { - "onMouseEnter": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["z" /* HostListener */], args: ['mouseenter',] },], - "onMouseLeave": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["z" /* HostListener */], args: ['mouseleave',] },], - }; - return ThfTooltipDirective; -}(__WEBPACK_IMPORTED_MODULE_2__thf_tooltip_base_directive__["a" /* ThfTooltipBaseDirective */])); - -function ThfTooltipDirective_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfTooltipDirective.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfTooltipDirective.ctorParameters; - /** @type {!Object)}>>} */ - ThfTooltipDirective.propDecorators; - /** @type {?} */ - ThfTooltipDirective.prototype.arrowDirection; - /** @type {?} */ - ThfTooltipDirective.prototype.divArrow; - /** @type {?} */ - ThfTooltipDirective.prototype.divContent; - /** @type {?} */ - ThfTooltipDirective.prototype.isHidden; - /** @type {?} */ - ThfTooltipDirective.prototype.lastTooltipText; - /** @type {?} */ - ThfTooltipDirective.prototype.textContent; - /** @type {?} */ - ThfTooltipDirective.prototype.tooltipContent; - /** @type {?} */ - ThfTooltipDirective.prototype.tooltipOffset; - /** @type {?} */ - ThfTooltipDirective.prototype.eventListenerFunction; - /** @type {?} */ - ThfTooltipDirective.prototype.elementRef; - /** @type {?} */ - ThfTooltipDirective.prototype.renderer; - /** @type {?} */ - ThfTooltipDirective.prototype.thfControlPosition; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/directives/thf-tooltip/thf-tooltip.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfTooltipModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_tooltip_directive__ = __webpack_require__("../../../../@totvs/thf-ui/directives/thf-tooltip/thf-tooltip.directive.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@description - * - * Módulo da diretiva Thf-Tooltip. - */ -var ThfTooltipModule = /** @class */ (function () { - function ThfTooltipModule() { - } - ThfTooltipModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["J" /* NgModule */], args: [{ - imports: [ - __WEBPACK_IMPORTED_MODULE_0__angular_common__["b" /* CommonModule */] - ], - declarations: [__WEBPACK_IMPORTED_MODULE_2__thf_tooltip_directive__["a" /* ThfTooltipDirective */]], - exports: [__WEBPACK_IMPORTED_MODULE_2__thf_tooltip_directive__["a" /* ThfTooltipDirective */]] - },] }, - ]; - /** @nocollapse */ - ThfTooltipModule.ctorParameters = function () { return []; }; - return ThfTooltipModule; -}()); - -function ThfTooltipModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfTooltipModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfTooltipModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/guards/guards.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfGuardsModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -var ThfGuardsModule = /** @class */ (function () { - function ThfGuardsModule() { - } - ThfGuardsModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - declarations: [], - imports: [], - exports: [], - providers: [], - bootstrap: [] - },] }, - ]; - /** @nocollapse */ - ThfGuardsModule.ctorParameters = function () { return []; }; - return ThfGuardsModule; -}()); - -function ThfGuardsModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfGuardsModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfGuardsModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/index.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__thf_module__ = __webpack_require__("../../../../@totvs/thf-ui/thf.module.js"); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__thf_module__["a"]; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/interceptors/interceptors.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfInterceptorsModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_http_interceptor_thf_http_interceptor_module__ = __webpack_require__("../../../../@totvs/thf-ui/interceptors/thf-http-interceptor/thf-http-interceptor.module.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -var ThfInterceptorsModule = /** @class */ (function () { - function ThfInterceptorsModule() { - } - ThfInterceptorsModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - declarations: [], - imports: [ - __WEBPACK_IMPORTED_MODULE_1__thf_http_interceptor_thf_http_interceptor_module__["a" /* ThfHttpInterceptorModule */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_1__thf_http_interceptor_thf_http_interceptor_module__["a" /* ThfHttpInterceptorModule */], - ], - providers: [], - bootstrap: [] - },] }, - ]; - /** @nocollapse */ - ThfInterceptorsModule.ctorParameters = function () { return []; }; - return ThfInterceptorsModule; -}()); - -function ThfInterceptorsModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfInterceptorsModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfInterceptorsModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/interceptors/thf-http-interceptor/thf-http-interceptor-base.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfHttpInterceptorBaseService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__services_thf_notification_thf_toaster_thf_toaster_orientation_enum__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-toaster/thf-toaster-orientation.enum.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rxjs_add_operator_do__ = __webpack_require__("../../../../rxjs/_esm5/add/operator/do.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -var /** @type {?} */ NO_ERROR_HEADER_PARAM = 'X-Totvs-No-Error'; -/** - * \@description - * - * O serviço Totvs Http Interceptor realiza o tratamento de requisições HTTP conforme o padrão do - * [**Guia de implementação das APIs TOTVS**](http://tdn.totvs.com/pages/releaseview.action?pageId=271660444) para adaptá-lo - * ao modelo do THF. - * - * Ao analisar o objeto totvs_messages retornado pela requisição, o serviço exibirá notificações com mensagens na tela. - * Os retornos de erros com códigos 4xx e 5xx são tratados automaticamente, sem a necessidade de incluir o totvs_messages. - * - * Também existe a possibilidade de não apresentar a notificação quando houver algum erro com códigos 4xx e 5xx, - * utilizando o parâmetro `X-Totvs-No-Error` que foi definido conforme o - * [**Guia de implementação das APIs TOTVS**](http://tdn.totvs.com/pages/releaseview.action?pageId=271660444) (em Cabeçalhos Customizados). - * O parâmetro `X-Totvs-No-Error` deve ser informado no cabeçalho da requisição com o valor `'true'` para funcionar corretamente, - * por exemplo: - * - * ``` - * ... - * const headers = { 'X-Totvs-No-Error': 'true' }; - * - * this.http.get(`/customers/1`, { headers: headers }); - * ... - * - * ``` - * > Após a validação no interceptor, o parâmetro será removido do cabeçalho da requisição. - * - * O `Content-Type` deve ser `application/json` e a estrutura de mensagem recebida pelo serviço é: - * - totvs_messages: lista de mensagens de erro ou informativo resultante do serviço. - * - type: success, warning, error, e information; - * - code: título ou código da mensagem; - * - detail: detalhamento ou texto da mensagem. - * - * Ao importar o módulo `ThfModule` na aplicação, o thf-http-interceptor é automaticamente configurado sem a necessidade - * de qualquer configuração extra. - * - * Ao realizar requisições utilize o `HttpClient`, conforme exemplo abaixo: - * - * ``` - * import { HttpClient } from '\@angular/common/http'; - * - * ... - * - * \@Injectable() - * export class UserService { - * - * constructor(private http: HttpClient) { } - * - * getUsers() { - * return this.http.get('/api/users'); - * } - * - * ... - * - * } - * ``` - * - * @abstract - */ -var /** - * \@description - * - * O serviço Totvs Http Interceptor realiza o tratamento de requisições HTTP conforme o padrão do - * [**Guia de implementação das APIs TOTVS**](http://tdn.totvs.com/pages/releaseview.action?pageId=271660444) para adaptá-lo - * ao modelo do THF. - * - * Ao analisar o objeto totvs_messages retornado pela requisição, o serviço exibirá notificações com mensagens na tela. - * Os retornos de erros com códigos 4xx e 5xx são tratados automaticamente, sem a necessidade de incluir o totvs_messages. - * - * Também existe a possibilidade de não apresentar a notificação quando houver algum erro com códigos 4xx e 5xx, - * utilizando o parâmetro `X-Totvs-No-Error` que foi definido conforme o - * [**Guia de implementação das APIs TOTVS**](http://tdn.totvs.com/pages/releaseview.action?pageId=271660444) (em Cabeçalhos Customizados). - * O parâmetro `X-Totvs-No-Error` deve ser informado no cabeçalho da requisição com o valor `'true'` para funcionar corretamente, - * por exemplo: - * - * ``` - * ... - * const headers = { 'X-Totvs-No-Error': 'true' }; - * - * this.http.get(`/customers/1`, { headers: headers }); - * ... - * - * ``` - * > Após a validação no interceptor, o parâmetro será removido do cabeçalho da requisição. - * - * O `Content-Type` deve ser `application/json` e a estrutura de mensagem recebida pelo serviço é: - * - totvs_messages: lista de mensagens de erro ou informativo resultante do serviço. - * - type: success, warning, error, e information; - * - code: título ou código da mensagem; - * - detail: detalhamento ou texto da mensagem. - * - * Ao importar o módulo `ThfModule` na aplicação, o thf-http-interceptor é automaticamente configurado sem a necessidade - * de qualquer configuração extra. - * - * Ao realizar requisições utilize o `HttpClient`, conforme exemplo abaixo: - * - * ``` - * import { HttpClient } from '\@angular/common/http'; - * - * ... - * - * \@Injectable() - * export class UserService { - * - * constructor(private http: HttpClient) { } - * - * getUsers() { - * return this.http.get('/api/users'); - * } - * - * ... - * - * } - * ``` - * - * @abstract - */ -ThfHttpInterceptorBaseService = /** @class */ (function () { - function ThfHttpInterceptorBaseService(notification, dialog) { - this.notification = notification; - this.dialog = dialog; - this.notificationTypes = ['success', 'warning', 'error', 'information']; - } - /** - * @param {?} request - * @param {?} next - * @return {?} - */ - ThfHttpInterceptorBaseService.prototype.intercept = /** - * @param {?} request - * @param {?} next - * @return {?} - */ - function (request, next) { - var _this = this; - var /** @type {?} */ cloneRequest = request.clone(); - request = request.headers.has(NO_ERROR_HEADER_PARAM) ? this.cloneRequestWithoutNoErrorHeaderParam(request) : request; - return next.handle(request).do(function (response) { - if (response instanceof __WEBPACK_IMPORTED_MODULE_0__angular_common_http__["h" /* HttpResponse */]) { - _this.processResponse(response); - } - }, function (error) { - _this.processErrorResponse(error, cloneRequest); - }); - }; - /** - * @param {?} response - * @return {?} - */ - ThfHttpInterceptorBaseService.prototype.processResponse = /** - * @param {?} response - * @return {?} - */ - function (response) { - var _this = this; - if (response.body && response.body.totvs_messages) { - var /** @type {?} */ totvsMessages = response.body.totvs_messages; - if (totvsMessages instanceof Array) { - totvsMessages.forEach(function (totvsMessage) { - _this.showNotification(totvsMessage); - }); - } - else { - this.showNotification(totvsMessages); - } - } - }; - /** - * @param {?} response - * @param {?} request - * @return {?} - */ - ThfHttpInterceptorBaseService.prototype.processErrorResponse = /** - * @param {?} response - * @param {?} request - * @return {?} - */ - function (response, request) { - var /** @type {?} */ errorResponse = response.error; - var /** @type {?} */ hasNoErrorParam = this.hasNoErrorParam(request); - // not show the notification when has NoError parameter on header of request. - if (errorResponse && errorResponse.message && !hasNoErrorParam) { - this.showErrorNotification(errorResponse); - } - }; - /** - * @param {?} request - * @return {?} - */ - ThfHttpInterceptorBaseService.prototype.cloneRequestWithoutNoErrorHeaderParam = /** - * @param {?} request - * @return {?} - */ - function (request) { - return request && request.clone({ headers: request.headers.delete(NO_ERROR_HEADER_PARAM) }); - }; - /** - * @param {?} request - * @return {?} - */ - ThfHttpInterceptorBaseService.prototype.hasNoErrorParam = /** - * @param {?} request - * @return {?} - */ - function (request) { - var /** @type {?} */ noErrorParam = request && request.headers.get(NO_ERROR_HEADER_PARAM); - return noErrorParam && noErrorParam.toString().toLocaleLowerCase() === 'true'; - }; - /** - * @param {?} totvsMessage - * @return {?} - */ - ThfHttpInterceptorBaseService.prototype.showNotification = /** - * @param {?} totvsMessage - * @return {?} - */ - function (totvsMessage) { - if (this.notificationTypes.includes(totvsMessage.type)) { - this.notification[totvsMessage.type]({ message: totvsMessage.detail }); - } - }; - /** - * @param {?} errorResponse - * @return {?} - */ - ThfHttpInterceptorBaseService.prototype.showErrorNotification = /** - * @param {?} errorResponse - * @return {?} - */ - function (errorResponse) { - var /** @type {?} */ notificationAction = this.generateErrorNotificationAction(errorResponse); - this.notification.error({ - message: errorResponse.message, - orientation: __WEBPACK_IMPORTED_MODULE_1__services_thf_notification_thf_toaster_thf_toaster_orientation_enum__["a" /* ThfToasterOrientation */].Top, - actionLabel: notificationAction.label, - action: notificationAction.action - }); - }; - /** - * @param {?} errorResponse - * @return {?} - */ - ThfHttpInterceptorBaseService.prototype.generateErrorNotificationAction = /** - * @param {?} errorResponse - * @return {?} - */ - function (errorResponse) { - var /** @type {?} */ notificationAction; - var /** @type {?} */ notificationLabel; - var /** @type {?} */ notificationMessage = errorResponse.message.concat(errorResponse.detailedMessage); - if (errorResponse.details && errorResponse.details instanceof Array) { - errorResponse.details.forEach(function (detailError) { - notificationMessage += "\n" + detailError.message; - }); - } - if (errorResponse.helpUrl && !(errorResponse.detailedMessage || errorResponse.details)) { - notificationLabel = 'Ajuda'; - notificationAction = this.generateUrlHelpFunction(errorResponse.helpUrl); - } - else if (errorResponse.detailedMessage || errorResponse.details) { - notificationLabel = 'Detalhes'; - notificationAction = this.generateDialogDetailFunction(errorResponse, notificationMessage); - } - return { label: notificationLabel, action: notificationAction }; - }; - /** - * @param {?} helpUrl - * @return {?} - */ - ThfHttpInterceptorBaseService.prototype.generateUrlHelpFunction = /** - * @param {?} helpUrl - * @return {?} - */ - function (helpUrl) { - return function () { window.open(helpUrl, '_blank'); }; - }; - /** - * @param {?} errorResponse - * @param {?} notificationMessage - * @return {?} - */ - ThfHttpInterceptorBaseService.prototype.generateDialogDetailFunction = /** - * @param {?} errorResponse - * @param {?} notificationMessage - * @return {?} - */ - function (errorResponse, notificationMessage) { - var _this = this; - return function () { - _this.dialog.alert({ - title: errorResponse.code, - message: notificationMessage, - ok: errorResponse.helpUrl ? _this.generateUrlHelpFunction(errorResponse.helpUrl) : undefined - }); - }; - }; - return ThfHttpInterceptorBaseService; -}()); -/** - * \@description - * - * O serviço Totvs Http Interceptor realiza o tratamento de requisições HTTP conforme o padrão do - * [**Guia de implementação das APIs TOTVS**](http://tdn.totvs.com/pages/releaseview.action?pageId=271660444) para adaptá-lo - * ao modelo do THF. - * - * Ao analisar o objeto totvs_messages retornado pela requisição, o serviço exibirá notificações com mensagens na tela. - * Os retornos de erros com códigos 4xx e 5xx são tratados automaticamente, sem a necessidade de incluir o totvs_messages. - * - * Também existe a possibilidade de não apresentar a notificação quando houver algum erro com códigos 4xx e 5xx, - * utilizando o parâmetro `X-Totvs-No-Error` que foi definido conforme o - * [**Guia de implementação das APIs TOTVS**](http://tdn.totvs.com/pages/releaseview.action?pageId=271660444) (em Cabeçalhos Customizados). - * O parâmetro `X-Totvs-No-Error` deve ser informado no cabeçalho da requisição com o valor `'true'` para funcionar corretamente, - * por exemplo: - * - * ``` - * ... - * const headers = { 'X-Totvs-No-Error': 'true' }; - * - * this.http.get(`/customers/1`, { headers: headers }); - * ... - * - * ``` - * > Após a validação no interceptor, o parâmetro será removido do cabeçalho da requisição. - * - * O `Content-Type` deve ser `application/json` e a estrutura de mensagem recebida pelo serviço é: - * - totvs_messages: lista de mensagens de erro ou informativo resultante do serviço. - * - type: success, warning, error, e information; - * - code: título ou código da mensagem; - * - detail: detalhamento ou texto da mensagem. - * - * Ao importar o módulo `ThfModule` na aplicação, o thf-http-interceptor é automaticamente configurado sem a necessidade - * de qualquer configuração extra. - * - * Ao realizar requisições utilize o `HttpClient`, conforme exemplo abaixo: - * - * ``` - * import { HttpClient } from '\@angular/common/http'; - * - * ... - * - * \@Injectable() - * export class UserService { - * - * constructor(private http: HttpClient) { } - * - * getUsers() { - * return this.http.get('/api/users'); - * } - * - * ... - * - * } - * ``` - * - * @abstract - */ - -function ThfHttpInterceptorBaseService_tsickle_Closure_declarations() { - /** @type {?} */ - ThfHttpInterceptorBaseService.prototype.notificationTypes; - /** @type {?} */ - ThfHttpInterceptorBaseService.prototype.notification; - /** @type {?} */ - ThfHttpInterceptorBaseService.prototype.dialog; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/interceptors/thf-http-interceptor/thf-http-interceptor.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfHttpInterceptorModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_thf_dialog_thf_dialog_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_thf_notification_thf_notification_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-notification.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_http_interceptor_service__ = __webpack_require__("../../../../@totvs/thf-ui/interceptors/thf-http-interceptor/thf-http-interceptor.service.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - -var ThfHttpInterceptorModule = /** @class */ (function () { - function ThfHttpInterceptorModule() { - } - ThfHttpInterceptorModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - providers: [ - __WEBPACK_IMPORTED_MODULE_4__thf_http_interceptor_service__["a" /* ThfHttpInterceptorService */], - __WEBPACK_IMPORTED_MODULE_2__services_thf_dialog_thf_dialog_service__["a" /* ThfDialogService */], - __WEBPACK_IMPORTED_MODULE_3__services_thf_notification_thf_notification_service__["a" /* ThfNotificationService */], - { - provide: __WEBPACK_IMPORTED_MODULE_1__angular_common_http__["a" /* HTTP_INTERCEPTORS */], - useClass: __WEBPACK_IMPORTED_MODULE_4__thf_http_interceptor_service__["a" /* ThfHttpInterceptorService */], - multi: true - } - ] - },] }, - ]; - /** @nocollapse */ - ThfHttpInterceptorModule.ctorParameters = function () { return []; }; - return ThfHttpInterceptorModule; -}()); - -function ThfHttpInterceptorModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfHttpInterceptorModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfHttpInterceptorModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/interceptors/thf-http-interceptor/thf-http-interceptor.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfHttpInterceptorService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_http_interceptor_base_service__ = __webpack_require__("../../../../@totvs/thf-ui/interceptors/thf-http-interceptor/thf-http-interceptor-base.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_thf_notification_thf_notification_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-notification.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_thf_dialog_thf_dialog_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog.service.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsExtends ThfHttpInterceptorBaseService - * - * \@example - * - * - * - * - */ -var ThfHttpInterceptorService = /** @class */ (function (_super) { - __extends(ThfHttpInterceptorService, _super); - function ThfHttpInterceptorService(notification, dialog) { - return _super.call(this, notification, dialog) || this; - } - ThfHttpInterceptorService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, - ]; - /** @nocollapse */ - ThfHttpInterceptorService.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_2__services_thf_notification_thf_notification_service__["a" /* ThfNotificationService */], }, - { type: __WEBPACK_IMPORTED_MODULE_3__services_thf_dialog_thf_dialog_service__["a" /* ThfDialogService */], }, - ]; }; - return ThfHttpInterceptorService; -}(__WEBPACK_IMPORTED_MODULE_1__thf_http_interceptor_base_service__["a" /* ThfHttpInterceptorBaseService */])); - -function ThfHttpInterceptorService_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfHttpInterceptorService.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfHttpInterceptorService.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/pipes/pipes.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfPipesModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -var ThfPipesModule = /** @class */ (function () { - function ThfPipesModule() { - } - ThfPipesModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - declarations: [], - imports: [], - exports: [], - providers: [], - bootstrap: [] - },] }, - ]; - /** @nocollapse */ - ThfPipesModule.ctorParameters = function () { return []; }; - return ThfPipesModule; -}()); - -function ThfPipesModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfPipesModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfPipesModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/services.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfServicesModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_control_position_thf_control_position_module__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-control-position/thf-control-position.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_component_injector_thf_component_injector_module__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-component-injector/thf-component-injector.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_dialog_thf_dialog_module__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_notification_thf_notification_module__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-notification.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__thf_i18n_thf_i18n_pipe__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-i18n/thf-i18n.pipe.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - -var ThfServicesModule = /** @class */ (function () { - function ThfServicesModule() { - } - ThfServicesModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - declarations: [ - __WEBPACK_IMPORTED_MODULE_5__thf_i18n_thf_i18n_pipe__["a" /* ThfI18nPipe */] - ], - imports: [ - __WEBPACK_IMPORTED_MODULE_1__thf_control_position_thf_control_position_module__["a" /* ThfControlPositionModule */], - __WEBPACK_IMPORTED_MODULE_2__thf_component_injector_thf_component_injector_module__["a" /* ThfComponentInjectorModule */], - __WEBPACK_IMPORTED_MODULE_3__thf_dialog_thf_dialog_module__["a" /* ThfDialogModule */], - __WEBPACK_IMPORTED_MODULE_4__thf_notification_thf_notification_module__["a" /* ThfNotificationModule */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_1__thf_control_position_thf_control_position_module__["a" /* ThfControlPositionModule */], - __WEBPACK_IMPORTED_MODULE_2__thf_component_injector_thf_component_injector_module__["a" /* ThfComponentInjectorModule */], - __WEBPACK_IMPORTED_MODULE_3__thf_dialog_thf_dialog_module__["a" /* ThfDialogModule */], - __WEBPACK_IMPORTED_MODULE_4__thf_notification_thf_notification_module__["a" /* ThfNotificationModule */], - __WEBPACK_IMPORTED_MODULE_5__thf_i18n_thf_i18n_pipe__["a" /* ThfI18nPipe */] - ], - providers: [], - bootstrap: [] - },] }, - ]; - /** @nocollapse */ - ThfServicesModule.ctorParameters = function () { return []; }; - return ThfServicesModule; -}()); - -function ThfServicesModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfServicesModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfServicesModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-component-injector/thf-component-injector.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfComponentInjectorModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_component_injector_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-component-injector/thf-component-injector.service.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -var ThfComponentInjectorModule = /** @class */ (function () { - function ThfComponentInjectorModule() { - } - ThfComponentInjectorModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - declarations: [], - imports: [], - exports: [], - providers: [ - __WEBPACK_IMPORTED_MODULE_1__thf_component_injector_service__["a" /* ThfComponentInjectorService */] - ], - bootstrap: [] - },] }, - ]; - /** @nocollapse */ - ThfComponentInjectorModule.ctorParameters = function () { return []; }; - return ThfComponentInjectorModule; -}()); - -function ThfComponentInjectorModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfComponentInjectorModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfComponentInjectorModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-component-injector/thf-component-injector.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfComponentInjectorService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -var ThfComponentInjectorService = /** @class */ (function () { - function ThfComponentInjectorService(componentResolver, applicationRef, injector) { - this.componentResolver = componentResolver; - this.applicationRef = applicationRef; - this.injector = injector; - } - // Cria um dinamicamente no ApplicationRef - /** - * @param {?} component - * @return {?} - */ - ThfComponentInjectorService.prototype.createComponentInApplication = /** - * @param {?} component - * @return {?} - */ - function (component) { - var /** @type {?} */ componentRef = this.componentResolver.resolveComponentFactory(component).create(this.injector); - this.applicationRef.attachView(componentRef.hostView); - var /** @type {?} */ domElem = /** @type {?} */ ((/** @type {?} */ (componentRef.hostView)).rootNodes[0]); - document.body.appendChild(domElem); - return componentRef; - }; - // Destrói o componente e remove do ApplicationRef - /** - * @param {?} componentRef - * @return {?} - */ - ThfComponentInjectorService.prototype.destroyComponentInApplication = /** - * @param {?} componentRef - * @return {?} - */ - function (componentRef) { - this.applicationRef.detachView(componentRef.hostView); - componentRef.destroy(); - }; - ThfComponentInjectorService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, - ]; - /** @nocollapse */ - ThfComponentInjectorService.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["p" /* ComponentFactoryResolver */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["g" /* ApplicationRef */], }, - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["D" /* Injector */], }, - ]; }; - return ThfComponentInjectorService; -}()); - -function ThfComponentInjectorService_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfComponentInjectorService.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfComponentInjectorService.ctorParameters; - /** @type {?} */ - ThfComponentInjectorService.prototype.componentResolver; - /** @type {?} */ - ThfComponentInjectorService.prototype.applicationRef; - /** @type {?} */ - ThfComponentInjectorService.prototype.injector; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-control-position/thf-control-position.constants.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return THF_CONTROL_POSITIONS; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -// Array de posições. -var /** @type {?} */ THF_CONTROL_POSITIONS = [ - 'right', - 'right-top', - 'right-bottom', - 'top', - 'top-left', - 'top-right', - 'left', - 'left-top', - 'left-bottom', - 'bottom', - 'bottom-left', - 'bottom-right' -]; - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-control-position/thf-control-position.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfControlPositionModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_control_position_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-control-position/thf-control-position.service.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@description - * - * Módulo do serviço thf-control-position. - */ -var ThfControlPositionModule = /** @class */ (function () { - function ThfControlPositionModule() { - } - ThfControlPositionModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - declarations: [], - imports: [], - exports: [], - providers: [ - __WEBPACK_IMPORTED_MODULE_1__thf_control_position_service__["a" /* ThfControlPositionService */] - ], - bootstrap: [] - },] }, - ]; - /** @nocollapse */ - ThfControlPositionModule.ctorParameters = function () { return []; }; - return ThfControlPositionModule; -}()); - -function ThfControlPositionModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfControlPositionModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfControlPositionModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-control-position/thf-control-position.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfControlPositionService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@docsPrivate - * \@description - * - * Serviço responsável por gerenciar as posições de um elemento em relação a um elemento alvo. Ele pode receber as - * seguintes posições: - * - * - `right`: Posiciona o elemento no lado direito do componente alvo. - * - `right-bottom`: Posiciona o elemento no lado direito inferior do componente alvo. - * - `right-top`: Posiciona o elemento no lado direito superior do componente alvo. - * - `bottom`: Posiciona o elemento abaixo do componente alvo. - * - `bottom-left`: Posiciona o elemento abaixo e à esquerda do componente alvo. - * - `bottom-right`: Posiciona o elemento abaixo e à direita do componente alvo. - * - `left`: Posiciona o elemento no lado esquerdo do componente alvo. - * - `left-top`: Posiciona o elemento no lado esquerdo superior do componente alvo. - * - `left-bottom`: Posiciona o elemento no lado esquerdo inferior do componente alvo. - * - `top`: Posiciona o elemento acima do componente alvo. - * - `top-right`: Posiciona o elemento acima e à direita do componente alvo. - * - `top-left`: Posiciona o elemento acima e à esquerda do componente alvo. - * - * Caso o elemento não caiba na tela na posição indicada ele será rotacionado automaticamente para se adequar, - * inicialmente no lado definido como padrão e em seguida seguindo o sentido horário. - */ -var ThfControlPositionService = /** @class */ (function () { - function ThfControlPositionService() { - this.offsetArrow = 12; - this.differenceDiagonalToWidthArrow = 3; - } - /** - * @param {?} element - * @param {?} elementOffset - * @param {?} targetElement - * @return {?} - */ - ThfControlPositionService.prototype.setElements = /** - * @param {?} element - * @param {?} elementOffset - * @param {?} targetElement - * @return {?} - */ - function (element, elementOffset, targetElement) { - this.element = element; - this.elementOffset = elementOffset; - this.targetElement = targetElement; - }; - /** - * @return {?} - */ - ThfControlPositionService.prototype.getArrowDirection = /** - * @return {?} - */ - function () { - return this.arrowDirection; - }; - /** - * @param {?} position - * @return {?} - */ - ThfControlPositionService.prototype.adjustPosition = /** - * @param {?} position - * @return {?} - */ - function (position) { - var /** @type {?} */ mainSidesCount = 0; - while (mainSidesCount++ < 4) { - this.setElementPosition(position); - if (this.overflowMain(this.getMainPosition(position))) { - position = this.nextMainPosition(this.getMainPosition(position)); - continue; - } - else { - if (this.overflowAllSides(position)) { - position = this.verifySubPositions(position); - if (!position) { - return; - } - position = this.nextPosition(position); - this.setElementPosition(position); - } - else { - this.setElementPosition(position); - return; - } - } - } - }; - /** - * @param {?} position - * @return {?} - */ - ThfControlPositionService.prototype.verifySubPositions = /** - * @param {?} position - * @return {?} - */ - function (position) { - if (position.indexOf('-') > -1) { - position = position.substring(0, position.indexOf('-')); - this.setElementPosition(position); - } - var /** @type {?} */ align = 0; - while (align++ < 3) { - if (this.overflowAllSides(position)) { - position = this.nextPosition(position); - this.setElementPosition(position); - } - else { - return null; - } - } - }; - /** - * @param {?} position - * @return {?} - */ - ThfControlPositionService.prototype.getMainPosition = /** - * @param {?} position - * @return {?} - */ - function (position) { - return (position.indexOf('-') > -1) ? position.substring(0, position.indexOf('-')) : position; - }; - /** - * @param {?} position - * @return {?} - */ - ThfControlPositionService.prototype.overflowMain = /** - * @param {?} position - * @return {?} - */ - function (position) { - var /** @type {?} */ overflows = this.getOverflows(); - switch (position) { - case 'top': return overflows.top; - case 'right': return overflows.right; - case 'bottom': return overflows.bottom; - case 'left': return overflows.left; - } - }; - /** - * @param {?} position - * @return {?} - */ - ThfControlPositionService.prototype.overflowAllSides = /** - * @param {?} position - * @return {?} - */ - function (position) { - var /** @type {?} */ overflows = this.getOverflows(); - switch (position) { - case 'top': return overflows.top || overflows.right || overflows.left; - case 'top-right': return overflows.top || overflows.right; - case 'top-left': return overflows.top || overflows.left; - case 'right': return overflows.right || overflows.top || overflows.bottom; - case 'right-top': return overflows.right || overflows.top; - case 'right-bottom': return overflows.right || overflows.bottom; - case 'bottom': return overflows.bottom || overflows.right || overflows.left; - case 'bottom-right': return overflows.bottom || overflows.right; - case 'bottom-left': return overflows.bottom || overflows.left; - case 'left': return overflows.left || overflows.top || overflows.bottom; - case 'left-top': return overflows.left || overflows.top; - case 'left-bottom': return overflows.left || overflows.bottom; - } - }; - /** - * @return {?} - */ - ThfControlPositionService.prototype.getOverflows = /** - * @return {?} - */ - function () { - var /** @type {?} */ sizesAndPositions = this.getSizesAndPositions(); - return { - right: (sizesAndPositions.element.right > sizesAndPositions.window.innerWidth + sizesAndPositions.window.scrollX), - top: (sizesAndPositions.element.top <= 0), - left: (sizesAndPositions.element.left <= 0), - bottom: (sizesAndPositions.element.bottom > sizesAndPositions.window.innerHeight + sizesAndPositions.window.scrollY) - }; - }; - /** - * @param {?} position - * @return {?} - */ - ThfControlPositionService.prototype.nextMainPosition = /** - * @param {?} position - * @return {?} - */ - function (position) { - switch (position) { - case 'top': return 'right'; - case 'right': return 'bottom'; - case 'bottom': return 'left'; - case 'left': return 'top'; - } - }; - /** - * @param {?} position - * @return {?} - */ - ThfControlPositionService.prototype.nextPosition = /** - * @param {?} position - * @return {?} - */ - function (position) { - switch (position) { - case 'top': return 'top-right'; - case 'top-right': return 'top-left'; - case 'top-left': return 'right'; - case 'right': return 'right-bottom'; - case 'right-bottom': return 'right-top'; - case 'right-top': return 'bottom'; - case 'bottom': return 'bottom-left'; - case 'bottom-left': return 'bottom-right'; - case 'bottom-right': return 'left'; - case 'left': return 'left-top'; - case 'left-top': return 'left-bottom'; - case 'left-bottom': return 'top'; - } - }; - /** - * @param {?} position - * @return {?} - */ - ThfControlPositionService.prototype.setElementPosition = /** - * @param {?} position - * @return {?} - */ - function (position) { - var /** @type {?} */ sizesAndPositions = this.getSizesAndPositions(); - switch (position) { - case 'top': - this.setTopPositions((sizesAndPositions.element.width / 2), sizesAndPositions); - break; - case 'top-left': - this.setTopPositions((sizesAndPositions.element.width - this.offsetArrow - this.differenceDiagonalToWidthArrow), sizesAndPositions); - break; - case 'top-right': - this.setTopPositions((this.offsetArrow + this.differenceDiagonalToWidthArrow), sizesAndPositions); - break; - case 'right': - this.setRightPositions((sizesAndPositions.element.height / 2), sizesAndPositions); - break; - case 'right-top': - this.setRightPositions((sizesAndPositions.element.height - this.offsetArrow - this.differenceDiagonalToWidthArrow), sizesAndPositions); - break; - case 'right-bottom': - this.setRightPositions(this.offsetArrow, sizesAndPositions); - break; - case 'bottom': - this.setBottomPositions((sizesAndPositions.element.width / 2), sizesAndPositions); - break; - case 'bottom-right': - this.setBottomPositions((this.offsetArrow + this.differenceDiagonalToWidthArrow), sizesAndPositions); - break; - case 'bottom-left': - this.setBottomPositions((sizesAndPositions.element.width - this.offsetArrow - this.differenceDiagonalToWidthArrow), sizesAndPositions); - break; - case 'left': - this.setLeftPositions((sizesAndPositions.element.height / 2), sizesAndPositions); - break; - case 'left-bottom': - this.setLeftPositions(this.offsetArrow, sizesAndPositions); - break; - case 'left-top': - this.setLeftPositions((sizesAndPositions.element.height - this.offsetArrow), sizesAndPositions); - break; - } - this.arrowDirection = this.setArrowDirection(position); - }; - /** - * @param {?} displacement - * @param {?} sizesAndPositions - * @return {?} - */ - ThfControlPositionService.prototype.setTopPositions = /** - * @param {?} displacement - * @param {?} sizesAndPositions - * @return {?} - */ - function (displacement, sizesAndPositions) { - this.element.style.top = sizesAndPositions.target.top - sizesAndPositions.element.height - this.elementOffset + 'px'; - this.element.style.left = sizesAndPositions.target.left + (sizesAndPositions.target.width / 2) - displacement + 'px'; - }; - /** - * @param {?} displacement - * @param {?} sizesAndPositions - * @return {?} - */ - ThfControlPositionService.prototype.setRightPositions = /** - * @param {?} displacement - * @param {?} sizesAndPositions - * @return {?} - */ - function (displacement, sizesAndPositions) { - this.element.style.top = sizesAndPositions.target.top - displacement + (sizesAndPositions.target.height / 2) + 'px'; - this.element.style.left = sizesAndPositions.target.right + this.elementOffset + 'px'; - }; - /** - * @param {?} displacement - * @param {?} sizesAndPositions - * @return {?} - */ - ThfControlPositionService.prototype.setBottomPositions = /** - * @param {?} displacement - * @param {?} sizesAndPositions - * @return {?} - */ - function (displacement, sizesAndPositions) { - this.element.style.top = sizesAndPositions.target.bottom + this.elementOffset + 'px'; - this.element.style.left = sizesAndPositions.target.left + (sizesAndPositions.target.width / 2) - displacement + 'px'; - }; - /** - * @param {?} displacement - * @param {?} sizesAndPositions - * @return {?} - */ - ThfControlPositionService.prototype.setLeftPositions = /** - * @param {?} displacement - * @param {?} sizesAndPositions - * @return {?} - */ - function (displacement, sizesAndPositions) { - this.element.style.top = sizesAndPositions.target.top - displacement + (sizesAndPositions.target.height / 2) + 'px'; - this.element.style.left = sizesAndPositions.target.left - sizesAndPositions.element.width - this.elementOffset + 'px'; - }; - /** - * @param {?} elementPosition - * @return {?} - */ - ThfControlPositionService.prototype.setArrowDirection = /** - * @param {?} elementPosition - * @return {?} - */ - function (elementPosition) { - switch (elementPosition) { - case 'top': return 'bottom'; - case 'top-left': return 'bottom-right'; - case 'top-right': return 'bottom-left'; - case 'right': return 'left'; - case 'right-top': return 'left-bottom'; - case 'right-bottom': return 'left-top'; - case 'bottom': return 'top'; - case 'bottom-right': return 'top-left'; - case 'bottom-left': return 'top-right'; - case 'left': return 'right'; - case 'left-bottom': return 'right-top'; - case 'left-top': return 'right-bottom'; - } - }; - /** - * @return {?} - */ - ThfControlPositionService.prototype.getSizesAndPositions = /** - * @return {?} - */ - function () { - var /** @type {?} */ element = this.element.nativeElement ? this.element.nativeElement : this.element; - return { - window: { - scrollY: window.scrollY, - scrollX: window.scrollX, - innerWidth: window.innerWidth, - innerHeight: window.innerHeight - }, - element: element.getBoundingClientRect(), - target: this.targetElement ? this.targetElement.nativeElement.getBoundingClientRect() : { top: 0, bottom: 0, right: 0, left: 0 } - }; - }; - ThfControlPositionService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, - ]; - /** @nocollapse */ - ThfControlPositionService.ctorParameters = function () { return []; }; - return ThfControlPositionService; -}()); - -function ThfControlPositionService_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfControlPositionService.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfControlPositionService.ctorParameters; - /** @type {?} */ - ThfControlPositionService.prototype.element; - /** @type {?} */ - ThfControlPositionService.prototype.targetElement; - /** @type {?} */ - ThfControlPositionService.prototype.elementOffset; - /** @type {?} */ - ThfControlPositionService.prototype.arrowDirection; - /** @type {?} */ - ThfControlPositionService.prototype.offsetArrow; - /** @type {?} */ - ThfControlPositionService.prototype.differenceDiagonalToWidthArrow; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog-base.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDialogBaseService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__thf_dialog_enum__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog.enum.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - -/** - * \@description - * - * O thf-dialog é um serviço para exibição de caixas de diálogo, é possível customiza-los passando alguns parâmetros de acordo com a - * necessidade do desenvolvedor. - * @abstract - */ -var /** - * \@description - * - * O thf-dialog é um serviço para exibição de caixas de diálogo, é possível customiza-los passando alguns parâmetros de acordo com a - * necessidade do desenvolvedor. - * @abstract - */ -ThfDialogBaseService = /** @class */ (function () { - function ThfDialogBaseService() { - } - /** Exibe um diálogo de confirmação, é possível definir ações para as opções de confirmação e cancelamento. */ - /** - * Exibe um diálogo de confirmação, é possível definir ações para as opções de confirmação e cancelamento. - * @param {?} confirmOptions - * @return {?} - */ - ThfDialogBaseService.prototype.confirm = /** - * Exibe um diálogo de confirmação, é possível definir ações para as opções de confirmação e cancelamento. - * @param {?} confirmOptions - * @return {?} - */ - function (confirmOptions) { - this.openDialog(__WEBPACK_IMPORTED_MODULE_0__thf_dialog_enum__["a" /* ThfDialogType */].Confirm, confirmOptions); - }; - /** Exibe um diálogo de alerta. */ - /** - * Exibe um diálogo de alerta. - * @param {?} alertOptions - * @return {?} - */ - ThfDialogBaseService.prototype.alert = /** - * Exibe um diálogo de alerta. - * @param {?} alertOptions - * @return {?} - */ - function (alertOptions) { - this.openDialog(__WEBPACK_IMPORTED_MODULE_0__thf_dialog_enum__["a" /* ThfDialogType */].Alert, alertOptions); - }; - return ThfDialogBaseService; -}()); -/** - * \@description - * - * O thf-dialog é um serviço para exibição de caixas de diálogo, é possível customiza-los passando alguns parâmetros de acordo com a - * necessidade do desenvolvedor. - * @abstract - */ - -function ThfDialogBaseService_tsickle_Closure_declarations() { - /** - * @abstract - * @param {?} dialogType - * @param {?} dialogOptions - * @return {?} - */ - ThfDialogBaseService.prototype.openDialog = function (dialogType, dialogOptions) { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDialogComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_dialog_enum__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog.enum.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_thf_modal_thf_modal_component__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-modal/thf-modal.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -/** - * \@docsPrivate - * - * \@description - * - * Componente que serve como container do thf-dialog.service - */ -var ThfDialogComponent = /** @class */ (function () { - function ThfDialogComponent() { - // Objeto primary do thfModal - this.primaryAction = { label: 'ok', action: function () { } }; - } - /** - * @return {?} - */ - ThfDialogComponent.prototype.ngOnInit = /** - * @return {?} - */ - function () { - var _this = this; - this.thfModal.onXClosed.subscribe(function (close) { return _this.destroy(); }); - }; - // Fecha o thfModal - /** - * @return {?} - */ - ThfDialogComponent.prototype.close = /** - * @return {?} - */ - function () { - this.thfModal.close(); - this.destroy(); - }; - /** - * @return {?} - */ - ThfDialogComponent.prototype.destroy = /** - * @return {?} - */ - function () { - if (this.componentRef) { - this.componentRef.destroy(); - } - }; - // Insere os valores recebidos de this.open para o thfModal - /** - * @param {?=} primaryLabel - * @param {?=} primaryAction - * @param {?=} secondaryLabel - * @param {?=} secondaryAction - * @return {?} - */ - ThfDialogComponent.prototype.configDialog = /** - * @param {?=} primaryLabel - * @param {?=} primaryAction - * @param {?=} secondaryLabel - * @param {?=} secondaryAction - * @return {?} - */ - function (primaryLabel, primaryAction, secondaryLabel, secondaryAction) { - var _this = this; - this.primaryAction = { - label: primaryLabel, - action: function () { - if (primaryAction) { - primaryAction(); - } - _this.close(); - } - }; - if (secondaryLabel) { - this.secondaryAction = { - label: secondaryLabel, - action: function () { - if (secondaryAction) { - secondaryAction(); - } - _this.close(); - } - }; - } - }; - // Insere os valores recebidos de thf-dialog.service de acordo com o tipo de diálago solicitado - /** - * @param {?} dialogOptions - * @param {?} dialogType - * @param {?=} componentRef - * @return {?} - */ - ThfDialogComponent.prototype.open = /** - * @param {?} dialogOptions - * @param {?} dialogType - * @param {?=} componentRef - * @return {?} - */ - function (dialogOptions, dialogType, componentRef) { - this.title = dialogOptions.title; - this.message = dialogOptions.message; - this.componentRef = componentRef; - switch (dialogType) { - case __WEBPACK_IMPORTED_MODULE_1__thf_dialog_enum__["a" /* ThfDialogType */].Confirm: { - this.configDialog('Confirmar', (/** @type {?} */ (dialogOptions)).confirm, 'Cancelar', (/** @type {?} */ (dialogOptions)).cancel); - break; - } - case __WEBPACK_IMPORTED_MODULE_1__thf_dialog_enum__["a" /* ThfDialogType */].Alert: { - this.configDialog('Ok', (/** @type {?} */ (dialogOptions)).ok); - break; - } - } - this.thfModal.open(); - }; - ThfDialogComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ template: " {{ message }} " - },] }, - ]; - /** @nocollapse */ - ThfDialogComponent.ctorParameters = function () { return []; }; - ThfDialogComponent.propDecorators = { - "thfModal": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: [__WEBPACK_IMPORTED_MODULE_2__components_thf_modal_thf_modal_component__["a" /* ThfModalComponent */],] },], - }; - return ThfDialogComponent; -}()); - -function ThfDialogComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDialogComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDialogComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfDialogComponent.propDecorators; - /** @type {?} */ - ThfDialogComponent.prototype.thfModal; - /** @type {?} */ - ThfDialogComponent.prototype.title; - /** @type {?} */ - ThfDialogComponent.prototype.message; - /** @type {?} */ - ThfDialogComponent.prototype.primaryAction; - /** @type {?} */ - ThfDialogComponent.prototype.secondaryAction; - /** @type {?} */ - ThfDialogComponent.prototype.componentRef; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog.enum.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDialogType; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** @enum {number} */ -var ThfDialogType = { - // Enum para alert - Alert: 0, - // Enum para confirm - Confirm: 1, -}; - -ThfDialogType[ThfDialogType.Alert] = "Alert"; -ThfDialogType[ThfDialogType.Confirm] = "Confirm"; - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDialogModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_thf_modal_thf_modal_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/thf-modal/thf-modal.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_dialog_component__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_dialog_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog.service.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -var ThfDialogModule = /** @class */ (function () { - function ThfDialogModule() { - } - ThfDialogModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - declarations: [ - __WEBPACK_IMPORTED_MODULE_2__thf_dialog_component__["a" /* ThfDialogComponent */] - ], - imports: [ - __WEBPACK_IMPORTED_MODULE_1__components_thf_modal_thf_modal_module__["a" /* ThfModalModule */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_2__thf_dialog_component__["a" /* ThfDialogComponent */] - ], - entryComponents: [ - __WEBPACK_IMPORTED_MODULE_2__thf_dialog_component__["a" /* ThfDialogComponent */] - ], - providers: [ - __WEBPACK_IMPORTED_MODULE_3__thf_dialog_service__["a" /* ThfDialogService */] - ] - },] }, - ]; - /** @nocollapse */ - ThfDialogModule.ctorParameters = function () { return []; }; - return ThfDialogModule; -}()); - -function ThfDialogModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDialogModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDialogModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfDialogService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_component_injector_thf_component_injector_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-component-injector/thf-component-injector.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_dialog_base_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog-base.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_dialog_component__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-dialog/thf-dialog.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -/** - * \@docsExtends ThfDialogBaseService - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfDialogService = /** @class */ (function (_super) { - __extends(ThfDialogService, _super); - function ThfDialogService(thfComponentInjector) { - var _this = _super.call(this) || this; - _this.thfComponentInjector = thfComponentInjector; - return _this; - } - /** - * @param {?} dialogType - * @param {?} dialogOptions - * @return {?} - */ - ThfDialogService.prototype.openDialog = /** - * @param {?} dialogType - * @param {?} dialogOptions - * @return {?} - */ - function (dialogType, dialogOptions) { - var /** @type {?} */ componentRef = this.thfComponentInjector.createComponentInApplication(__WEBPACK_IMPORTED_MODULE_3__thf_dialog_component__["a" /* ThfDialogComponent */]); - componentRef.changeDetectorRef.detectChanges(); - componentRef.instance.open(dialogOptions, dialogType, componentRef); - }; - ThfDialogService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, - ]; - /** @nocollapse */ - ThfDialogService.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__thf_component_injector_thf_component_injector_service__["a" /* ThfComponentInjectorService */], }, - ]; }; - return ThfDialogService; -}(__WEBPACK_IMPORTED_MODULE_2__thf_dialog_base_service__["a" /* ThfDialogBaseService */])); - -function ThfDialogService_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfDialogService.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfDialogService.ctorParameters; - /** @type {?} */ - ThfDialogService.prototype.thfComponentInjector; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-i18n/thf-i18n-base.pipe.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfI18nBasePipe; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** - * \@description - * - * O pipe thf-i18n é responsável por tratar literais parâmetrizadas, dando mais flexibilidade as literais de tradução. - * O número de parâmetros inseridos nas literais deve coincidir com a quantia de parâmetros passados por parâmetro, - * os parâmetros serão substituidos de acordo com a ordem informada. - * - * Para inserir um parâmetro em uma literal, o mesmo deverá ser inserido entre chaves dentro da literal e posicionado - * de acordo como deve ser exibido após a sua transformação. - * - * ``` - * const i18nPT = { - * pagination: 'Página {1} de {2} páginas.', - * totalPages: 'Total de {totalPages} encontradas.' - * }; - * ``` - * - * É possível passar um valor ou um array de valores para o pipe, caso seja passado um array, os valores devem obedecer a ordem - * informada na literal. - * - * ``` - * {{ i18nPT.pagination | thfI18n:[1,10] }} - * {{ i18nPT.totalPages | thfI18n:10 }} - * ``` - */ -var /** - * \@description - * - * O pipe thf-i18n é responsável por tratar literais parâmetrizadas, dando mais flexibilidade as literais de tradução. - * O número de parâmetros inseridos nas literais deve coincidir com a quantia de parâmetros passados por parâmetro, - * os parâmetros serão substituidos de acordo com a ordem informada. - * - * Para inserir um parâmetro em uma literal, o mesmo deverá ser inserido entre chaves dentro da literal e posicionado - * de acordo como deve ser exibido após a sua transformação. - * - * ``` - * const i18nPT = { - * pagination: 'Página {1} de {2} páginas.', - * totalPages: 'Total de {totalPages} encontradas.' - * }; - * ``` - * - * É possível passar um valor ou um array de valores para o pipe, caso seja passado um array, os valores devem obedecer a ordem - * informada na literal. - * - * ``` - * {{ i18nPT.pagination | thfI18n:[1,10] }} - * {{ i18nPT.totalPages | thfI18n:10 }} - * ``` - */ -ThfI18nBasePipe = /** @class */ (function () { - function ThfI18nBasePipe() { - } - /** - * @param {?} value - * @param {?} args - * @return {?} - */ - ThfI18nBasePipe.prototype.transform = /** - * @param {?} value - * @param {?} args - * @return {?} - */ - function (value, args) { - if (!value) { - return ''; - } - if (!(args instanceof Array)) { - args = [args]; - } - for (var _i = 0, args_1 = args; _i < args_1.length; _i++) { - var arg = args_1[_i]; - value = value.replace(/(\{\w*\})+/, arg); - } - return value; - }; - return ThfI18nBasePipe; -}()); -/** - * \@description - * - * O pipe thf-i18n é responsável por tratar literais parâmetrizadas, dando mais flexibilidade as literais de tradução. - * O número de parâmetros inseridos nas literais deve coincidir com a quantia de parâmetros passados por parâmetro, - * os parâmetros serão substituidos de acordo com a ordem informada. - * - * Para inserir um parâmetro em uma literal, o mesmo deverá ser inserido entre chaves dentro da literal e posicionado - * de acordo como deve ser exibido após a sua transformação. - * - * ``` - * const i18nPT = { - * pagination: 'Página {1} de {2} páginas.', - * totalPages: 'Total de {totalPages} encontradas.' - * }; - * ``` - * - * É possível passar um valor ou um array de valores para o pipe, caso seja passado um array, os valores devem obedecer a ordem - * informada na literal. - * - * ``` - * {{ i18nPT.pagination | thfI18n:[1,10] }} - * {{ i18nPT.totalPages | thfI18n:10 }} - * ``` - */ - - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-i18n/thf-i18n.pipe.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfI18nPipe; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_i18n_base_pipe__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-i18n/thf-i18n-base.pipe.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@docsExtends ThfI18nBasePipe - * - * \@example - * - * - * - * - * - * - */ -var ThfI18nPipe = /** @class */ (function (_super) { - __extends(ThfI18nPipe, _super); - function ThfI18nPipe() { - return _super !== null && _super.apply(this, arguments) || this; - } - ThfI18nPipe.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["U" /* Pipe */], args: [{ - name: 'thfI18n' - },] }, - ]; - /** @nocollapse */ - ThfI18nPipe.ctorParameters = function () { return []; }; - return ThfI18nPipe; -}(__WEBPACK_IMPORTED_MODULE_1__thf_i18n_base_pipe__["a" /* ThfI18nBasePipe */])); - -function ThfI18nPipe_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfI18nPipe.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfI18nPipe.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-notification/thf-notification-base.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfNotificationBaseService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__thf_toaster_thf_toaster_orientation_enum__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-toaster/thf-toaster-orientation.enum.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_toaster_thf_toaster_type_enum__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-toaster/thf-toaster-type.enum.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - -/** - * \@description - * - * Serviço responsável por emitir as notificações em uma página. São disponibilizados os métodos de: - * - * - success, - * - warning, - * - error, - * - information. - * - * Cada um destes métodos recebe como parâmetro o objeto "ThfNotification" que contém os dados da mensagem e o - * objeto ViewContainerRef que é a representação do container do componente onde será criada a notificação. - * - * Estas notificações serão exibidas durante 10 segundos, após este tempo a mesma é removida automaticamente. - * @abstract - */ -var /** - * \@description - * - * Serviço responsável por emitir as notificações em uma página. São disponibilizados os métodos de: - * - * - success, - * - warning, - * - error, - * - information. - * - * Cada um destes métodos recebe como parâmetro o objeto "ThfNotification" que contém os dados da mensagem e o - * objeto ViewContainerRef que é a representação do container do componente onde será criada a notificação. - * - * Estas notificações serão exibidas durante 10 segundos, após este tempo a mesma é removida automaticamente. - * @abstract - */ -ThfNotificationBaseService = /** @class */ (function () { - function ThfNotificationBaseService() { - // Array responsável por guardar a instância de thf-toaster's superiores. - this.stackTop = []; - // Array responsável por guardar a instância de thf-toaster's inferiores. - this.stackBottom = []; - // Duração do toaster ativo. - this.durationToaster = 10000; - } - /** - * Emite uma notificação de sucesso. - * - * @param {?} notification {ThfNotification | string} Objeto com os dados da notificação ou somente a string com a mensagem da notificação. - * @return {?} - */ - ThfNotificationBaseService.prototype.success = /** - * Emite uma notificação de sucesso. - * - * @param {?} notification {ThfNotification | string} Objeto com os dados da notificação ou somente a string com a mensagem da notificação. - * @return {?} - */ - function (notification) { - this.createToaster(this.buildToaster(notification, __WEBPACK_IMPORTED_MODULE_1__thf_toaster_thf_toaster_type_enum__["a" /* ThfToasterType */].Success)); - }; - /** - * Emite uma notificação de atenção. - * - * @param {?} notification {ThfNotification | string} Objeto com os dados da notificação ou somente a string com a mensagem da notificação - * @return {?} - */ - ThfNotificationBaseService.prototype.warning = /** - * Emite uma notificação de atenção. - * - * @param {?} notification {ThfNotification | string} Objeto com os dados da notificação ou somente a string com a mensagem da notificação - * @return {?} - */ - function (notification) { - this.createToaster(this.buildToaster(notification, __WEBPACK_IMPORTED_MODULE_1__thf_toaster_thf_toaster_type_enum__["a" /* ThfToasterType */].Warning)); - }; - /** - * Emite uma notificação de erro. - * - * @param {?} notification {ThfNotification | string} Objeto com os dados da notificação ou somente a string com a mensagem da notificação - * @return {?} - */ - ThfNotificationBaseService.prototype.error = /** - * Emite uma notificação de erro. - * - * @param {?} notification {ThfNotification | string} Objeto com os dados da notificação ou somente a string com a mensagem da notificação - * @return {?} - */ - function (notification) { - this.createToaster(this.buildToaster(notification, __WEBPACK_IMPORTED_MODULE_1__thf_toaster_thf_toaster_type_enum__["a" /* ThfToasterType */].Error)); - }; - /** - * Emite uma notificação de informação. - * - * @param {?} notification {ThfNotification | string} Objeto com os dados da notificação ou somente a string com a mensagem da notificação - * @return {?} - */ - ThfNotificationBaseService.prototype.information = /** - * Emite uma notificação de informação. - * - * @param {?} notification {ThfNotification | string} Objeto com os dados da notificação ou somente a string com a mensagem da notificação - * @return {?} - */ - function (notification) { - this.createToaster(this.buildToaster(notification, __WEBPACK_IMPORTED_MODULE_1__thf_toaster_thf_toaster_type_enum__["a" /* ThfToasterType */].Information)); - }; - /** - * \@docsPrivate - * - * Cria um objeto do tipo ThfToaster de acordo o tipo. - * - * @param {?} notification {ThfNotification | string} Objeto ThfNotification com os dados da notificação - * @param {?} type - * @return {?} - */ - ThfNotificationBaseService.prototype.buildToaster = /** - * \@docsPrivate - * - * Cria um objeto do tipo ThfToaster de acordo o tipo. - * - * @param {?} notification {ThfNotification | string} Objeto ThfNotification com os dados da notificação - * @param {?} type - * @return {?} - */ - function (notification, type) { - var _this = this; - var /** @type {?} */ index = 0; - var /** @type {?} */ orientation; - if ((/** @type {?} */ (notification)).orientation === undefined || - (/** @type {?} */ (notification)).orientation === __WEBPACK_IMPORTED_MODULE_0__thf_toaster_thf_toaster_orientation_enum__["a" /* ThfToasterOrientation */].Top) { - index = this.stackTop.length; - orientation = __WEBPACK_IMPORTED_MODULE_0__thf_toaster_thf_toaster_orientation_enum__["a" /* ThfToasterOrientation */].Top; - } - else { - index = this.stackBottom.length; - orientation = __WEBPACK_IMPORTED_MODULE_0__thf_toaster_thf_toaster_orientation_enum__["a" /* ThfToasterOrientation */].Bottom; - } - var /** @type {?} */ toaster = { - componentRef: undefined, - message: (/** @type {?} */ (notification)).message || /** @type {?} */ (notification), - type: type, - orientation: orientation, - action: (/** @type {?} */ (notification)).action, - actionLabel: (/** @type {?} */ (notification)).actionLabel, - position: index - }; - if ((/** @type {?} */ (notification)).action) { - toaster.action = function (param) { - (/** @type {?} */ (notification)).action(); - _this.destroyToaster(param.componentRef); - }; - } - return toaster; - }; - return ThfNotificationBaseService; -}()); -/** - * \@description - * - * Serviço responsável por emitir as notificações em uma página. São disponibilizados os métodos de: - * - * - success, - * - warning, - * - error, - * - information. - * - * Cada um destes métodos recebe como parâmetro o objeto "ThfNotification" que contém os dados da mensagem e o - * objeto ViewContainerRef que é a representação do container do componente onde será criada a notificação. - * - * Estas notificações serão exibidas durante 10 segundos, após este tempo a mesma é removida automaticamente. - * @abstract - */ - -function ThfNotificationBaseService_tsickle_Closure_declarations() { - /** @type {?} */ - ThfNotificationBaseService.prototype.stackTop; - /** @type {?} */ - ThfNotificationBaseService.prototype.stackBottom; - /** @type {?} */ - ThfNotificationBaseService.prototype.durationToaster; - /** - * \@docsPrivate - * - * Método responsável por criar o thf-toaster. - * - * @abstract - * @param {?} toaster {ThfToaster} Objeto contendo as informações do toaster. - * @return {?} - */ - ThfNotificationBaseService.prototype.createToaster = function (toaster) { }; - /** - * \@docsPrivate - * - * Método responsável por destruir o thf-toaster. - * - * @abstract - * @param {?} toaster {ComponentRef} Número da posição ou instancia do toaster a ser destruído. - * @return {?} - */ - ThfNotificationBaseService.prototype.destroyToaster = function (toaster) { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-notification/thf-notification.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfNotificationModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__("../../../common/esm5/common.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_toaster_thf_toaster_component__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-toaster/thf-toaster.component.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - -var ThfNotificationModule = /** @class */ (function () { - function ThfNotificationModule() { - } - ThfNotificationModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - declarations: [ - __WEBPACK_IMPORTED_MODULE_2__thf_toaster_thf_toaster_component__["a" /* ThfToasterComponent */] - ], - imports: [ - __WEBPACK_IMPORTED_MODULE_1__angular_common__["b" /* CommonModule */] - ], - exports: [], - entryComponents: [ - __WEBPACK_IMPORTED_MODULE_2__thf_toaster_thf_toaster_component__["a" /* ThfToasterComponent */] - ], - providers: [], - bootstrap: [] - },] }, - ]; - /** @nocollapse */ - ThfNotificationModule.ctorParameters = function () { return []; }; - return ThfNotificationModule; -}()); - -function ThfNotificationModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfNotificationModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfNotificationModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-notification/thf-notification.service.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfNotificationService; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_component_injector_thf_component_injector_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-component-injector/thf-component-injector.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_notification_base_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-notification-base.service.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_toaster_thf_toaster_orientation_enum__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-toaster/thf-toaster-orientation.enum.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__thf_toaster_thf_toaster_component__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-toaster/thf-toaster.component.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - -/** - * \@docsExtends ThfNotificationBaseService - * - * \@example - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -var ThfNotificationService = /** @class */ (function (_super) { - __extends(ThfNotificationService, _super); - function ThfNotificationService(thfComponentInjector) { - var _this = _super.call(this) || this; - _this.thfComponentInjector = thfComponentInjector; - return _this; - } - /** - * @param {?} toaster - * @return {?} - */ - ThfNotificationService.prototype.createToaster = /** - * @param {?} toaster - * @return {?} - */ - function (toaster) { - var _this = this; - var /** @type {?} */ componentRef = this.thfComponentInjector.createComponentInApplication(__WEBPACK_IMPORTED_MODULE_4__thf_toaster_thf_toaster_component__["a" /* ThfToasterComponent */]); - toaster.componentRef = componentRef; - componentRef.changeDetectorRef.detectChanges(); - componentRef.instance.configToaster(toaster); - if (toaster.orientation === __WEBPACK_IMPORTED_MODULE_3__thf_toaster_thf_toaster_orientation_enum__["a" /* ThfToasterOrientation */].Top) { - this.stackTop.push(componentRef); - } - else { - this.stackBottom.push(componentRef); - } - if (toaster.action === undefined) { - setTimeout(function () { - _this.destroyToaster(componentRef); - }, this.durationToaster); - } - }; - /** - * @param {?} toaster - * @return {?} - */ - ThfNotificationService.prototype.destroyToaster = /** - * @param {?} toaster - * @return {?} - */ - function (toaster) { - var /** @type {?} */ stack; - if (toaster.instance.orientation === __WEBPACK_IMPORTED_MODULE_3__thf_toaster_thf_toaster_orientation_enum__["a" /* ThfToasterOrientation */].Top) { - stack = this.stackTop; - } - else { - stack = this.stackBottom; - } - var /** @type {?} */ index = stack.indexOf(toaster); - stack.splice(index, 1); - this.thfComponentInjector.destroyComponentInApplication(toaster); - for (var /** @type {?} */ count = 0; count < stack.length; count++) { - stack[count].instance.changePosition(count); - } - }; - ThfNotificationService.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* Injectable */] }, - ]; - /** @nocollapse */ - ThfNotificationService.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_1__thf_component_injector_thf_component_injector_service__["a" /* ThfComponentInjectorService */], }, - ]; }; - return ThfNotificationService; -}(__WEBPACK_IMPORTED_MODULE_2__thf_notification_base_service__["a" /* ThfNotificationBaseService */])); - -function ThfNotificationService_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfNotificationService.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfNotificationService.ctorParameters; - /** @type {?} */ - ThfNotificationService.prototype.thfComponentInjector; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-notification/thf-toaster/thf-toaster-base.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfToasterBaseComponent; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** - * \@docsPrivate - * - * \@description - * - * O componente thf-toaster foi construído para exibir notificações para o usuário. - * @abstract - */ -var /** - * \@docsPrivate - * - * \@description - * - * O componente thf-toaster foi construído para exibir notificações para o usuário. - * @abstract - */ -ThfToasterBaseComponent = /** @class */ (function () { - function ThfToasterBaseComponent() { - } - return ThfToasterBaseComponent; -}()); -/** - * \@docsPrivate - * - * \@description - * - * O componente thf-toaster foi construído para exibir notificações para o usuário. - * @abstract - */ - -function ThfToasterBaseComponent_tsickle_Closure_declarations() { - /** - * Disponibiliza uma ação para a notificação. - * @type {?} - */ - ThfToasterBaseComponent.prototype.action; - /** - * Permite alterar o label do botão quando houver uma ação definida. - * @type {?} - */ - ThfToasterBaseComponent.prototype.actionLabel; - /** - * Mensagem a ser exibida na notificação. - * @type {?} - */ - ThfToasterBaseComponent.prototype.message; - /** - * Orientação da notificação, a mesma pode ser exibida na parte superior ou inferior da página - * @type {?} - */ - ThfToasterBaseComponent.prototype.orientation; - /** - * ComponentRef - * @type {?} - */ - ThfToasterBaseComponent.prototype.componentRef; - /** - * Posição para notificação aparecer na tela. - * @type {?} - */ - ThfToasterBaseComponent.prototype.position; - /** - * Tipo de notificação. - * @type {?} - */ - ThfToasterBaseComponent.prototype.type; - /** - * Fecha a notificação. - * @abstract - * @return {?} - */ - ThfToasterBaseComponent.prototype.close = function () { }; - /** - * Altera a posição da notificação. - * @abstract - * @param {?} value - * @return {?} - */ - ThfToasterBaseComponent.prototype.changePosition = function (value) { }; - /** - * Configura o componente thf-toaster de acordo com as definições do usuário. - * @abstract - * @param {?} thfToaster - * @return {?} - */ - ThfToasterBaseComponent.prototype.configToaster = function (thfToaster) { }; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-notification/thf-toaster/thf-toaster-orientation.enum.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfToasterOrientation; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** @enum {number} */ -var ThfToasterOrientation = { - /** Orientção do componente fica no rodapé */ - Bottom: 0, - /** Orientção do componente fica no topo */ - Top: 1, -}; - -ThfToasterOrientation[ThfToasterOrientation.Bottom] = "Bottom"; -ThfToasterOrientation[ThfToasterOrientation.Top] = "Top"; - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-notification/thf-toaster/thf-toaster-type.enum.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfToasterType; }); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** @enum {number} */ -var ThfToasterType = { - /** Enum para informações do tipo "Erro" */ - Error: 0, - /** Enum para informações do tipo "Informação" */ - Information: 1, - /** Enum para informações do tipo "Sucesso" */ - Success: 2, - /** Enum para informações do tipo "Atenção" */ - Warning: 3, -}; - -ThfToasterType[ThfToasterType.Error] = "Error"; -ThfToasterType[ThfToasterType.Information] = "Information"; -ThfToasterType[ThfToasterType.Success] = "Success"; -ThfToasterType[ThfToasterType.Warning] = "Warning"; - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/services/thf-notification/thf-toaster/thf-toaster.component.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfToasterComponent; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__thf_toaster_base_component__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-toaster/thf-toaster-base.component.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__thf_toaster_type_enum__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-toaster/thf-toaster-type.enum.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__thf_toaster_orientation_enum__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-toaster/thf-toaster-orientation.enum.js"); -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - -var ThfToasterComponent = /** @class */ (function (_super) { - __extends(ThfToasterComponent, _super); - function ThfToasterComponent(elementeRef) { - var _this = _super.call(this) || this; - _this.elementeRef = elementeRef; - _this.margin = 20; - _this.showToaster = true; - return _this; - } - /* Muda a posição do Toaster na tela*/ - /** - * @param {?} position - * @return {?} - */ - ThfToasterComponent.prototype.changePosition = /** - * @param {?} position - * @return {?} - */ - function (position) { - this.elementeRef.nativeElement.style.display = 'table'; - this.margin = 6 + (44 * (position)) + position * 6; - if (this.orientation === __WEBPACK_IMPORTED_MODULE_3__thf_toaster_orientation_enum__["a" /* ThfToasterOrientation */].Bottom) { - this.toaster.nativeElement.style.bottom = this.margin + 'px'; - } - else { - this.toaster.nativeElement.style.top = this.margin + 'px'; - } - }; - /* Fecha o componente Toaster */ - /** - * @return {?} - */ - ThfToasterComponent.prototype.close = /** - * @return {?} - */ - function () { - this.showToaster = false; - }; - /* Configura o Toaster com os atributos passados para ele */ - /** - * @param {?} thfToaster - * @return {?} - */ - ThfToasterComponent.prototype.configToaster = /** - * @param {?} thfToaster - * @return {?} - */ - function (thfToaster) { - this.type = thfToaster.type; - this.message = thfToaster.message; - this.orientation = thfToaster.orientation; - this.position = thfToaster.position; - this.action = thfToaster.action; - this.actionLabel = (thfToaster.actionLabel) ? thfToaster.actionLabel : 'Fechar'; - this.componentRef = thfToaster.componentRef; - /* Muda a orientação do Toaster */ - if (this.orientation === __WEBPACK_IMPORTED_MODULE_3__thf_toaster_orientation_enum__["a" /* ThfToasterOrientation */].Bottom) { - this.toasterPosition = 'thf-toaster-bottom'; - } - /* Muda a posição do Toaster */ - this.changePosition(this.position); - /* Switch para o tipo de Toaster */ - switch (this.type) { - case __WEBPACK_IMPORTED_MODULE_2__thf_toaster_type_enum__["a" /* ThfToasterType */].Error: { - this.toasterType = 'thf-toaster-error'; - this.icon = 'thf-icon-close'; - break; - } - case __WEBPACK_IMPORTED_MODULE_2__thf_toaster_type_enum__["a" /* ThfToasterType */].Information: { - this.toasterType = 'thf-toaster-info'; - this.icon = 'thf-icon-info'; - break; - } - case __WEBPACK_IMPORTED_MODULE_2__thf_toaster_type_enum__["a" /* ThfToasterType */].Success: { - this.toasterType = 'thf-toaster-success'; - this.icon = 'thf-icon-ok'; - break; - } - case __WEBPACK_IMPORTED_MODULE_2__thf_toaster_type_enum__["a" /* ThfToasterType */].Warning: { - this.toasterType = 'thf-toaster-warning'; - this.icon = 'thf-icon-warning'; - break; - } - } - }; - /* Chama a função passada pelo atributo `action` */ - /** - * @return {?} - */ - ThfToasterComponent.prototype.thfToasterAction = /** - * @return {?} - */ - function () { - this.action(this); - }; - /** - * @return {?} - */ - ThfToasterComponent.prototype.getShowToaster = /** - * @return {?} - */ - function () { - return this.showToaster; - }; - ThfToasterComponent.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */], args: [{ - selector: 'thf-toaster', template: "
    {{ message }}
    {{ actionLabel }}
    " - },] }, - ]; - /** @nocollapse */ - ThfToasterComponent.ctorParameters = function () { return [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["u" /* ElementRef */], }, - ]; }; - ThfToasterComponent.propDecorators = { - "toaster": [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* ViewChild */], args: ['toaster',] },], - }; - return ThfToasterComponent; -}(__WEBPACK_IMPORTED_MODULE_1__thf_toaster_base_component__["a" /* ThfToasterBaseComponent */])); - -function ThfToasterComponent_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfToasterComponent.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfToasterComponent.ctorParameters; - /** @type {!Object)}>>} */ - ThfToasterComponent.propDecorators; - /** @type {?} */ - ThfToasterComponent.prototype.icon; - /** @type {?} */ - ThfToasterComponent.prototype.margin; - /** @type {?} */ - ThfToasterComponent.prototype.showToaster; - /** @type {?} */ - ThfToasterComponent.prototype.toasterPosition; - /** @type {?} */ - ThfToasterComponent.prototype.toasterType; - /** @type {?} */ - ThfToasterComponent.prototype.toaster; - /** @type {?} */ - ThfToasterComponent.prototype.elementeRef; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/thf.module.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ThfModule; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_components_module__ = __webpack_require__("../../../../@totvs/thf-ui/components/components.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__directives_directives_module__ = __webpack_require__("../../../../@totvs/thf-ui/directives/directives.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__guards_guards_module__ = __webpack_require__("../../../../@totvs/thf-ui/guards/guards.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__interceptors_interceptors_module__ = __webpack_require__("../../../../@totvs/thf-ui/interceptors/interceptors.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pipes_pipes_module__ = __webpack_require__("../../../../@totvs/thf-ui/pipes/pipes.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__services_services_module__ = __webpack_require__("../../../../@totvs/thf-ui/services/services.module.js"); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__services_thf_notification_thf_notification_service__ = __webpack_require__("../../../../@totvs/thf-ui/services/thf-notification/thf-notification.service.js"); -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ - - - - - - - - -var ThfModule = /** @class */ (function () { - function ThfModule() { - } - ThfModule.decorators = [ - { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["J" /* NgModule */], args: [{ - declarations: [], - imports: [ - __WEBPACK_IMPORTED_MODULE_1__components_components_module__["a" /* ThfComponentsModule */], - __WEBPACK_IMPORTED_MODULE_2__directives_directives_module__["a" /* ThfDirectivesModule */], - __WEBPACK_IMPORTED_MODULE_3__guards_guards_module__["a" /* ThfGuardsModule */], - __WEBPACK_IMPORTED_MODULE_4__interceptors_interceptors_module__["a" /* ThfInterceptorsModule */], - __WEBPACK_IMPORTED_MODULE_5__pipes_pipes_module__["a" /* ThfPipesModule */], - __WEBPACK_IMPORTED_MODULE_6__services_services_module__["a" /* ThfServicesModule */] - ], - exports: [ - __WEBPACK_IMPORTED_MODULE_1__components_components_module__["a" /* ThfComponentsModule */], - __WEBPACK_IMPORTED_MODULE_2__directives_directives_module__["a" /* ThfDirectivesModule */], - __WEBPACK_IMPORTED_MODULE_4__interceptors_interceptors_module__["a" /* ThfInterceptorsModule */], - __WEBPACK_IMPORTED_MODULE_3__guards_guards_module__["a" /* ThfGuardsModule */], - __WEBPACK_IMPORTED_MODULE_5__pipes_pipes_module__["a" /* ThfPipesModule */], - __WEBPACK_IMPORTED_MODULE_6__services_services_module__["a" /* ThfServicesModule */] - ], - providers: [__WEBPACK_IMPORTED_MODULE_7__services_thf_notification_thf_notification_service__["a" /* ThfNotificationService */]], - bootstrap: [] - },] }, - ]; - /** @nocollapse */ - ThfModule.ctorParameters = function () { return []; }; - return ThfModule; -}()); - -function ThfModule_tsickle_Closure_declarations() { - /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ - ThfModule.decorators; - /** - * @nocollapse - * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>)})>} - */ - ThfModule.ctorParameters; -} - - -/***/ }), - -/***/ "../../../../@totvs/thf-ui/utils/util.js": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["d"] = convertToBoolean; -/* harmony export (immutable) */ __webpack_exports__["e"] = convertToInt; -/* harmony export (immutable) */ __webpack_exports__["i"] = isTypeof; -/* harmony export (immutable) */ __webpack_exports__["a"] = callFunction; -/* harmony export (immutable) */ __webpack_exports__["c"] = convertIsoToDate; -/* harmony export (immutable) */ __webpack_exports__["b"] = convertDateToISOExtended; -/* harmony export (immutable) */ __webpack_exports__["h"] = isMobile; -/* unused harmony export checkIsNativeIOS */ -/* harmony export (immutable) */ __webpack_exports__["m"] = sortOptionsByProperty; -/* harmony export (immutable) */ __webpack_exports__["k"] = removeDuplicatedOptions; -/* harmony export (immutable) */ __webpack_exports__["l"] = removeUndefinedAndNullOptions; -/* harmony export (immutable) */ __webpack_exports__["n"] = validValue; -/* harmony export (immutable) */ __webpack_exports__["g"] = isExternalLink; -/* harmony export (immutable) */ __webpack_exports__["j"] = openExternalLink; -/* harmony export (immutable) */ __webpack_exports__["f"] = getFormattedLink; -/** - * @fileoverview added by tsickle - * @suppress {checkTypes} checked by tsc - */ -/** - * @param {?} val - * @return {?} - */ -function convertToBoolean(val) { - if (typeof val === 'string') { - val = val.toLowerCase().trim(); - return (val === 'true' || val === 'on' || val === ''); - } - if (typeof val === 'number') { - return val === 1; - } - return !!val; -} -/** - * @param {?} value - * @return {?} - */ -function convertToInt(value) { - return parseInt(value, 10); -} -/** - * @param {?} object - * @param {?} type - * @return {?} - */ -function isTypeof(object, type) { - return typeof object === type; -} -/** - * - * @param {?} fn Função que será executada dentro do contexto. Podendo ser o nome da função - * ou a referência da mesma. - * - * @param {?} context Contexto do qual a função será executada. - * @return {?} - */ -function callFunction(fn, context) { - if (isTypeof(fn, 'function')) { - fn.call(context); - } - else { - context[fn](); - } -} -/** - * @param {?} value - * @param {?} start - * @param {?} end - * @return {?} - */ -function convertIsoToDate(value, start, end) { - if (value) { - var /** @type {?} */ day = parseInt(value.substring(8, 10), 10); - var /** @type {?} */ month = parseInt(value.substring(5, 7), 10); - var /** @type {?} */ year = parseInt(value.substring(0, 4), 10); - if (start) { - return new Date(year, month - 1, day, 0, 0, 0); - } - else if (end) { - return new Date(year, month - 1, day, 23, 59, 59); - } - else { - var /** @type {?} */ milliseconds = Date.parse(value); - var /** @type {?} */ timezone = new Date().getTimezoneOffset() * 60000; - return new Date(milliseconds + timezone); - } - } -} -/** - * @param {?} value - * @param {?} time - * @return {?} - */ -function convertDateToISOExtended(value, time) { - if (value) { - var /** @type {?} */ day = value.getDate() < 10 ? '0' + value.getDate() : value.getDate(); - var /** @type {?} */ month = value.getMonth() + 1 < 10 ? '0' + (value.getMonth() + 1) : (value.getMonth() + 1); - var /** @type {?} */ year = value.getFullYear(); - var /** @type {?} */ dateString = value.toString(); - if (time !== null) { - return year + '-' + month + '-' + day + time; - } - else { - return year + '-' + month + '-' + day + 'T' + dateString.substring(16, 24) + - dateString.substring(28, 31) + ':' + dateString.substring(31, 33); - } - } - else { - return null; - } -} -/** - * @return {?} - */ -function isMobile() { - var /** @type {?} */ userAgent = window.navigator.userAgent; - return userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i); -} -/** - * @return {?} - */ -function checkIsNativeIOS() { - var /** @type {?} */ isUserAgentMobile = isMobile(); - return isUserAgentMobile ? isUserAgentMobile.some(function (os) { return os === 'iPhone' || os === 'iPad'; }) : false; -} -/** - * @param {?} options - * @param {?} property - * @return {?} - */ -function sortOptionsByProperty(options, property) { - options.sort(function (optionA, optionB) { - optionA = optionA[property].toString().toLowerCase(); - optionB = optionB[property].toString().toLowerCase(); - if (optionA < optionB) { - return -1; - } - if (optionA > optionB) { - return 1; - } - return 0; - }); -} -/** - * @param {?} list - * @return {?} - */ -function removeDuplicatedOptions(list) { - var _loop_1 = function (i) { - if (i === 0) { - return out_i_1 = i, "continue"; - } - if (!(list.findIndex(function (op) { return op.value === list[i].value; }) === i)) { - list.splice(i, 1); - i--; - } - out_i_1 = i; - }; - var out_i_1; - for (var /** @type {?} */ i = 0; i < list.length; i++) { - _loop_1(i); - i = out_i_1; - } -} -/** - * @param {?} list - * @return {?} - */ -function removeUndefinedAndNullOptions(list) { - for (var /** @type {?} */ i = 0; i < list.length; i++) { - if (list[i].value === undefined || list[i].value === null) { - list.splice(i, 1); - i--; - } - } -} -/** - * @param {?} value - * @return {?} - */ -function validValue(value) { - return (value !== null && value !== undefined && value !== '') || value === false; -} -/** - * @param {?} url - * @return {?} - */ -function isExternalLink(url) { - return url ? url.startsWith('http') : false; -} -/** - * @param {?} url - * @return {?} - */ -function openExternalLink(url) { - window.open(url, '_blank'); -} -/** - * @param {?} link - * @return {?} - */ -function getFormattedLink(link) { - var /** @type {?} */ formattedLink = ''; - // Retira todos os pontos no começo da URL. - if (link) { - formattedLink = link.replace(/^(\.)+/g, ''); - } - // Verifica se foi utilizado uma rota que não comece com barra. - if (!formattedLink.startsWith('/')) { - formattedLink = '/'.concat(formattedLink); - } - return formattedLink; -} - - -/***/ }), - -/***/ "../../../../base64-js/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.byteLength = byteLength -exports.toByteArray = toByteArray -exports.fromByteArray = fromByteArray - -var lookup = [] -var revLookup = [] -var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array - -var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i] - revLookup[code.charCodeAt(i)] = i -} - -// Support decoding URL-safe base64 strings, as Node.js does. -// See: https://en.wikipedia.org/wiki/Base64#URL_applications -revLookup['-'.charCodeAt(0)] = 62 -revLookup['_'.charCodeAt(0)] = 63 - -function placeHoldersCount (b64) { - var len = b64.length - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0 -} - -function byteLength (b64) { - // base64 is 4/3 + up to two characters of the original data - return (b64.length * 3 / 4) - placeHoldersCount(b64) -} - -function toByteArray (b64) { - var i, l, tmp, placeHolders, arr - var len = b64.length - placeHolders = placeHoldersCount(b64) - - arr = new Arr((len * 3 / 4) - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? len - 4 : len - - var L = 0 - - for (i = 0; i < l; i += 4) { - tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] - arr[L++] = (tmp >> 16) & 0xFF - arr[L++] = (tmp >> 8) & 0xFF - arr[L++] = tmp & 0xFF - } - - if (placeHolders === 2) { - tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[L++] = tmp & 0xFF - } else if (placeHolders === 1) { - tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[L++] = (tmp >> 8) & 0xFF - arr[L++] = tmp & 0xFF - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = ((uint8[i] << 16) & 0xFF0000) + ((uint8[i + 1] << 8) & 0xFF00) + (uint8[i + 2] & 0xFF) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} - -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var output = '' - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - output += lookup[tmp >> 2] - output += lookup[(tmp << 4) & 0x3F] - output += '==' - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + (uint8[len - 1]) - output += lookup[tmp >> 10] - output += lookup[(tmp >> 4) & 0x3F] - output += lookup[(tmp << 2) & 0x3F] - output += '=' - } - - parts.push(output) - - return parts.join('') -} - - -/***/ }), - -/***/ "../../../../buffer/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(global) {/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - - - -var base64 = __webpack_require__("../../../../base64-js/index.js") -var ieee754 = __webpack_require__("../../../../ieee754/index.js") -var isArray = __webpack_require__("../../../../isarray/index.js") - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined - ? global.TYPED_ARRAY_SUPPORT - : typedArraySupport() - -/* - * Export kMaxLength after typed array support is determined. - */ -exports.kMaxLength = kMaxLength() - -function typedArraySupport () { - try { - var arr = new Uint8Array(1) - arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} - return arr.foo() === 42 && // typed array instances can be augmented - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -} - -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} - -function createBuffer (that, length) { - if (kMaxLength() < length) { - throw new RangeError('Invalid typed array length') - } - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = new Uint8Array(length) - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - if (that === null) { - that = new Buffer(length) - } - that.length = length - } - - return that -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { - return new Buffer(arg, encodingOrOffset, length) - } - - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new Error( - 'If encoding is specified then the first argument must be a string' - ) - } - return allocUnsafe(this, arg) - } - return from(this, arg, encodingOrOffset, length) -} - -Buffer.poolSize = 8192 // not used by this implementation - -// TODO: Legacy, not needed anymore. Remove in next major version. -Buffer._augment = function (arr) { - arr.__proto__ = Buffer.prototype - return arr -} - -function from (that, value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number') - } - - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - return fromArrayBuffer(that, value, encodingOrOffset, length) - } - - if (typeof value === 'string') { - return fromString(that, value, encodingOrOffset) - } - - return fromObject(that, value) -} - -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(null, value, encodingOrOffset, length) -} - -if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype - Buffer.__proto__ = Uint8Array - if (typeof Symbol !== 'undefined' && Symbol.species && - Buffer[Symbol.species] === Buffer) { - // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 - Object.defineProperty(Buffer, Symbol.species, { - value: null, - configurable: true - }) - } -} - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be a number') - } else if (size < 0) { - throw new RangeError('"size" argument must not be negative') - } -} - -function alloc (that, size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(that, size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(that, size).fill(fill, encoding) - : createBuffer(that, size).fill(fill) - } - return createBuffer(that, size) -} - -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(null, size, fill, encoding) -} - -function allocUnsafe (that, size) { - assertSize(size) - that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < size; ++i) { - that[i] = 0 - } - } - return that -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(null, size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(null, size) -} - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding') - } - - var length = byteLength(string, encoding) | 0 - that = createBuffer(that, length) - - var actual = that.write(string, encoding) - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - that = that.slice(0, actual) - } - - return that -} - -function fromArrayLike (that, array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0 - that = createBuffer(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function fromArrayBuffer (that, array, byteOffset, length) { - array.byteLength // this throws if `array` is not a valid ArrayBuffer - - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('\'offset\' is out of bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('\'length\' is out of bounds') - } - - if (byteOffset === undefined && length === undefined) { - array = new Uint8Array(array) - } else if (length === undefined) { - array = new Uint8Array(array, byteOffset) - } else { - array = new Uint8Array(array, byteOffset, length) - } - - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = array - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - that = fromArrayLike(that, array) - } - return that -} - -function fromObject (that, obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - that = createBuffer(that, len) - - if (that.length === 0) { - return that - } - - obj.copy(that, 0, 0, len) - return that - } - - if (obj) { - if ((typeof ArrayBuffer !== 'undefined' && - obj.buffer instanceof ArrayBuffer) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { - return createBuffer(that, 0) - } - return fromArrayLike(that, obj) - } - - if (obj.type === 'Buffer' && isArray(obj.data)) { - return fromArrayLike(that, obj.data) - } - } - - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') -} - -function checked (length) { - // Note: cannot use `length < kMaxLength()` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) -} - -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length - } - } - - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; ++i) { - var buf = list[i] - if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos) - pos += buf.length - } - return buffer -} - -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && - (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - string = '' + string - } - - var len = string.length - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - case undefined: - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length - } - - if (end <= 0) { - return '' - } - - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect -// Buffer instances. -Buffer.prototype._isBuffer = true - -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i -} - -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this -} - -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this -} - -Buffer.prototype.swap64 = function swap64 () { - var len = this.length - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7) - swap(this, i + 1, i + 6) - swap(this, i + 2, i + 5) - swap(this, i + 3, i + 4) - } - return this -} - -Buffer.prototype.toString = function toString () { - var length = this.length | 0 - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' -} - -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (!Buffer.isBuffer(target)) { - throw new TypeError('Argument must be a Buffer') - } - - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 - - if (this === target) return 0 - - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) - - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset = +byteOffset // Coerce to Number. - if (isNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1) - } - - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1 - } else if (byteOffset < 0) { - if (dir) byteOffset = 0 - else return -1 - } - - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } - - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (Buffer.isBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF // Search for a byte value [0-255] - if (Buffer.TYPED_ARRAY_SUPPORT && - typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) - } - - throw new TypeError('val must be string, number or Buffer') -} - -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - var i - if (dir) { - var foundIndex = -1 - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength - for (i = byteOffset; i >= 0; i--) { - var found = true - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false - break - } - } - if (found) return i - } - } - - return -1 -} - -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -} - -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function latin1Slice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; ++i) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = this.subarray(start, end) - newBuf.__proto__ = Buffer.prototype - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; ++i) { - newBuf[i] = this[i + start] - } - } - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = (value & 0xff) - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - var i - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start] - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; ++i) { - target[i + targetStart] = this[i + start] - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, start + len), - targetStart - ) - } - - return len -} - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (val.length === 1) { - var code = val.charCodeAt(0) - if (code < 256) { - val = code - } - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - } else if (typeof val === 'number') { - val = val & 255 - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 - - if (!val) val = 0 - - var i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val - } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : utf8ToBytes(new Buffer(val, encoding).toString()) - var len = bytes.length - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] - } - } - - return this -} - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -function isnan (val) { - return val !== val // eslint-disable-line no-self-compare -} - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("../../../../webpack/buildin/global.js"))) - -/***/ }), - -/***/ "../../../../css-loader/lib/css-base.js": -/***/ (function(module, exports) { - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -// css base code, injected by the css-loader -module.exports = function(useSourceMap) { - var list = []; - - // return the list of modules as css string - list.toString = function toString() { - return this.map(function (item) { - var content = cssWithMappingToString(item, useSourceMap); - if(item[2]) { - return "@media " + item[2] + "{" + content + "}"; - } else { - return content; - } - }).join(""); - }; - - // import a list of modules into the list - list.i = function(modules, mediaQuery) { - if(typeof modules === "string") - modules = [[null, modules, ""]]; - var alreadyImportedModules = {}; - for(var i = 0; i < this.length; i++) { - var id = this[i][0]; - if(typeof id === "number") - alreadyImportedModules[id] = true; - } - for(i = 0; i < modules.length; i++) { - var item = modules[i]; - // skip already imported module - // this implementation is not 100% perfect for weird media query combinations - // when a module is imported multiple times with different media queries. - // I hope this will never occur (Hey this way we have smaller bundles) - if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { - if(mediaQuery && !item[2]) { - item[2] = mediaQuery; - } else if(mediaQuery) { - item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; - } - list.push(item); - } - } - }; - return list; -}; - -function cssWithMappingToString(item, useSourceMap) { - var content = item[1] || ''; - var cssMapping = item[3]; - if (!cssMapping) { - return content; - } - - if (useSourceMap && typeof btoa === 'function') { - var sourceMapping = toComment(cssMapping); - var sourceURLs = cssMapping.sources.map(function (source) { - return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' - }); - - return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); - } - - return [content].join('\n'); -} - -// Adapted from convert-source-map (MIT) -function toComment(sourceMap) { - // eslint-disable-next-line no-undef - var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); - var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; - - return '/*# ' + data + ' */'; -} - - -/***/ }), - -/***/ "../../../../hammerjs/hammer.js": -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.7 - 2016-04-22 - * http://hammerjs.github.io/ - * - * Copyright (c) 2016 Jorik Tangelder; - * Licensed under the MIT license */ -(function(window, document, exportName, undefined) { - 'use strict'; - -var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; -var TEST_ELEMENT = document.createElement('div'); - -var TYPE_FUNCTION = 'function'; - -var round = Math.round; -var abs = Math.abs; -var now = Date.now; - -/** - * set a timeout with a given scope - * @param {Function} fn - * @param {Number} timeout - * @param {Object} context - * @returns {number} - */ -function setTimeoutContext(fn, timeout, context) { - return setTimeout(bindFn(fn, context), timeout); -} - -/** - * if the argument is an array, we want to execute the fn on each entry - * if it aint an array we don't want to do a thing. - * this is used by all the methods that accept a single and array argument. - * @param {*|Array} arg - * @param {String} fn - * @param {Object} [context] - * @returns {Boolean} - */ -function invokeArrayArg(arg, fn, context) { - if (Array.isArray(arg)) { - each(arg, context[fn], context); - return true; - } - return false; -} - -/** - * walk objects and arrays - * @param {Object} obj - * @param {Function} iterator - * @param {Object} context - */ -function each(obj, iterator, context) { - var i; - - if (!obj) { - return; - } - - if (obj.forEach) { - obj.forEach(iterator, context); - } else if (obj.length !== undefined) { - i = 0; - while (i < obj.length) { - iterator.call(context, obj[i], i, obj); - i++; - } - } else { - for (i in obj) { - obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); - } - } -} - -/** - * wrap a method with a deprecation warning and stack trace - * @param {Function} method - * @param {String} name - * @param {String} message - * @returns {Function} A new function wrapping the supplied method. - */ -function deprecate(method, name, message) { - var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n'; - return function() { - var e = new Error('get-stack-trace'); - var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '') - .replace(/^\s+at\s+/gm, '') - .replace(/^Object.\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; - - var log = window.console && (window.console.warn || window.console.log); - if (log) { - log.call(window.console, deprecationMessage, stack); - } - return method.apply(this, arguments); - }; -} - -/** - * extend object. - * means that properties in dest will be overwritten by the ones in src. - * @param {Object} target - * @param {...Object} objects_to_assign - * @returns {Object} target - */ -var assign; -if (typeof Object.assign !== 'function') { - assign = function assign(target) { - if (target === undefined || target === null) { - throw new TypeError('Cannot convert undefined or null to object'); - } - - var output = Object(target); - for (var index = 1; index < arguments.length; index++) { - var source = arguments[index]; - if (source !== undefined && source !== null) { - for (var nextKey in source) { - if (source.hasOwnProperty(nextKey)) { - output[nextKey] = source[nextKey]; - } - } - } - } - return output; - }; -} else { - assign = Object.assign; -} - -/** - * extend object. - * means that properties in dest will be overwritten by the ones in src. - * @param {Object} dest - * @param {Object} src - * @param {Boolean} [merge=false] - * @returns {Object} dest - */ -var extend = deprecate(function extend(dest, src, merge) { - var keys = Object.keys(src); - var i = 0; - while (i < keys.length) { - if (!merge || (merge && dest[keys[i]] === undefined)) { - dest[keys[i]] = src[keys[i]]; - } - i++; - } - return dest; -}, 'extend', 'Use `assign`.'); - -/** - * merge the values from src in the dest. - * means that properties that exist in dest will not be overwritten by src - * @param {Object} dest - * @param {Object} src - * @returns {Object} dest - */ -var merge = deprecate(function merge(dest, src) { - return extend(dest, src, true); -}, 'merge', 'Use `assign`.'); - -/** - * simple class inheritance - * @param {Function} child - * @param {Function} base - * @param {Object} [properties] - */ -function inherit(child, base, properties) { - var baseP = base.prototype, - childP; - - childP = child.prototype = Object.create(baseP); - childP.constructor = child; - childP._super = baseP; - - if (properties) { - assign(childP, properties); - } -} - -/** - * simple function bind - * @param {Function} fn - * @param {Object} context - * @returns {Function} - */ -function bindFn(fn, context) { - return function boundFn() { - return fn.apply(context, arguments); - }; -} - -/** - * let a boolean value also be a function that must return a boolean - * this first item in args will be used as the context - * @param {Boolean|Function} val - * @param {Array} [args] - * @returns {Boolean} - */ -function boolOrFn(val, args) { - if (typeof val == TYPE_FUNCTION) { - return val.apply(args ? args[0] || undefined : undefined, args); - } - return val; -} - -/** - * use the val2 when val1 is undefined - * @param {*} val1 - * @param {*} val2 - * @returns {*} - */ -function ifUndefined(val1, val2) { - return (val1 === undefined) ? val2 : val1; -} - -/** - * addEventListener with multiple events at once - * @param {EventTarget} target - * @param {String} types - * @param {Function} handler - */ -function addEventListeners(target, types, handler) { - each(splitStr(types), function(type) { - target.addEventListener(type, handler, false); - }); -} - -/** - * removeEventListener with multiple events at once - * @param {EventTarget} target - * @param {String} types - * @param {Function} handler - */ -function removeEventListeners(target, types, handler) { - each(splitStr(types), function(type) { - target.removeEventListener(type, handler, false); - }); -} - -/** - * find if a node is in the given parent - * @method hasParent - * @param {HTMLElement} node - * @param {HTMLElement} parent - * @return {Boolean} found - */ -function hasParent(node, parent) { - while (node) { - if (node == parent) { - return true; - } - node = node.parentNode; - } - return false; -} - -/** - * small indexOf wrapper - * @param {String} str - * @param {String} find - * @returns {Boolean} found - */ -function inStr(str, find) { - return str.indexOf(find) > -1; -} - -/** - * split string on whitespace - * @param {String} str - * @returns {Array} words - */ -function splitStr(str) { - return str.trim().split(/\s+/g); -} - -/** - * find if a array contains the object using indexOf or a simple polyFill - * @param {Array} src - * @param {String} find - * @param {String} [findByKey] - * @return {Boolean|Number} false when not found, or the index - */ -function inArray(src, find, findByKey) { - if (src.indexOf && !findByKey) { - return src.indexOf(find); - } else { - var i = 0; - while (i < src.length) { - if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) { - return i; - } - i++; - } - return -1; - } -} - -/** - * convert array-like objects to real arrays - * @param {Object} obj - * @returns {Array} - */ -function toArray(obj) { - return Array.prototype.slice.call(obj, 0); -} - -/** - * unique array with objects based on a key (like 'id') or just by the array's value - * @param {Array} src [{id:1},{id:2},{id:1}] - * @param {String} [key] - * @param {Boolean} [sort=False] - * @returns {Array} [{id:1},{id:2}] - */ -function uniqueArray(src, key, sort) { - var results = []; - var values = []; - var i = 0; - - while (i < src.length) { - var val = key ? src[i][key] : src[i]; - if (inArray(values, val) < 0) { - results.push(src[i]); - } - values[i] = val; - i++; - } - - if (sort) { - if (!key) { - results = results.sort(); - } else { - results = results.sort(function sortUniqueArray(a, b) { - return a[key] > b[key]; - }); - } - } - - return results; -} - -/** - * get the prefixed property - * @param {Object} obj - * @param {String} property - * @returns {String|Undefined} prefixed - */ -function prefixed(obj, property) { - var prefix, prop; - var camelProp = property[0].toUpperCase() + property.slice(1); - - var i = 0; - while (i < VENDOR_PREFIXES.length) { - prefix = VENDOR_PREFIXES[i]; - prop = (prefix) ? prefix + camelProp : property; - - if (prop in obj) { - return prop; - } - i++; - } - return undefined; -} - -/** - * get a unique id - * @returns {number} uniqueId - */ -var _uniqueId = 1; -function uniqueId() { - return _uniqueId++; -} - -/** - * get the window object of an element - * @param {HTMLElement} element - * @returns {DocumentView|Window} - */ -function getWindowForElement(element) { - var doc = element.ownerDocument || element; - return (doc.defaultView || doc.parentWindow || window); -} - -var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; - -var SUPPORT_TOUCH = ('ontouchstart' in window); -var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined; -var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); - -var INPUT_TYPE_TOUCH = 'touch'; -var INPUT_TYPE_PEN = 'pen'; -var INPUT_TYPE_MOUSE = 'mouse'; -var INPUT_TYPE_KINECT = 'kinect'; - -var COMPUTE_INTERVAL = 25; - -var INPUT_START = 1; -var INPUT_MOVE = 2; -var INPUT_END = 4; -var INPUT_CANCEL = 8; - -var DIRECTION_NONE = 1; -var DIRECTION_LEFT = 2; -var DIRECTION_RIGHT = 4; -var DIRECTION_UP = 8; -var DIRECTION_DOWN = 16; - -var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; -var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; -var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; - -var PROPS_XY = ['x', 'y']; -var PROPS_CLIENT_XY = ['clientX', 'clientY']; - -/** - * create new input type manager - * @param {Manager} manager - * @param {Function} callback - * @returns {Input} - * @constructor - */ -function Input(manager, callback) { - var self = this; - this.manager = manager; - this.callback = callback; - this.element = manager.element; - this.target = manager.options.inputTarget; - - // smaller wrapper around the handler, for the scope and the enabled state of the manager, - // so when disabled the input events are completely bypassed. - this.domHandler = function(ev) { - if (boolOrFn(manager.options.enable, [manager])) { - self.handler(ev); - } - }; - - this.init(); - -} - -Input.prototype = { - /** - * should handle the inputEvent data and trigger the callback - * @virtual - */ - handler: function() { }, - - /** - * bind the events - */ - init: function() { - this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); - this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); - this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); - }, - - /** - * unbind the events - */ - destroy: function() { - this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); - this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); - this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); - } -}; - -/** - * create new input type manager - * called by the Manager constructor - * @param {Hammer} manager - * @returns {Input} - */ -function createInputInstance(manager) { - var Type; - var inputClass = manager.options.inputClass; - - if (inputClass) { - Type = inputClass; - } else if (SUPPORT_POINTER_EVENTS) { - Type = PointerEventInput; - } else if (SUPPORT_ONLY_TOUCH) { - Type = TouchInput; - } else if (!SUPPORT_TOUCH) { - Type = MouseInput; - } else { - Type = TouchMouseInput; - } - return new (Type)(manager, inputHandler); -} - -/** - * handle input events - * @param {Manager} manager - * @param {String} eventType - * @param {Object} input - */ -function inputHandler(manager, eventType, input) { - var pointersLen = input.pointers.length; - var changedPointersLen = input.changedPointers.length; - var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0)); - var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0)); - - input.isFirst = !!isFirst; - input.isFinal = !!isFinal; - - if (isFirst) { - manager.session = {}; - } - - // source event is the normalized value of the domEvents - // like 'touchstart, mouseup, pointerdown' - input.eventType = eventType; - - // compute scale, rotation etc - computeInputData(manager, input); - - // emit secret event - manager.emit('hammer.input', input); - - manager.recognize(input); - manager.session.prevInput = input; -} - -/** - * extend the data with some usable properties like scale, rotate, velocity etc - * @param {Object} manager - * @param {Object} input - */ -function computeInputData(manager, input) { - var session = manager.session; - var pointers = input.pointers; - var pointersLength = pointers.length; - - // store the first input to calculate the distance and direction - if (!session.firstInput) { - session.firstInput = simpleCloneInputData(input); - } - - // to compute scale and rotation we need to store the multiple touches - if (pointersLength > 1 && !session.firstMultiple) { - session.firstMultiple = simpleCloneInputData(input); - } else if (pointersLength === 1) { - session.firstMultiple = false; - } - - var firstInput = session.firstInput; - var firstMultiple = session.firstMultiple; - var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; - - var center = input.center = getCenter(pointers); - input.timeStamp = now(); - input.deltaTime = input.timeStamp - firstInput.timeStamp; - - input.angle = getAngle(offsetCenter, center); - input.distance = getDistance(offsetCenter, center); - - computeDeltaXY(session, input); - input.offsetDirection = getDirection(input.deltaX, input.deltaY); - - var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); - input.overallVelocityX = overallVelocity.x; - input.overallVelocityY = overallVelocity.y; - input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y; - - input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; - input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; - - input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length > - session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers); - - computeIntervalInputData(session, input); - - // find the correct target - var target = manager.element; - if (hasParent(input.srcEvent.target, target)) { - target = input.srcEvent.target; - } - input.target = target; -} - -function computeDeltaXY(session, input) { - var center = input.center; - var offset = session.offsetDelta || {}; - var prevDelta = session.prevDelta || {}; - var prevInput = session.prevInput || {}; - - if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { - prevDelta = session.prevDelta = { - x: prevInput.deltaX || 0, - y: prevInput.deltaY || 0 - }; - - offset = session.offsetDelta = { - x: center.x, - y: center.y - }; - } - - input.deltaX = prevDelta.x + (center.x - offset.x); - input.deltaY = prevDelta.y + (center.y - offset.y); -} - -/** - * velocity is calculated every x ms - * @param {Object} session - * @param {Object} input - */ -function computeIntervalInputData(session, input) { - var last = session.lastInterval || input, - deltaTime = input.timeStamp - last.timeStamp, - velocity, velocityX, velocityY, direction; - - if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { - var deltaX = input.deltaX - last.deltaX; - var deltaY = input.deltaY - last.deltaY; - - var v = getVelocity(deltaTime, deltaX, deltaY); - velocityX = v.x; - velocityY = v.y; - velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y; - direction = getDirection(deltaX, deltaY); - - session.lastInterval = input; - } else { - // use latest velocity info if it doesn't overtake a minimum period - velocity = last.velocity; - velocityX = last.velocityX; - velocityY = last.velocityY; - direction = last.direction; - } - - input.velocity = velocity; - input.velocityX = velocityX; - input.velocityY = velocityY; - input.direction = direction; -} - -/** - * create a simple clone from the input used for storage of firstInput and firstMultiple - * @param {Object} input - * @returns {Object} clonedInputData - */ -function simpleCloneInputData(input) { - // make a simple copy of the pointers because we will get a reference if we don't - // we only need clientXY for the calculations - var pointers = []; - var i = 0; - while (i < input.pointers.length) { - pointers[i] = { - clientX: round(input.pointers[i].clientX), - clientY: round(input.pointers[i].clientY) - }; - i++; - } - - return { - timeStamp: now(), - pointers: pointers, - center: getCenter(pointers), - deltaX: input.deltaX, - deltaY: input.deltaY - }; -} - -/** - * get the center of all the pointers - * @param {Array} pointers - * @return {Object} center contains `x` and `y` properties - */ -function getCenter(pointers) { - var pointersLength = pointers.length; - - // no need to loop when only one touch - if (pointersLength === 1) { - return { - x: round(pointers[0].clientX), - y: round(pointers[0].clientY) - }; - } - - var x = 0, y = 0, i = 0; - while (i < pointersLength) { - x += pointers[i].clientX; - y += pointers[i].clientY; - i++; - } - - return { - x: round(x / pointersLength), - y: round(y / pointersLength) - }; -} - -/** - * calculate the velocity between two points. unit is in px per ms. - * @param {Number} deltaTime - * @param {Number} x - * @param {Number} y - * @return {Object} velocity `x` and `y` - */ -function getVelocity(deltaTime, x, y) { - return { - x: x / deltaTime || 0, - y: y / deltaTime || 0 - }; -} - -/** - * get the direction between two points - * @param {Number} x - * @param {Number} y - * @return {Number} direction - */ -function getDirection(x, y) { - if (x === y) { - return DIRECTION_NONE; - } - - if (abs(x) >= abs(y)) { - return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; - } - return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; -} - -/** - * calculate the absolute distance between two points - * @param {Object} p1 {x, y} - * @param {Object} p2 {x, y} - * @param {Array} [props] containing x and y keys - * @return {Number} distance - */ -function getDistance(p1, p2, props) { - if (!props) { - props = PROPS_XY; - } - var x = p2[props[0]] - p1[props[0]], - y = p2[props[1]] - p1[props[1]]; - - return Math.sqrt((x * x) + (y * y)); -} - -/** - * calculate the angle between two coordinates - * @param {Object} p1 - * @param {Object} p2 - * @param {Array} [props] containing x and y keys - * @return {Number} angle - */ -function getAngle(p1, p2, props) { - if (!props) { - props = PROPS_XY; - } - var x = p2[props[0]] - p1[props[0]], - y = p2[props[1]] - p1[props[1]]; - return Math.atan2(y, x) * 180 / Math.PI; -} - -/** - * calculate the rotation degrees between two pointersets - * @param {Array} start array of pointers - * @param {Array} end array of pointers - * @return {Number} rotation - */ -function getRotation(start, end) { - return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); -} - -/** - * calculate the scale factor between two pointersets - * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out - * @param {Array} start array of pointers - * @param {Array} end array of pointers - * @return {Number} scale - */ -function getScale(start, end) { - return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); -} - -var MOUSE_INPUT_MAP = { - mousedown: INPUT_START, - mousemove: INPUT_MOVE, - mouseup: INPUT_END -}; - -var MOUSE_ELEMENT_EVENTS = 'mousedown'; -var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; - -/** - * Mouse events input - * @constructor - * @extends Input - */ -function MouseInput() { - this.evEl = MOUSE_ELEMENT_EVENTS; - this.evWin = MOUSE_WINDOW_EVENTS; - - this.pressed = false; // mousedown state - - Input.apply(this, arguments); -} - -inherit(MouseInput, Input, { - /** - * handle mouse events - * @param {Object} ev - */ - handler: function MEhandler(ev) { - var eventType = MOUSE_INPUT_MAP[ev.type]; - - // on start we want to have the left mouse button down - if (eventType & INPUT_START && ev.button === 0) { - this.pressed = true; - } - - if (eventType & INPUT_MOVE && ev.which !== 1) { - eventType = INPUT_END; - } - - // mouse must be down - if (!this.pressed) { - return; - } - - if (eventType & INPUT_END) { - this.pressed = false; - } - - this.callback(this.manager, eventType, { - pointers: [ev], - changedPointers: [ev], - pointerType: INPUT_TYPE_MOUSE, - srcEvent: ev - }); - } -}); - -var POINTER_INPUT_MAP = { - pointerdown: INPUT_START, - pointermove: INPUT_MOVE, - pointerup: INPUT_END, - pointercancel: INPUT_CANCEL, - pointerout: INPUT_CANCEL -}; - -// in IE10 the pointer types is defined as an enum -var IE10_POINTER_TYPE_ENUM = { - 2: INPUT_TYPE_TOUCH, - 3: INPUT_TYPE_PEN, - 4: INPUT_TYPE_MOUSE, - 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 -}; - -var POINTER_ELEMENT_EVENTS = 'pointerdown'; -var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; - -// IE10 has prefixed support, and case-sensitive -if (window.MSPointerEvent && !window.PointerEvent) { - POINTER_ELEMENT_EVENTS = 'MSPointerDown'; - POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; -} - -/** - * Pointer events input - * @constructor - * @extends Input - */ -function PointerEventInput() { - this.evEl = POINTER_ELEMENT_EVENTS; - this.evWin = POINTER_WINDOW_EVENTS; - - Input.apply(this, arguments); - - this.store = (this.manager.session.pointerEvents = []); -} - -inherit(PointerEventInput, Input, { - /** - * handle mouse events - * @param {Object} ev - */ - handler: function PEhandler(ev) { - var store = this.store; - var removePointer = false; - - var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); - var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; - var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; - - var isTouch = (pointerType == INPUT_TYPE_TOUCH); - - // get index of the event in the store - var storeIndex = inArray(store, ev.pointerId, 'pointerId'); - - // start and mouse must be down - if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { - if (storeIndex < 0) { - store.push(ev); - storeIndex = store.length - 1; - } - } else if (eventType & (INPUT_END | INPUT_CANCEL)) { - removePointer = true; - } - - // it not found, so the pointer hasn't been down (so it's probably a hover) - if (storeIndex < 0) { - return; - } - - // update the event in the store - store[storeIndex] = ev; - - this.callback(this.manager, eventType, { - pointers: store, - changedPointers: [ev], - pointerType: pointerType, - srcEvent: ev - }); - - if (removePointer) { - // remove from the store - store.splice(storeIndex, 1); - } - } -}); - -var SINGLE_TOUCH_INPUT_MAP = { - touchstart: INPUT_START, - touchmove: INPUT_MOVE, - touchend: INPUT_END, - touchcancel: INPUT_CANCEL -}; - -var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; -var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; - -/** - * Touch events input - * @constructor - * @extends Input - */ -function SingleTouchInput() { - this.evTarget = SINGLE_TOUCH_TARGET_EVENTS; - this.evWin = SINGLE_TOUCH_WINDOW_EVENTS; - this.started = false; - - Input.apply(this, arguments); -} - -inherit(SingleTouchInput, Input, { - handler: function TEhandler(ev) { - var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; - - // should we handle the touch events? - if (type === INPUT_START) { - this.started = true; - } - - if (!this.started) { - return; - } - - var touches = normalizeSingleTouches.call(this, ev, type); - - // when done, reset the started state - if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { - this.started = false; - } - - this.callback(this.manager, type, { - pointers: touches[0], - changedPointers: touches[1], - pointerType: INPUT_TYPE_TOUCH, - srcEvent: ev - }); - } -}); - -/** - * @this {TouchInput} - * @param {Object} ev - * @param {Number} type flag - * @returns {undefined|Array} [all, changed] - */ -function normalizeSingleTouches(ev, type) { - var all = toArray(ev.touches); - var changed = toArray(ev.changedTouches); - - if (type & (INPUT_END | INPUT_CANCEL)) { - all = uniqueArray(all.concat(changed), 'identifier', true); - } - - return [all, changed]; -} - -var TOUCH_INPUT_MAP = { - touchstart: INPUT_START, - touchmove: INPUT_MOVE, - touchend: INPUT_END, - touchcancel: INPUT_CANCEL -}; - -var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; - -/** - * Multi-user touch events input - * @constructor - * @extends Input - */ -function TouchInput() { - this.evTarget = TOUCH_TARGET_EVENTS; - this.targetIds = {}; - - Input.apply(this, arguments); -} - -inherit(TouchInput, Input, { - handler: function MTEhandler(ev) { - var type = TOUCH_INPUT_MAP[ev.type]; - var touches = getTouches.call(this, ev, type); - if (!touches) { - return; - } - - this.callback(this.manager, type, { - pointers: touches[0], - changedPointers: touches[1], - pointerType: INPUT_TYPE_TOUCH, - srcEvent: ev - }); - } -}); - -/** - * @this {TouchInput} - * @param {Object} ev - * @param {Number} type flag - * @returns {undefined|Array} [all, changed] - */ -function getTouches(ev, type) { - var allTouches = toArray(ev.touches); - var targetIds = this.targetIds; - - // when there is only one touch, the process can be simplified - if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { - targetIds[allTouches[0].identifier] = true; - return [allTouches, allTouches]; - } - - var i, - targetTouches, - changedTouches = toArray(ev.changedTouches), - changedTargetTouches = [], - target = this.target; - - // get target touches from touches - targetTouches = allTouches.filter(function(touch) { - return hasParent(touch.target, target); - }); - - // collect touches - if (type === INPUT_START) { - i = 0; - while (i < targetTouches.length) { - targetIds[targetTouches[i].identifier] = true; - i++; - } - } - - // filter changed touches to only contain touches that exist in the collected target ids - i = 0; - while (i < changedTouches.length) { - if (targetIds[changedTouches[i].identifier]) { - changedTargetTouches.push(changedTouches[i]); - } - - // cleanup removed touches - if (type & (INPUT_END | INPUT_CANCEL)) { - delete targetIds[changedTouches[i].identifier]; - } - i++; - } - - if (!changedTargetTouches.length) { - return; - } - - return [ - // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' - uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), - changedTargetTouches - ]; -} - -/** - * Combined touch and mouse input - * - * Touch has a higher priority then mouse, and while touching no mouse events are allowed. - * This because touch devices also emit mouse events while doing a touch. - * - * @constructor - * @extends Input - */ - -var DEDUP_TIMEOUT = 2500; -var DEDUP_DISTANCE = 25; - -function TouchMouseInput() { - Input.apply(this, arguments); - - var handler = bindFn(this.handler, this); - this.touch = new TouchInput(this.manager, handler); - this.mouse = new MouseInput(this.manager, handler); - - this.primaryTouch = null; - this.lastTouches = []; -} - -inherit(TouchMouseInput, Input, { - /** - * handle mouse and touch events - * @param {Hammer} manager - * @param {String} inputEvent - * @param {Object} inputData - */ - handler: function TMEhandler(manager, inputEvent, inputData) { - var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH), - isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE); - - if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) { - return; - } - - // when we're in a touch event, record touches to de-dupe synthetic mouse event - if (isTouch) { - recordTouches.call(this, inputEvent, inputData); - } else if (isMouse && isSyntheticEvent.call(this, inputData)) { - return; - } - - this.callback(manager, inputEvent, inputData); - }, - - /** - * remove the event listeners - */ - destroy: function destroy() { - this.touch.destroy(); - this.mouse.destroy(); - } -}); - -function recordTouches(eventType, eventData) { - if (eventType & INPUT_START) { - this.primaryTouch = eventData.changedPointers[0].identifier; - setLastTouch.call(this, eventData); - } else if (eventType & (INPUT_END | INPUT_CANCEL)) { - setLastTouch.call(this, eventData); - } -} - -function setLastTouch(eventData) { - var touch = eventData.changedPointers[0]; - - if (touch.identifier === this.primaryTouch) { - var lastTouch = {x: touch.clientX, y: touch.clientY}; - this.lastTouches.push(lastTouch); - var lts = this.lastTouches; - var removeLastTouch = function() { - var i = lts.indexOf(lastTouch); - if (i > -1) { - lts.splice(i, 1); - } - }; - setTimeout(removeLastTouch, DEDUP_TIMEOUT); - } -} - -function isSyntheticEvent(eventData) { - var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY; - for (var i = 0; i < this.lastTouches.length; i++) { - var t = this.lastTouches[i]; - var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y); - if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) { - return true; - } - } - return false; -} - -var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); -var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; - -// magical touchAction value -var TOUCH_ACTION_COMPUTE = 'compute'; -var TOUCH_ACTION_AUTO = 'auto'; -var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented -var TOUCH_ACTION_NONE = 'none'; -var TOUCH_ACTION_PAN_X = 'pan-x'; -var TOUCH_ACTION_PAN_Y = 'pan-y'; -var TOUCH_ACTION_MAP = getTouchActionProps(); - -/** - * Touch Action - * sets the touchAction property or uses the js alternative - * @param {Manager} manager - * @param {String} value - * @constructor - */ -function TouchAction(manager, value) { - this.manager = manager; - this.set(value); -} - -TouchAction.prototype = { - /** - * set the touchAction value on the element or enable the polyfill - * @param {String} value - */ - set: function(value) { - // find out the touch-action by the event handlers - if (value == TOUCH_ACTION_COMPUTE) { - value = this.compute(); - } - - if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) { - this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; - } - this.actions = value.toLowerCase().trim(); - }, - - /** - * just re-set the touchAction value - */ - update: function() { - this.set(this.manager.options.touchAction); - }, - - /** - * compute the value for the touchAction property based on the recognizer's settings - * @returns {String} value - */ - compute: function() { - var actions = []; - each(this.manager.recognizers, function(recognizer) { - if (boolOrFn(recognizer.options.enable, [recognizer])) { - actions = actions.concat(recognizer.getTouchAction()); - } - }); - return cleanTouchActions(actions.join(' ')); - }, - - /** - * this method is called on each input cycle and provides the preventing of the browser behavior - * @param {Object} input - */ - preventDefaults: function(input) { - var srcEvent = input.srcEvent; - var direction = input.offsetDirection; - - // if the touch action did prevented once this session - if (this.manager.session.prevented) { - srcEvent.preventDefault(); - return; - } - - var actions = this.actions; - var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE]; - var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y]; - var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X]; - - if (hasNone) { - //do not prevent defaults if this is a tap gesture - - var isTapPointer = input.pointers.length === 1; - var isTapMovement = input.distance < 2; - var isTapTouchTime = input.deltaTime < 250; - - if (isTapPointer && isTapMovement && isTapTouchTime) { - return; - } - } - - if (hasPanX && hasPanY) { - // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent - return; - } - - if (hasNone || - (hasPanY && direction & DIRECTION_HORIZONTAL) || - (hasPanX && direction & DIRECTION_VERTICAL)) { - return this.preventSrc(srcEvent); - } - }, - - /** - * call preventDefault to prevent the browser's default behavior (scrolling in most cases) - * @param {Object} srcEvent - */ - preventSrc: function(srcEvent) { - this.manager.session.prevented = true; - srcEvent.preventDefault(); - } -}; - -/** - * when the touchActions are collected they are not a valid value, so we need to clean things up. * - * @param {String} actions - * @returns {*} - */ -function cleanTouchActions(actions) { - // none - if (inStr(actions, TOUCH_ACTION_NONE)) { - return TOUCH_ACTION_NONE; - } - - var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); - var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); - - // if both pan-x and pan-y are set (different recognizers - // for different directions, e.g. horizontal pan but vertical swipe?) - // we need none (as otherwise with pan-x pan-y combined none of these - // recognizers will work, since the browser would handle all panning - if (hasPanX && hasPanY) { - return TOUCH_ACTION_NONE; - } - - // pan-x OR pan-y - if (hasPanX || hasPanY) { - return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; - } - - // manipulation - if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { - return TOUCH_ACTION_MANIPULATION; - } - - return TOUCH_ACTION_AUTO; -} - -function getTouchActionProps() { - if (!NATIVE_TOUCH_ACTION) { - return false; - } - var touchMap = {}; - var cssSupports = window.CSS && window.CSS.supports; - ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) { - - // If css.supports is not supported but there is native touch-action assume it supports - // all values. This is the case for IE 10 and 11. - touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true; - }); - return touchMap; -} - -/** - * Recognizer flow explained; * - * All recognizers have the initial state of POSSIBLE when a input session starts. - * The definition of a input session is from the first input until the last input, with all it's movement in it. * - * Example session for mouse-input: mousedown -> mousemove -> mouseup - * - * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed - * which determines with state it should be. - * - * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to - * POSSIBLE to give it another change on the next cycle. - * - * Possible - * | - * +-----+---------------+ - * | | - * +-----+-----+ | - * | | | - * Failed Cancelled | - * +-------+------+ - * | | - * Recognized Began - * | - * Changed - * | - * Ended/Recognized - */ -var STATE_POSSIBLE = 1; -var STATE_BEGAN = 2; -var STATE_CHANGED = 4; -var STATE_ENDED = 8; -var STATE_RECOGNIZED = STATE_ENDED; -var STATE_CANCELLED = 16; -var STATE_FAILED = 32; - -/** - * Recognizer - * Every recognizer needs to extend from this class. - * @constructor - * @param {Object} options - */ -function Recognizer(options) { - this.options = assign({}, this.defaults, options || {}); - - this.id = uniqueId(); - - this.manager = null; - - // default is enable true - this.options.enable = ifUndefined(this.options.enable, true); - - this.state = STATE_POSSIBLE; - - this.simultaneous = {}; - this.requireFail = []; -} - -Recognizer.prototype = { - /** - * @virtual - * @type {Object} - */ - defaults: {}, - - /** - * set options - * @param {Object} options - * @return {Recognizer} - */ - set: function(options) { - assign(this.options, options); - - // also update the touchAction, in case something changed about the directions/enabled state - this.manager && this.manager.touchAction.update(); - return this; - }, - - /** - * recognize simultaneous with an other recognizer. - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this - */ - recognizeWith: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { - return this; - } - - var simultaneous = this.simultaneous; - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - if (!simultaneous[otherRecognizer.id]) { - simultaneous[otherRecognizer.id] = otherRecognizer; - otherRecognizer.recognizeWith(this); - } - return this; - }, - - /** - * drop the simultaneous link. it doesnt remove the link on the other recognizer. - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this - */ - dropRecognizeWith: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { - return this; - } - - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - delete this.simultaneous[otherRecognizer.id]; - return this; - }, - - /** - * recognizer can only run when an other is failing - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this - */ - requireFailure: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { - return this; - } - - var requireFail = this.requireFail; - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - if (inArray(requireFail, otherRecognizer) === -1) { - requireFail.push(otherRecognizer); - otherRecognizer.requireFailure(this); - } - return this; - }, - - /** - * drop the requireFailure link. it does not remove the link on the other recognizer. - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this - */ - dropRequireFailure: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { - return this; - } - - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - var index = inArray(this.requireFail, otherRecognizer); - if (index > -1) { - this.requireFail.splice(index, 1); - } - return this; - }, - - /** - * has require failures boolean - * @returns {boolean} - */ - hasRequireFailures: function() { - return this.requireFail.length > 0; - }, - - /** - * if the recognizer can recognize simultaneous with an other recognizer - * @param {Recognizer} otherRecognizer - * @returns {Boolean} - */ - canRecognizeWith: function(otherRecognizer) { - return !!this.simultaneous[otherRecognizer.id]; - }, - - /** - * You should use `tryEmit` instead of `emit` directly to check - * that all the needed recognizers has failed before emitting. - * @param {Object} input - */ - emit: function(input) { - var self = this; - var state = this.state; - - function emit(event) { - self.manager.emit(event, input); - } - - // 'panstart' and 'panmove' - if (state < STATE_ENDED) { - emit(self.options.event + stateStr(state)); - } - - emit(self.options.event); // simple 'eventName' events - - if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...) - emit(input.additionalEvent); - } - - // panend and pancancel - if (state >= STATE_ENDED) { - emit(self.options.event + stateStr(state)); - } - }, - - /** - * Check that all the require failure recognizers has failed, - * if true, it emits a gesture event, - * otherwise, setup the state to FAILED. - * @param {Object} input - */ - tryEmit: function(input) { - if (this.canEmit()) { - return this.emit(input); - } - // it's failing anyway - this.state = STATE_FAILED; - }, - - /** - * can we emit? - * @returns {boolean} - */ - canEmit: function() { - var i = 0; - while (i < this.requireFail.length) { - if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { - return false; - } - i++; - } - return true; - }, - - /** - * update the recognizer - * @param {Object} inputData - */ - recognize: function(inputData) { - // make a new copy of the inputData - // so we can change the inputData without messing up the other recognizers - var inputDataClone = assign({}, inputData); - - // is is enabled and allow recognizing? - if (!boolOrFn(this.options.enable, [this, inputDataClone])) { - this.reset(); - this.state = STATE_FAILED; - return; - } - - // reset when we've reached the end - if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { - this.state = STATE_POSSIBLE; - } - - this.state = this.process(inputDataClone); - - // the recognizer has recognized a gesture - // so trigger an event - if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { - this.tryEmit(inputDataClone); - } - }, - - /** - * return the state of the recognizer - * the actual recognizing happens in this method - * @virtual - * @param {Object} inputData - * @returns {Const} STATE - */ - process: function(inputData) { }, // jshint ignore:line - - /** - * return the preferred touch-action - * @virtual - * @returns {Array} - */ - getTouchAction: function() { }, - - /** - * called when the gesture isn't allowed to recognize - * like when another is being recognized or it is disabled - * @virtual - */ - reset: function() { } -}; - -/** - * get a usable string, used as event postfix - * @param {Const} state - * @returns {String} state - */ -function stateStr(state) { - if (state & STATE_CANCELLED) { - return 'cancel'; - } else if (state & STATE_ENDED) { - return 'end'; - } else if (state & STATE_CHANGED) { - return 'move'; - } else if (state & STATE_BEGAN) { - return 'start'; - } - return ''; -} - -/** - * direction cons to string - * @param {Const} direction - * @returns {String} - */ -function directionStr(direction) { - if (direction == DIRECTION_DOWN) { - return 'down'; - } else if (direction == DIRECTION_UP) { - return 'up'; - } else if (direction == DIRECTION_LEFT) { - return 'left'; - } else if (direction == DIRECTION_RIGHT) { - return 'right'; - } - return ''; -} - -/** - * get a recognizer by name if it is bound to a manager - * @param {Recognizer|String} otherRecognizer - * @param {Recognizer} recognizer - * @returns {Recognizer} - */ -function getRecognizerByNameIfManager(otherRecognizer, recognizer) { - var manager = recognizer.manager; - if (manager) { - return manager.get(otherRecognizer); - } - return otherRecognizer; -} - -/** - * This recognizer is just used as a base for the simple attribute recognizers. - * @constructor - * @extends Recognizer - */ -function AttrRecognizer() { - Recognizer.apply(this, arguments); -} - -inherit(AttrRecognizer, Recognizer, { - /** - * @namespace - * @memberof AttrRecognizer - */ - defaults: { - /** - * @type {Number} - * @default 1 - */ - pointers: 1 - }, - - /** - * Used to check if it the recognizer receives valid input, like input.distance > 10. - * @memberof AttrRecognizer - * @param {Object} input - * @returns {Boolean} recognized - */ - attrTest: function(input) { - var optionPointers = this.options.pointers; - return optionPointers === 0 || input.pointers.length === optionPointers; - }, - - /** - * Process the input and return the state for the recognizer - * @memberof AttrRecognizer - * @param {Object} input - * @returns {*} State - */ - process: function(input) { - var state = this.state; - var eventType = input.eventType; - - var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); - var isValid = this.attrTest(input); - - // on cancel input and we've recognized before, return STATE_CANCELLED - if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { - return state | STATE_CANCELLED; - } else if (isRecognized || isValid) { - if (eventType & INPUT_END) { - return state | STATE_ENDED; - } else if (!(state & STATE_BEGAN)) { - return STATE_BEGAN; - } - return state | STATE_CHANGED; - } - return STATE_FAILED; - } -}); - -/** - * Pan - * Recognized when the pointer is down and moved in the allowed direction. - * @constructor - * @extends AttrRecognizer - */ -function PanRecognizer() { - AttrRecognizer.apply(this, arguments); - - this.pX = null; - this.pY = null; -} - -inherit(PanRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof PanRecognizer - */ - defaults: { - event: 'pan', - threshold: 10, - pointers: 1, - direction: DIRECTION_ALL - }, - - getTouchAction: function() { - var direction = this.options.direction; - var actions = []; - if (direction & DIRECTION_HORIZONTAL) { - actions.push(TOUCH_ACTION_PAN_Y); - } - if (direction & DIRECTION_VERTICAL) { - actions.push(TOUCH_ACTION_PAN_X); - } - return actions; - }, - - directionTest: function(input) { - var options = this.options; - var hasMoved = true; - var distance = input.distance; - var direction = input.direction; - var x = input.deltaX; - var y = input.deltaY; - - // lock to axis? - if (!(direction & options.direction)) { - if (options.direction & DIRECTION_HORIZONTAL) { - direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT; - hasMoved = x != this.pX; - distance = Math.abs(input.deltaX); - } else { - direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN; - hasMoved = y != this.pY; - distance = Math.abs(input.deltaY); - } - } - input.direction = direction; - return hasMoved && distance > options.threshold && direction & options.direction; - }, - - attrTest: function(input) { - return AttrRecognizer.prototype.attrTest.call(this, input) && - (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input))); - }, - - emit: function(input) { - - this.pX = input.deltaX; - this.pY = input.deltaY; - - var direction = directionStr(input.direction); - - if (direction) { - input.additionalEvent = this.options.event + direction; - } - this._super.emit.call(this, input); - } -}); - -/** - * Pinch - * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). - * @constructor - * @extends AttrRecognizer - */ -function PinchRecognizer() { - AttrRecognizer.apply(this, arguments); -} - -inherit(PinchRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof PinchRecognizer - */ - defaults: { - event: 'pinch', - threshold: 0, - pointers: 2 - }, - - getTouchAction: function() { - return [TOUCH_ACTION_NONE]; - }, - - attrTest: function(input) { - return this._super.attrTest.call(this, input) && - (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); - }, - - emit: function(input) { - if (input.scale !== 1) { - var inOut = input.scale < 1 ? 'in' : 'out'; - input.additionalEvent = this.options.event + inOut; - } - this._super.emit.call(this, input); - } -}); - -/** - * Press - * Recognized when the pointer is down for x ms without any movement. - * @constructor - * @extends Recognizer - */ -function PressRecognizer() { - Recognizer.apply(this, arguments); - - this._timer = null; - this._input = null; -} - -inherit(PressRecognizer, Recognizer, { - /** - * @namespace - * @memberof PressRecognizer - */ - defaults: { - event: 'press', - pointers: 1, - time: 251, // minimal time of the pointer to be pressed - threshold: 9 // a minimal movement is ok, but keep it low - }, - - getTouchAction: function() { - return [TOUCH_ACTION_AUTO]; - }, - - process: function(input) { - var options = this.options; - var validPointers = input.pointers.length === options.pointers; - var validMovement = input.distance < options.threshold; - var validTime = input.deltaTime > options.time; - - this._input = input; - - // we only allow little movement - // and we've reached an end event, so a tap is possible - if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) { - this.reset(); - } else if (input.eventType & INPUT_START) { - this.reset(); - this._timer = setTimeoutContext(function() { - this.state = STATE_RECOGNIZED; - this.tryEmit(); - }, options.time, this); - } else if (input.eventType & INPUT_END) { - return STATE_RECOGNIZED; - } - return STATE_FAILED; - }, - - reset: function() { - clearTimeout(this._timer); - }, - - emit: function(input) { - if (this.state !== STATE_RECOGNIZED) { - return; - } - - if (input && (input.eventType & INPUT_END)) { - this.manager.emit(this.options.event + 'up', input); - } else { - this._input.timeStamp = now(); - this.manager.emit(this.options.event, this._input); - } - } -}); - -/** - * Rotate - * Recognized when two or more pointer are moving in a circular motion. - * @constructor - * @extends AttrRecognizer - */ -function RotateRecognizer() { - AttrRecognizer.apply(this, arguments); -} - -inherit(RotateRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof RotateRecognizer - */ - defaults: { - event: 'rotate', - threshold: 0, - pointers: 2 - }, - - getTouchAction: function() { - return [TOUCH_ACTION_NONE]; - }, - - attrTest: function(input) { - return this._super.attrTest.call(this, input) && - (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); - } -}); - -/** - * Swipe - * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. - * @constructor - * @extends AttrRecognizer - */ -function SwipeRecognizer() { - AttrRecognizer.apply(this, arguments); -} - -inherit(SwipeRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof SwipeRecognizer - */ - defaults: { - event: 'swipe', - threshold: 10, - velocity: 0.3, - direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, - pointers: 1 - }, - - getTouchAction: function() { - return PanRecognizer.prototype.getTouchAction.call(this); - }, - - attrTest: function(input) { - var direction = this.options.direction; - var velocity; - - if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { - velocity = input.overallVelocity; - } else if (direction & DIRECTION_HORIZONTAL) { - velocity = input.overallVelocityX; - } else if (direction & DIRECTION_VERTICAL) { - velocity = input.overallVelocityY; - } - - return this._super.attrTest.call(this, input) && - direction & input.offsetDirection && - input.distance > this.options.threshold && - input.maxPointers == this.options.pointers && - abs(velocity) > this.options.velocity && input.eventType & INPUT_END; - }, - - emit: function(input) { - var direction = directionStr(input.offsetDirection); - if (direction) { - this.manager.emit(this.options.event + direction, input); - } - - this.manager.emit(this.options.event, input); - } -}); - -/** - * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur - * between the given interval and position. The delay option can be used to recognize multi-taps without firing - * a single tap. - * - * The eventData from the emitted event contains the property `tapCount`, which contains the amount of - * multi-taps being recognized. - * @constructor - * @extends Recognizer - */ -function TapRecognizer() { - Recognizer.apply(this, arguments); - - // previous time and center, - // used for tap counting - this.pTime = false; - this.pCenter = false; - - this._timer = null; - this._input = null; - this.count = 0; -} - -inherit(TapRecognizer, Recognizer, { - /** - * @namespace - * @memberof PinchRecognizer - */ - defaults: { - event: 'tap', - pointers: 1, - taps: 1, - interval: 300, // max time between the multi-tap taps - time: 250, // max time of the pointer to be down (like finger on the screen) - threshold: 9, // a minimal movement is ok, but keep it low - posThreshold: 10 // a multi-tap can be a bit off the initial position - }, - - getTouchAction: function() { - return [TOUCH_ACTION_MANIPULATION]; - }, - - process: function(input) { - var options = this.options; - - var validPointers = input.pointers.length === options.pointers; - var validMovement = input.distance < options.threshold; - var validTouchTime = input.deltaTime < options.time; - - this.reset(); - - if ((input.eventType & INPUT_START) && (this.count === 0)) { - return this.failTimeout(); - } - - // we only allow little movement - // and we've reached an end event, so a tap is possible - if (validMovement && validTouchTime && validPointers) { - if (input.eventType != INPUT_END) { - return this.failTimeout(); - } - - var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true; - var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; - - this.pTime = input.timeStamp; - this.pCenter = input.center; - - if (!validMultiTap || !validInterval) { - this.count = 1; - } else { - this.count += 1; - } - - this._input = input; - - // if tap count matches we have recognized it, - // else it has began recognizing... - var tapCount = this.count % options.taps; - if (tapCount === 0) { - // no failing requirements, immediately trigger the tap event - // or wait as long as the multitap interval to trigger - if (!this.hasRequireFailures()) { - return STATE_RECOGNIZED; - } else { - this._timer = setTimeoutContext(function() { - this.state = STATE_RECOGNIZED; - this.tryEmit(); - }, options.interval, this); - return STATE_BEGAN; - } - } - } - return STATE_FAILED; - }, - - failTimeout: function() { - this._timer = setTimeoutContext(function() { - this.state = STATE_FAILED; - }, this.options.interval, this); - return STATE_FAILED; - }, - - reset: function() { - clearTimeout(this._timer); - }, - - emit: function() { - if (this.state == STATE_RECOGNIZED) { - this._input.tapCount = this.count; - this.manager.emit(this.options.event, this._input); - } - } -}); - -/** - * Simple way to create a manager with a default set of recognizers. - * @param {HTMLElement} element - * @param {Object} [options] - * @constructor - */ -function Hammer(element, options) { - options = options || {}; - options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset); - return new Manager(element, options); -} - -/** - * @const {string} - */ -Hammer.VERSION = '2.0.7'; - -/** - * default settings - * @namespace - */ -Hammer.defaults = { - /** - * set if DOM events are being triggered. - * But this is slower and unused by simple implementations, so disabled by default. - * @type {Boolean} - * @default false - */ - domEvents: false, - - /** - * The value for the touchAction property/fallback. - * When set to `compute` it will magically set the correct value based on the added recognizers. - * @type {String} - * @default compute - */ - touchAction: TOUCH_ACTION_COMPUTE, - - /** - * @type {Boolean} - * @default true - */ - enable: true, - - /** - * EXPERIMENTAL FEATURE -- can be removed/changed - * Change the parent input target element. - * If Null, then it is being set the to main element. - * @type {Null|EventTarget} - * @default null - */ - inputTarget: null, - - /** - * force an input class - * @type {Null|Function} - * @default null - */ - inputClass: null, - - /** - * Default recognizer setup when calling `Hammer()` - * When creating a new Manager these will be skipped. - * @type {Array} - */ - preset: [ - // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] - [RotateRecognizer, {enable: false}], - [PinchRecognizer, {enable: false}, ['rotate']], - [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}], - [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']], - [TapRecognizer], - [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']], - [PressRecognizer] - ], - - /** - * Some CSS properties can be used to improve the working of Hammer. - * Add them to this method and they will be set when creating a new Manager. - * @namespace - */ - cssProps: { - /** - * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. - * @type {String} - * @default 'none' - */ - userSelect: 'none', - - /** - * Disable the Windows Phone grippers when pressing an element. - * @type {String} - * @default 'none' - */ - touchSelect: 'none', - - /** - * Disables the default callout shown when you touch and hold a touch target. - * On iOS, when you touch and hold a touch target such as a link, Safari displays - * a callout containing information about the link. This property allows you to disable that callout. - * @type {String} - * @default 'none' - */ - touchCallout: 'none', - - /** - * Specifies whether zooming is enabled. Used by IE10> - * @type {String} - * @default 'none' - */ - contentZooming: 'none', - - /** - * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. - * @type {String} - * @default 'none' - */ - userDrag: 'none', - - /** - * Overrides the highlight color shown when the user taps a link or a JavaScript - * clickable element in iOS. This property obeys the alpha value, if specified. - * @type {String} - * @default 'rgba(0,0,0,0)' - */ - tapHighlightColor: 'rgba(0,0,0,0)' - } -}; - -var STOP = 1; -var FORCED_STOP = 2; - -/** - * Manager - * @param {HTMLElement} element - * @param {Object} [options] - * @constructor - */ -function Manager(element, options) { - this.options = assign({}, Hammer.defaults, options || {}); - - this.options.inputTarget = this.options.inputTarget || element; - - this.handlers = {}; - this.session = {}; - this.recognizers = []; - this.oldCssProps = {}; - - this.element = element; - this.input = createInputInstance(this); - this.touchAction = new TouchAction(this, this.options.touchAction); - - toggleCssProps(this, true); - - each(this.options.recognizers, function(item) { - var recognizer = this.add(new (item[0])(item[1])); - item[2] && recognizer.recognizeWith(item[2]); - item[3] && recognizer.requireFailure(item[3]); - }, this); -} - -Manager.prototype = { - /** - * set options - * @param {Object} options - * @returns {Manager} - */ - set: function(options) { - assign(this.options, options); - - // Options that need a little more setup - if (options.touchAction) { - this.touchAction.update(); - } - if (options.inputTarget) { - // Clean up existing event listeners and reinitialize - this.input.destroy(); - this.input.target = options.inputTarget; - this.input.init(); - } - return this; - }, - - /** - * stop recognizing for this session. - * This session will be discarded, when a new [input]start event is fired. - * When forced, the recognizer cycle is stopped immediately. - * @param {Boolean} [force] - */ - stop: function(force) { - this.session.stopped = force ? FORCED_STOP : STOP; - }, - - /** - * run the recognizers! - * called by the inputHandler function on every movement of the pointers (touches) - * it walks through all the recognizers and tries to detect the gesture that is being made - * @param {Object} inputData - */ - recognize: function(inputData) { - var session = this.session; - if (session.stopped) { - return; - } - - // run the touch-action polyfill - this.touchAction.preventDefaults(inputData); - - var recognizer; - var recognizers = this.recognizers; - - // this holds the recognizer that is being recognized. - // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED - // if no recognizer is detecting a thing, it is set to `null` - var curRecognizer = session.curRecognizer; - - // reset when the last recognizer is recognized - // or when we're in a new session - if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) { - curRecognizer = session.curRecognizer = null; - } - - var i = 0; - while (i < recognizers.length) { - recognizer = recognizers[i]; - - // find out if we are allowed try to recognize the input for this one. - // 1. allow if the session is NOT forced stopped (see the .stop() method) - // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one - // that is being recognized. - // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. - // this can be setup with the `recognizeWith()` method on the recognizer. - if (session.stopped !== FORCED_STOP && ( // 1 - !curRecognizer || recognizer == curRecognizer || // 2 - recognizer.canRecognizeWith(curRecognizer))) { // 3 - recognizer.recognize(inputData); - } else { - recognizer.reset(); - } - - // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the - // current active recognizer. but only if we don't already have an active recognizer - if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { - curRecognizer = session.curRecognizer = recognizer; - } - i++; - } - }, - - /** - * get a recognizer by its event name. - * @param {Recognizer|String} recognizer - * @returns {Recognizer|Null} - */ - get: function(recognizer) { - if (recognizer instanceof Recognizer) { - return recognizer; - } - - var recognizers = this.recognizers; - for (var i = 0; i < recognizers.length; i++) { - if (recognizers[i].options.event == recognizer) { - return recognizers[i]; - } - } - return null; - }, - - /** - * add a recognizer to the manager - * existing recognizers with the same event name will be removed - * @param {Recognizer} recognizer - * @returns {Recognizer|Manager} - */ - add: function(recognizer) { - if (invokeArrayArg(recognizer, 'add', this)) { - return this; - } - - // remove existing - var existing = this.get(recognizer.options.event); - if (existing) { - this.remove(existing); - } - - this.recognizers.push(recognizer); - recognizer.manager = this; - - this.touchAction.update(); - return recognizer; - }, - - /** - * remove a recognizer by name or instance - * @param {Recognizer|String} recognizer - * @returns {Manager} - */ - remove: function(recognizer) { - if (invokeArrayArg(recognizer, 'remove', this)) { - return this; - } - - recognizer = this.get(recognizer); - - // let's make sure this recognizer exists - if (recognizer) { - var recognizers = this.recognizers; - var index = inArray(recognizers, recognizer); - - if (index !== -1) { - recognizers.splice(index, 1); - this.touchAction.update(); - } - } - - return this; - }, - - /** - * bind event - * @param {String} events - * @param {Function} handler - * @returns {EventEmitter} this - */ - on: function(events, handler) { - if (events === undefined) { - return; - } - if (handler === undefined) { - return; - } - - var handlers = this.handlers; - each(splitStr(events), function(event) { - handlers[event] = handlers[event] || []; - handlers[event].push(handler); - }); - return this; - }, - - /** - * unbind event, leave emit blank to remove all handlers - * @param {String} events - * @param {Function} [handler] - * @returns {EventEmitter} this - */ - off: function(events, handler) { - if (events === undefined) { - return; - } - - var handlers = this.handlers; - each(splitStr(events), function(event) { - if (!handler) { - delete handlers[event]; - } else { - handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); - } - }); - return this; - }, - - /** - * emit event to the listeners - * @param {String} event - * @param {Object} data - */ - emit: function(event, data) { - // we also want to trigger dom events - if (this.options.domEvents) { - triggerDomEvent(event, data); - } - - // no handlers, so skip it all - var handlers = this.handlers[event] && this.handlers[event].slice(); - if (!handlers || !handlers.length) { - return; - } - - data.type = event; - data.preventDefault = function() { - data.srcEvent.preventDefault(); - }; - - var i = 0; - while (i < handlers.length) { - handlers[i](data); - i++; - } - }, - - /** - * destroy the manager and unbinds all events - * it doesn't unbind dom events, that is the user own responsibility - */ - destroy: function() { - this.element && toggleCssProps(this, false); - - this.handlers = {}; - this.session = {}; - this.input.destroy(); - this.element = null; - } -}; - -/** - * add/remove the css properties as defined in manager.options.cssProps - * @param {Manager} manager - * @param {Boolean} add - */ -function toggleCssProps(manager, add) { - var element = manager.element; - if (!element.style) { - return; - } - var prop; - each(manager.options.cssProps, function(value, name) { - prop = prefixed(element.style, name); - if (add) { - manager.oldCssProps[prop] = element.style[prop]; - element.style[prop] = value; - } else { - element.style[prop] = manager.oldCssProps[prop] || ''; - } - }); - if (!add) { - manager.oldCssProps = {}; - } -} - -/** - * trigger dom event - * @param {String} event - * @param {Object} data - */ -function triggerDomEvent(event, data) { - var gestureEvent = document.createEvent('Event'); - gestureEvent.initEvent(event, true, true); - gestureEvent.gesture = data; - data.target.dispatchEvent(gestureEvent); -} - -assign(Hammer, { - INPUT_START: INPUT_START, - INPUT_MOVE: INPUT_MOVE, - INPUT_END: INPUT_END, - INPUT_CANCEL: INPUT_CANCEL, - - STATE_POSSIBLE: STATE_POSSIBLE, - STATE_BEGAN: STATE_BEGAN, - STATE_CHANGED: STATE_CHANGED, - STATE_ENDED: STATE_ENDED, - STATE_RECOGNIZED: STATE_RECOGNIZED, - STATE_CANCELLED: STATE_CANCELLED, - STATE_FAILED: STATE_FAILED, - - DIRECTION_NONE: DIRECTION_NONE, - DIRECTION_LEFT: DIRECTION_LEFT, - DIRECTION_RIGHT: DIRECTION_RIGHT, - DIRECTION_UP: DIRECTION_UP, - DIRECTION_DOWN: DIRECTION_DOWN, - DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL, - DIRECTION_VERTICAL: DIRECTION_VERTICAL, - DIRECTION_ALL: DIRECTION_ALL, - - Manager: Manager, - Input: Input, - TouchAction: TouchAction, - - TouchInput: TouchInput, - MouseInput: MouseInput, - PointerEventInput: PointerEventInput, - TouchMouseInput: TouchMouseInput, - SingleTouchInput: SingleTouchInput, - - Recognizer: Recognizer, - AttrRecognizer: AttrRecognizer, - Tap: TapRecognizer, - Pan: PanRecognizer, - Swipe: SwipeRecognizer, - Pinch: PinchRecognizer, - Rotate: RotateRecognizer, - Press: PressRecognizer, - - on: addEventListeners, - off: removeEventListeners, - each: each, - merge: merge, - extend: extend, - assign: assign, - inherit: inherit, - bindFn: bindFn, - prefixed: prefixed -}); - -// this prevents errors when Hammer is loaded in the presence of an AMD -// style loader but by script tag, not by the loader. -var freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line -freeGlobal.Hammer = Hammer; - -if (true) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - return Hammer; - }).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -} else if (typeof module != 'undefined' && module.exports) { - module.exports = Hammer; -} else { - window[exportName] = Hammer; -} - -})(window, document, 'Hammer'); - - -/***/ }), - -/***/ "../../../../ieee754/index.js": -/***/ (function(module, exports) { - -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = ((value * c) - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} - - -/***/ }), - -/***/ "../../../../isarray/index.js": -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; - - -/***/ }), - -/***/ "../../../../jsonpath/jsonpath.js": -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(global) {var require;var require;/*! jsonpath 1.0.0 */ - -(function(f){if(true){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.jsonpath = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o - Copyright (C) 2013 Thaddee Tyl - Copyright (C) 2013 Mathias Bynens - Copyright (C) 2012 Ariya Hidayat - Copyright (C) 2012 Mathias Bynens - Copyright (C) 2012 Joost-Wim Boekesteijn - Copyright (C) 2012 Kris Kowal - Copyright (C) 2012 Yusuke Suzuki - Copyright (C) 2012 Arpad Borsos - Copyright (C) 2011 Ariya Hidayat - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*jslint bitwise:true plusplus:true */ -/*global esprima:true, define:true, exports:true, window: true, -throwErrorTolerant: true, -throwError: true, generateStatement: true, peek: true, -parseAssignmentExpression: true, parseBlock: true, parseExpression: true, -parseFunctionDeclaration: true, parseFunctionExpression: true, -parseFunctionSourceElements: true, parseVariableIdentifier: true, -parseLeftHandSideExpression: true, -parseUnaryExpression: true, -parseStatement: true, parseSourceElement: true */ - -(function (root, factory) { - 'use strict'; - - // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, - // Rhino, and plain browser loading. - - /* istanbul ignore next */ - if (typeof define === 'function' && define.amd) { - define(['exports'], factory); - } else if (typeof exports !== 'undefined') { - factory(exports); - } else { - factory((root.esprima = {})); - } -}(this, function (exports) { - 'use strict'; - - var Token, - TokenName, - FnExprTokens, - Syntax, - PropertyKind, - Messages, - Regex, - SyntaxTreeDelegate, - source, - strict, - index, - lineNumber, - lineStart, - length, - delegate, - lookahead, - state, - extra; - - Token = { - BooleanLiteral: 1, - EOF: 2, - Identifier: 3, - Keyword: 4, - NullLiteral: 5, - NumericLiteral: 6, - Punctuator: 7, - StringLiteral: 8, - RegularExpression: 9 - }; - - TokenName = {}; - TokenName[Token.BooleanLiteral] = 'Boolean'; - TokenName[Token.EOF] = ''; - TokenName[Token.Identifier] = 'Identifier'; - TokenName[Token.Keyword] = 'Keyword'; - TokenName[Token.NullLiteral] = 'Null'; - TokenName[Token.NumericLiteral] = 'Numeric'; - TokenName[Token.Punctuator] = 'Punctuator'; - TokenName[Token.StringLiteral] = 'String'; - TokenName[Token.RegularExpression] = 'RegularExpression'; - - // A function following one of those tokens is an expression. - FnExprTokens = ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new', - 'return', 'case', 'delete', 'throw', 'void', - // assignment operators - '=', '+=', '-=', '*=', '/=', '%=', '<<=', '>>=', '>>>=', - '&=', '|=', '^=', ',', - // binary/unary operators - '+', '-', '*', '/', '%', '++', '--', '<<', '>>', '>>>', '&', - '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=', - '<=', '<', '>', '!=', '!==']; - - Syntax = { - AssignmentExpression: 'AssignmentExpression', - ArrayExpression: 'ArrayExpression', - BlockStatement: 'BlockStatement', - BinaryExpression: 'BinaryExpression', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DoWhileStatement: 'DoWhileStatement', - DebuggerStatement: 'DebuggerStatement', - EmptyStatement: 'EmptyStatement', - ExpressionStatement: 'ExpressionStatement', - ForStatement: 'ForStatement', - ForInStatement: 'ForInStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - Identifier: 'Identifier', - IfStatement: 'IfStatement', - Literal: 'Literal', - LabeledStatement: 'LabeledStatement', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - Program: 'Program', - Property: 'Property', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SwitchStatement: 'SwitchStatement', - SwitchCase: 'SwitchCase', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TryStatement: 'TryStatement', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement' - }; - - PropertyKind = { - Data: 1, - Get: 2, - Set: 4 - }; - - // Error messages should be identical to V8. - Messages = { - UnexpectedToken: 'Unexpected token %0', - UnexpectedNumber: 'Unexpected number', - UnexpectedString: 'Unexpected string', - UnexpectedIdentifier: 'Unexpected identifier', - UnexpectedReserved: 'Unexpected reserved word', - UnexpectedEOS: 'Unexpected end of input', - NewlineAfterThrow: 'Illegal newline after throw', - InvalidRegExp: 'Invalid regular expression', - UnterminatedRegExp: 'Invalid regular expression: missing /', - InvalidLHSInAssignment: 'Invalid left-hand side in assignment', - InvalidLHSInForIn: 'Invalid left-hand side in for-in', - MultipleDefaultsInSwitch: 'More than one default clause in switch statement', - NoCatchOrFinally: 'Missing catch or finally after try', - UnknownLabel: 'Undefined label \'%0\'', - Redeclaration: '%0 \'%1\' has already been declared', - IllegalContinue: 'Illegal continue statement', - IllegalBreak: 'Illegal break statement', - IllegalReturn: 'Illegal return statement', - StrictModeWith: 'Strict mode code may not include a with statement', - StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', - StrictVarName: 'Variable name may not be eval or arguments in strict mode', - StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', - StrictParamDupe: 'Strict mode function may not have duplicate parameter names', - StrictFunctionName: 'Function name may not be eval or arguments in strict mode', - StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', - StrictDelete: 'Delete of an unqualified identifier in strict mode.', - StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode', - AccessorDataProperty: 'Object literal may not have data and accessor property with the same name', - AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name', - StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', - StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', - StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', - StrictReservedWord: 'Use of future reserved word in strict mode' - }; - - // See also tools/generate-unicode-regex.py. - Regex = { - NonAsciiIdentifierStart: new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\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\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\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-\u0C33\u0C35-\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-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\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-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\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]'), - NonAsciiIdentifierPart: new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\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\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\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-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\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\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-\u16F0\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-\u191C\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\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\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-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\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-\uFE26\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]') - }; - - // Ensure the condition is true, otherwise throw an error. - // This is only to have a better contract semantic, i.e. another safety net - // to catch a logic error. The condition shall be fulfilled in normal case. - // Do NOT use this to enforce a certain condition on any user input. - - function assert(condition, message) { - /* istanbul ignore if */ - if (!condition) { - throw new Error('ASSERT: ' + message); - } - } - - function isDecimalDigit(ch) { - return (ch >= 48 && ch <= 57); // 0..9 - } - - function isHexDigit(ch) { - return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; - } - - function isOctalDigit(ch) { - return '01234567'.indexOf(ch) >= 0; - } - - - // 7.2 White Space - - function isWhiteSpace(ch) { - return (ch === 0x20) || (ch === 0x09) || (ch === 0x0B) || (ch === 0x0C) || (ch === 0xA0) || - (ch >= 0x1680 && [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(ch) >= 0); - } - - // 7.3 Line Terminators - - function isLineTerminator(ch) { - return (ch === 0x0A) || (ch === 0x0D) || (ch === 0x2028) || (ch === 0x2029); - } - - // 7.6 Identifier Names and Identifiers - - function isIdentifierStart(ch) { - return (ch == 0x40) || (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore) - (ch >= 0x41 && ch <= 0x5A) || // A..Z - (ch >= 0x61 && ch <= 0x7A) || // a..z - (ch === 0x5C) || // \ (backslash) - ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))); - } - - function isIdentifierPart(ch) { - return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore) - (ch >= 0x41 && ch <= 0x5A) || // A..Z - (ch >= 0x61 && ch <= 0x7A) || // a..z - (ch >= 0x30 && ch <= 0x39) || // 0..9 - (ch === 0x5C) || // \ (backslash) - ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))); - } - - // 7.6.1.2 Future Reserved Words - - function isFutureReservedWord(id) { - switch (id) { - case 'class': - case 'enum': - case 'export': - case 'extends': - case 'import': - case 'super': - return true; - default: - return false; - } - } - - function isStrictModeReservedWord(id) { - switch (id) { - case 'implements': - case 'interface': - case 'package': - case 'private': - case 'protected': - case 'public': - case 'static': - case 'yield': - case 'let': - return true; - default: - return false; - } - } - - function isRestrictedWord(id) { - return id === 'eval' || id === 'arguments'; - } - - // 7.6.1.1 Keywords - - function isKeyword(id) { - if (strict && isStrictModeReservedWord(id)) { - return true; - } - - // 'const' is specialized as Keyword in V8. - // 'yield' and 'let' are for compatiblity with SpiderMonkey and ES.next. - // Some others are from future reserved words. - - switch (id.length) { - case 2: - return (id === 'if') || (id === 'in') || (id === 'do'); - case 3: - return (id === 'var') || (id === 'for') || (id === 'new') || - (id === 'try') || (id === 'let'); - case 4: - return (id === 'this') || (id === 'else') || (id === 'case') || - (id === 'void') || (id === 'with') || (id === 'enum'); - case 5: - return (id === 'while') || (id === 'break') || (id === 'catch') || - (id === 'throw') || (id === 'const') || (id === 'yield') || - (id === 'class') || (id === 'super'); - case 6: - return (id === 'return') || (id === 'typeof') || (id === 'delete') || - (id === 'switch') || (id === 'export') || (id === 'import'); - case 7: - return (id === 'default') || (id === 'finally') || (id === 'extends'); - case 8: - return (id === 'function') || (id === 'continue') || (id === 'debugger'); - case 10: - return (id === 'instanceof'); - default: - return false; - } - } - - // 7.4 Comments - - function addComment(type, value, start, end, loc) { - var comment, attacher; - - assert(typeof start === 'number', 'Comment must have valid position'); - - // Because the way the actual token is scanned, often the comments - // (if any) are skipped twice during the lexical analysis. - // Thus, we need to skip adding a comment if the comment array already - // handled it. - if (state.lastCommentStart >= start) { - return; - } - state.lastCommentStart = start; - - comment = { - type: type, - value: value - }; - if (extra.range) { - comment.range = [start, end]; - } - if (extra.loc) { - comment.loc = loc; - } - extra.comments.push(comment); - if (extra.attachComment) { - extra.leadingComments.push(comment); - extra.trailingComments.push(comment); - } - } - - function skipSingleLineComment(offset) { - var start, loc, ch, comment; - - start = index - offset; - loc = { - start: { - line: lineNumber, - column: index - lineStart - offset - } - }; - - while (index < length) { - ch = source.charCodeAt(index); - ++index; - if (isLineTerminator(ch)) { - if (extra.comments) { - comment = source.slice(start + offset, index - 1); - loc.end = { - line: lineNumber, - column: index - lineStart - 1 - }; - addComment('Line', comment, start, index - 1, loc); - } - if (ch === 13 && source.charCodeAt(index) === 10) { - ++index; - } - ++lineNumber; - lineStart = index; - return; - } - } - - if (extra.comments) { - comment = source.slice(start + offset, index); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - addComment('Line', comment, start, index, loc); - } - } - - function skipMultiLineComment() { - var start, loc, ch, comment; - - if (extra.comments) { - start = index - 2; - loc = { - start: { - line: lineNumber, - column: index - lineStart - 2 - } - }; - } - - while (index < length) { - ch = source.charCodeAt(index); - if (isLineTerminator(ch)) { - if (ch === 0x0D && source.charCodeAt(index + 1) === 0x0A) { - ++index; - } - ++lineNumber; - ++index; - lineStart = index; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else if (ch === 0x2A) { - // Block comment ends with '*/'. - if (source.charCodeAt(index + 1) === 0x2F) { - ++index; - ++index; - if (extra.comments) { - comment = source.slice(start + 2, index - 2); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - addComment('Block', comment, start, index, loc); - } - return; - } - ++index; - } else { - ++index; - } - } - - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - function skipComment() { - var ch, start; - - start = (index === 0); - while (index < length) { - ch = source.charCodeAt(index); - - if (isWhiteSpace(ch)) { - ++index; - } else if (isLineTerminator(ch)) { - ++index; - if (ch === 0x0D && source.charCodeAt(index) === 0x0A) { - ++index; - } - ++lineNumber; - lineStart = index; - start = true; - } else if (ch === 0x2F) { // U+002F is '/' - ch = source.charCodeAt(index + 1); - if (ch === 0x2F) { - ++index; - ++index; - skipSingleLineComment(2); - start = true; - } else if (ch === 0x2A) { // U+002A is '*' - ++index; - ++index; - skipMultiLineComment(); - } else { - break; - } - } else if (start && ch === 0x2D) { // U+002D is '-' - // U+003E is '>' - if ((source.charCodeAt(index + 1) === 0x2D) && (source.charCodeAt(index + 2) === 0x3E)) { - // '-->' is a single-line comment - index += 3; - skipSingleLineComment(3); - } else { - break; - } - } else if (ch === 0x3C) { // U+003C is '<' - if (source.slice(index + 1, index + 4) === '!--') { - ++index; // `<` - ++index; // `!` - ++index; // `-` - ++index; // `-` - skipSingleLineComment(4); - } else { - break; - } - } else { - break; - } - } - } - - function scanHexEscape(prefix) { - var i, len, ch, code = 0; - - len = (prefix === 'u') ? 4 : 2; - for (i = 0; i < len; ++i) { - if (index < length && isHexDigit(source[index])) { - ch = source[index++]; - code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); - } else { - return ''; - } - } - return String.fromCharCode(code); - } - - function getEscapedIdentifier() { - var ch, id; - - ch = source.charCodeAt(index++); - id = String.fromCharCode(ch); - - // '\u' (U+005C, U+0075) denotes an escaped character. - if (ch === 0x5C) { - if (source.charCodeAt(index) !== 0x75) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - ++index; - ch = scanHexEscape('u'); - if (!ch || ch === '\\' || !isIdentifierStart(ch.charCodeAt(0))) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - id = ch; - } - - while (index < length) { - ch = source.charCodeAt(index); - if (!isIdentifierPart(ch)) { - break; - } - ++index; - id += String.fromCharCode(ch); - - // '\u' (U+005C, U+0075) denotes an escaped character. - if (ch === 0x5C) { - id = id.substr(0, id.length - 1); - if (source.charCodeAt(index) !== 0x75) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - ++index; - ch = scanHexEscape('u'); - if (!ch || ch === '\\' || !isIdentifierPart(ch.charCodeAt(0))) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - id += ch; - } - } - - return id; - } - - function getIdentifier() { - var start, ch; - - start = index++; - while (index < length) { - ch = source.charCodeAt(index); - if (ch === 0x5C) { - // Blackslash (U+005C) marks Unicode escape sequence. - index = start; - return getEscapedIdentifier(); - } - if (isIdentifierPart(ch)) { - ++index; - } else { - break; - } - } - - return source.slice(start, index); - } - - function scanIdentifier() { - var start, id, type; - - start = index; - - // Backslash (U+005C) starts an escaped character. - id = (source.charCodeAt(index) === 0x5C) ? getEscapedIdentifier() : getIdentifier(); - - // There is no keyword or literal with only one character. - // Thus, it must be an identifier. - if (id.length === 1) { - type = Token.Identifier; - } else if (isKeyword(id)) { - type = Token.Keyword; - } else if (id === 'null') { - type = Token.NullLiteral; - } else if (id === 'true' || id === 'false') { - type = Token.BooleanLiteral; - } else { - type = Token.Identifier; - } - - return { - type: type, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - - // 7.7 Punctuators - - function scanPunctuator() { - var start = index, - code = source.charCodeAt(index), - code2, - ch1 = source[index], - ch2, - ch3, - ch4; - - switch (code) { - - // Check for most common single-character punctuators. - case 0x2E: // . dot - case 0x28: // ( open bracket - case 0x29: // ) close bracket - case 0x3B: // ; semicolon - case 0x2C: // , comma - case 0x7B: // { open curly brace - case 0x7D: // } close curly brace - case 0x5B: // [ - case 0x5D: // ] - case 0x3A: // : - case 0x3F: // ? - case 0x7E: // ~ - ++index; - if (extra.tokenize) { - if (code === 0x28) { - extra.openParenToken = extra.tokens.length; - } else if (code === 0x7B) { - extra.openCurlyToken = extra.tokens.length; - } - } - return { - type: Token.Punctuator, - value: String.fromCharCode(code), - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - - default: - code2 = source.charCodeAt(index + 1); - - // '=' (U+003D) marks an assignment or comparison operator. - if (code2 === 0x3D) { - switch (code) { - case 0x2B: // + - case 0x2D: // - - case 0x2F: // / - case 0x3C: // < - case 0x3E: // > - case 0x5E: // ^ - case 0x7C: // | - case 0x25: // % - case 0x26: // & - case 0x2A: // * - index += 2; - return { - type: Token.Punctuator, - value: String.fromCharCode(code) + String.fromCharCode(code2), - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - - case 0x21: // ! - case 0x3D: // = - index += 2; - - // !== and === - if (source.charCodeAt(index) === 0x3D) { - ++index; - } - return { - type: Token.Punctuator, - value: source.slice(start, index), - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - } - } - - // 4-character punctuator: >>>= - - ch4 = source.substr(index, 4); - - if (ch4 === '>>>=') { - index += 4; - return { - type: Token.Punctuator, - value: ch4, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - // 3-character punctuators: === !== >>> <<= >>= - - ch3 = ch4.substr(0, 3); - - if (ch3 === '>>>' || ch3 === '<<=' || ch3 === '>>=') { - index += 3; - return { - type: Token.Punctuator, - value: ch3, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - // Other 2-character punctuators: ++ -- << >> && || - ch2 = ch3.substr(0, 2); - - if ((ch1 === ch2[1] && ('+-<>&|'.indexOf(ch1) >= 0)) || ch2 === '=>') { - index += 2; - return { - type: Token.Punctuator, - value: ch2, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - // 1-character punctuators: < > = ! + - * % & | ^ / - if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) { - ++index; - return { - type: Token.Punctuator, - value: ch1, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - // 7.8.3 Numeric Literals - - function scanHexLiteral(start) { - var number = ''; - - while (index < length) { - if (!isHexDigit(source[index])) { - break; - } - number += source[index++]; - } - - if (number.length === 0) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - if (isIdentifierStart(source.charCodeAt(index))) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - return { - type: Token.NumericLiteral, - value: parseInt('0x' + number, 16), - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - function scanOctalLiteral(start) { - var number = '0' + source[index++]; - while (index < length) { - if (!isOctalDigit(source[index])) { - break; - } - number += source[index++]; - } - - if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - return { - type: Token.NumericLiteral, - value: parseInt(number, 8), - octal: true, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - function scanNumericLiteral() { - var number, start, ch; - - ch = source[index]; - assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), - 'Numeric literal must start with a decimal digit or a decimal point'); - - start = index; - number = ''; - if (ch !== '.') { - number = source[index++]; - ch = source[index]; - - // Hex number starts with '0x'. - // Octal number starts with '0'. - if (number === '0') { - if (ch === 'x' || ch === 'X') { - ++index; - return scanHexLiteral(start); - } - if (isOctalDigit(ch)) { - return scanOctalLiteral(start); - } - - // decimal number starts with '0' such as '09' is illegal. - if (ch && isDecimalDigit(ch.charCodeAt(0))) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - while (isDecimalDigit(source.charCodeAt(index))) { - number += source[index++]; - } - ch = source[index]; - } - - if (ch === '.') { - number += source[index++]; - while (isDecimalDigit(source.charCodeAt(index))) { - number += source[index++]; - } - ch = source[index]; - } - - if (ch === 'e' || ch === 'E') { - number += source[index++]; - - ch = source[index]; - if (ch === '+' || ch === '-') { - number += source[index++]; - } - if (isDecimalDigit(source.charCodeAt(index))) { - while (isDecimalDigit(source.charCodeAt(index))) { - number += source[index++]; - } - } else { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - if (isIdentifierStart(source.charCodeAt(index))) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - return { - type: Token.NumericLiteral, - value: parseFloat(number), - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - // 7.8.4 String Literals - - function scanStringLiteral() { - var str = '', quote, start, ch, code, unescaped, restore, octal = false, startLineNumber, startLineStart; - startLineNumber = lineNumber; - startLineStart = lineStart; - - quote = source[index]; - assert((quote === '\'' || quote === '"'), - 'String literal must starts with a quote'); - - start = index; - ++index; - - while (index < length) { - ch = source[index++]; - - if (ch === quote) { - quote = ''; - break; - } else if (ch === '\\') { - ch = source[index++]; - if (!ch || !isLineTerminator(ch.charCodeAt(0))) { - switch (ch) { - case 'u': - case 'x': - restore = index; - unescaped = scanHexEscape(ch); - if (unescaped) { - str += unescaped; - } else { - index = restore; - str += ch; - } - break; - case 'n': - str += '\n'; - break; - case 'r': - str += '\r'; - break; - case 't': - str += '\t'; - break; - case 'b': - str += '\b'; - break; - case 'f': - str += '\f'; - break; - case 'v': - str += '\x0B'; - break; - - default: - if (isOctalDigit(ch)) { - code = '01234567'.indexOf(ch); - - // \0 is not octal escape sequence - if (code !== 0) { - octal = true; - } - - if (index < length && isOctalDigit(source[index])) { - octal = true; - code = code * 8 + '01234567'.indexOf(source[index++]); - - // 3 digits are only allowed when string starts - // with 0, 1, 2, 3 - if ('0123'.indexOf(ch) >= 0 && - index < length && - isOctalDigit(source[index])) { - code = code * 8 + '01234567'.indexOf(source[index++]); - } - } - str += String.fromCharCode(code); - } else { - str += ch; - } - break; - } - } else { - ++lineNumber; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - lineStart = index; - } - } else if (isLineTerminator(ch.charCodeAt(0))) { - break; - } else { - str += ch; - } - } - - if (quote !== '') { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - return { - type: Token.StringLiteral, - value: str, - octal: octal, - startLineNumber: startLineNumber, - startLineStart: startLineStart, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - function testRegExp(pattern, flags) { - var value; - try { - value = new RegExp(pattern, flags); - } catch (e) { - throwError({}, Messages.InvalidRegExp); - } - return value; - } - - function scanRegExpBody() { - var ch, str, classMarker, terminated, body; - - ch = source[index]; - assert(ch === '/', 'Regular expression literal must start with a slash'); - str = source[index++]; - - classMarker = false; - terminated = false; - while (index < length) { - ch = source[index++]; - str += ch; - if (ch === '\\') { - ch = source[index++]; - // ECMA-262 7.8.5 - if (isLineTerminator(ch.charCodeAt(0))) { - throwError({}, Messages.UnterminatedRegExp); - } - str += ch; - } else if (isLineTerminator(ch.charCodeAt(0))) { - throwError({}, Messages.UnterminatedRegExp); - } else if (classMarker) { - if (ch === ']') { - classMarker = false; - } - } else { - if (ch === '/') { - terminated = true; - break; - } else if (ch === '[') { - classMarker = true; - } - } - } - - if (!terminated) { - throwError({}, Messages.UnterminatedRegExp); - } - - // Exclude leading and trailing slash. - body = str.substr(1, str.length - 2); - return { - value: body, - literal: str - }; - } - - function scanRegExpFlags() { - var ch, str, flags, restore; - - str = ''; - flags = ''; - while (index < length) { - ch = source[index]; - if (!isIdentifierPart(ch.charCodeAt(0))) { - break; - } - - ++index; - if (ch === '\\' && index < length) { - ch = source[index]; - if (ch === 'u') { - ++index; - restore = index; - ch = scanHexEscape('u'); - if (ch) { - flags += ch; - for (str += '\\u'; restore < index; ++restore) { - str += source[restore]; - } - } else { - index = restore; - flags += 'u'; - str += '\\u'; - } - throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL'); - } else { - str += '\\'; - throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - flags += ch; - str += ch; - } - } - - return { - value: flags, - literal: str - }; - } - - function scanRegExp() { - var start, body, flags, pattern, value; - - lookahead = null; - skipComment(); - start = index; - - body = scanRegExpBody(); - flags = scanRegExpFlags(); - value = testRegExp(body.value, flags.value); - - if (extra.tokenize) { - return { - type: Token.RegularExpression, - value: value, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - return { - literal: body.literal + flags.literal, - value: value, - start: start, - end: index - }; - } - - function collectRegex() { - var pos, loc, regex, token; - - skipComment(); - - pos = index; - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - - regex = scanRegExp(); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - - /* istanbul ignore next */ - if (!extra.tokenize) { - // Pop the previous token, which is likely '/' or '/=' - if (extra.tokens.length > 0) { - token = extra.tokens[extra.tokens.length - 1]; - if (token.range[0] === pos && token.type === 'Punctuator') { - if (token.value === '/' || token.value === '/=') { - extra.tokens.pop(); - } - } - } - - extra.tokens.push({ - type: 'RegularExpression', - value: regex.literal, - range: [pos, index], - loc: loc - }); - } - - return regex; - } - - function isIdentifierName(token) { - return token.type === Token.Identifier || - token.type === Token.Keyword || - token.type === Token.BooleanLiteral || - token.type === Token.NullLiteral; - } - - function advanceSlash() { - var prevToken, - checkToken; - // Using the following algorithm: - // https://github.com/mozilla/sweet.js/wiki/design - prevToken = extra.tokens[extra.tokens.length - 1]; - if (!prevToken) { - // Nothing before that: it cannot be a division. - return collectRegex(); - } - if (prevToken.type === 'Punctuator') { - if (prevToken.value === ']') { - return scanPunctuator(); - } - if (prevToken.value === ')') { - checkToken = extra.tokens[extra.openParenToken - 1]; - if (checkToken && - checkToken.type === 'Keyword' && - (checkToken.value === 'if' || - checkToken.value === 'while' || - checkToken.value === 'for' || - checkToken.value === 'with')) { - return collectRegex(); - } - return scanPunctuator(); - } - if (prevToken.value === '}') { - // Dividing a function by anything makes little sense, - // but we have to check for that. - if (extra.tokens[extra.openCurlyToken - 3] && - extra.tokens[extra.openCurlyToken - 3].type === 'Keyword') { - // Anonymous function. - checkToken = extra.tokens[extra.openCurlyToken - 4]; - if (!checkToken) { - return scanPunctuator(); - } - } else if (extra.tokens[extra.openCurlyToken - 4] && - extra.tokens[extra.openCurlyToken - 4].type === 'Keyword') { - // Named function. - checkToken = extra.tokens[extra.openCurlyToken - 5]; - if (!checkToken) { - return collectRegex(); - } - } else { - return scanPunctuator(); - } - // checkToken determines whether the function is - // a declaration or an expression. - if (FnExprTokens.indexOf(checkToken.value) >= 0) { - // It is an expression. - return scanPunctuator(); - } - // It is a declaration. - return collectRegex(); - } - return collectRegex(); - } - if (prevToken.type === 'Keyword') { - return collectRegex(); - } - return scanPunctuator(); - } - - function advance() { - var ch; - - skipComment(); - - if (index >= length) { - return { - type: Token.EOF, - lineNumber: lineNumber, - lineStart: lineStart, - start: index, - end: index - }; - } - - ch = source.charCodeAt(index); - - if (isIdentifierStart(ch)) { - return scanIdentifier(); - } - - // Very common: ( and ) and ; - if (ch === 0x28 || ch === 0x29 || ch === 0x3B) { - return scanPunctuator(); - } - - // String literal starts with single quote (U+0027) or double quote (U+0022). - if (ch === 0x27 || ch === 0x22) { - return scanStringLiteral(); - } - - - // Dot (.) U+002E can also start a floating-point number, hence the need - // to check the next character. - if (ch === 0x2E) { - if (isDecimalDigit(source.charCodeAt(index + 1))) { - return scanNumericLiteral(); - } - return scanPunctuator(); - } - - if (isDecimalDigit(ch)) { - return scanNumericLiteral(); - } - - // Slash (/) U+002F can also start a regex. - if (extra.tokenize && ch === 0x2F) { - return advanceSlash(); - } - - return scanPunctuator(); - } - - function collectToken() { - var loc, token, range, value; - - skipComment(); - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - - token = advance(); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - - if (token.type !== Token.EOF) { - value = source.slice(token.start, token.end); - extra.tokens.push({ - type: TokenName[token.type], - value: value, - range: [token.start, token.end], - loc: loc - }); - } - - return token; - } - - function lex() { - var token; - - token = lookahead; - index = token.end; - lineNumber = token.lineNumber; - lineStart = token.lineStart; - - lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance(); - - index = token.end; - lineNumber = token.lineNumber; - lineStart = token.lineStart; - - return token; - } - - function peek() { - var pos, line, start; - - pos = index; - line = lineNumber; - start = lineStart; - lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance(); - index = pos; - lineNumber = line; - lineStart = start; - } - - function Position(line, column) { - this.line = line; - this.column = column; - } - - function SourceLocation(startLine, startColumn, line, column) { - this.start = new Position(startLine, startColumn); - this.end = new Position(line, column); - } - - SyntaxTreeDelegate = { - - name: 'SyntaxTree', - - processComment: function (node) { - var lastChild, trailingComments; - - if (node.type === Syntax.Program) { - if (node.body.length > 0) { - return; - } - } - - if (extra.trailingComments.length > 0) { - if (extra.trailingComments[0].range[0] >= node.range[1]) { - trailingComments = extra.trailingComments; - extra.trailingComments = []; - } else { - extra.trailingComments.length = 0; - } - } else { - if (extra.bottomRightStack.length > 0 && - extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments && - extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments[0].range[0] >= node.range[1]) { - trailingComments = extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments; - delete extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments; - } - } - - // Eating the stack. - while (extra.bottomRightStack.length > 0 && extra.bottomRightStack[extra.bottomRightStack.length - 1].range[0] >= node.range[0]) { - lastChild = extra.bottomRightStack.pop(); - } - - if (lastChild) { - if (lastChild.leadingComments && lastChild.leadingComments[lastChild.leadingComments.length - 1].range[1] <= node.range[0]) { - node.leadingComments = lastChild.leadingComments; - delete lastChild.leadingComments; - } - } else if (extra.leadingComments.length > 0 && extra.leadingComments[extra.leadingComments.length - 1].range[1] <= node.range[0]) { - node.leadingComments = extra.leadingComments; - extra.leadingComments = []; - } - - - if (trailingComments) { - node.trailingComments = trailingComments; - } - - extra.bottomRightStack.push(node); - }, - - markEnd: function (node, startToken) { - if (extra.range) { - node.range = [startToken.start, index]; - } - if (extra.loc) { - node.loc = new SourceLocation( - startToken.startLineNumber === undefined ? startToken.lineNumber : startToken.startLineNumber, - startToken.start - (startToken.startLineStart === undefined ? startToken.lineStart : startToken.startLineStart), - lineNumber, - index - lineStart - ); - this.postProcess(node); - } - - if (extra.attachComment) { - this.processComment(node); - } - return node; - }, - - postProcess: function (node) { - if (extra.source) { - node.loc.source = extra.source; - } - return node; - }, - - createArrayExpression: function (elements) { - return { - type: Syntax.ArrayExpression, - elements: elements - }; - }, - - createAssignmentExpression: function (operator, left, right) { - return { - type: Syntax.AssignmentExpression, - operator: operator, - left: left, - right: right - }; - }, - - createBinaryExpression: function (operator, left, right) { - var type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression : - Syntax.BinaryExpression; - return { - type: type, - operator: operator, - left: left, - right: right - }; - }, - - createBlockStatement: function (body) { - return { - type: Syntax.BlockStatement, - body: body - }; - }, - - createBreakStatement: function (label) { - return { - type: Syntax.BreakStatement, - label: label - }; - }, - - createCallExpression: function (callee, args) { - return { - type: Syntax.CallExpression, - callee: callee, - 'arguments': args - }; - }, - - createCatchClause: function (param, body) { - return { - type: Syntax.CatchClause, - param: param, - body: body - }; - }, - - createConditionalExpression: function (test, consequent, alternate) { - return { - type: Syntax.ConditionalExpression, - test: test, - consequent: consequent, - alternate: alternate - }; - }, - - createContinueStatement: function (label) { - return { - type: Syntax.ContinueStatement, - label: label - }; - }, - - createDebuggerStatement: function () { - return { - type: Syntax.DebuggerStatement - }; - }, - - createDoWhileStatement: function (body, test) { - return { - type: Syntax.DoWhileStatement, - body: body, - test: test - }; - }, - - createEmptyStatement: function () { - return { - type: Syntax.EmptyStatement - }; - }, - - createExpressionStatement: function (expression) { - return { - type: Syntax.ExpressionStatement, - expression: expression - }; - }, - - createForStatement: function (init, test, update, body) { - return { - type: Syntax.ForStatement, - init: init, - test: test, - update: update, - body: body - }; - }, - - createForInStatement: function (left, right, body) { - return { - type: Syntax.ForInStatement, - left: left, - right: right, - body: body, - each: false - }; - }, - - createFunctionDeclaration: function (id, params, defaults, body) { - return { - type: Syntax.FunctionDeclaration, - id: id, - params: params, - defaults: defaults, - body: body, - rest: null, - generator: false, - expression: false - }; - }, - - createFunctionExpression: function (id, params, defaults, body) { - return { - type: Syntax.FunctionExpression, - id: id, - params: params, - defaults: defaults, - body: body, - rest: null, - generator: false, - expression: false - }; - }, - - createIdentifier: function (name) { - return { - type: Syntax.Identifier, - name: name - }; - }, - - createIfStatement: function (test, consequent, alternate) { - return { - type: Syntax.IfStatement, - test: test, - consequent: consequent, - alternate: alternate - }; - }, - - createLabeledStatement: function (label, body) { - return { - type: Syntax.LabeledStatement, - label: label, - body: body - }; - }, - - createLiteral: function (token) { - return { - type: Syntax.Literal, - value: token.value, - raw: source.slice(token.start, token.end) - }; - }, - - createMemberExpression: function (accessor, object, property) { - return { - type: Syntax.MemberExpression, - computed: accessor === '[', - object: object, - property: property - }; - }, - - createNewExpression: function (callee, args) { - return { - type: Syntax.NewExpression, - callee: callee, - 'arguments': args - }; - }, - - createObjectExpression: function (properties) { - return { - type: Syntax.ObjectExpression, - properties: properties - }; - }, - - createPostfixExpression: function (operator, argument) { - return { - type: Syntax.UpdateExpression, - operator: operator, - argument: argument, - prefix: false - }; - }, - - createProgram: function (body) { - return { - type: Syntax.Program, - body: body - }; - }, - - createProperty: function (kind, key, value) { - return { - type: Syntax.Property, - key: key, - value: value, - kind: kind - }; - }, - - createReturnStatement: function (argument) { - return { - type: Syntax.ReturnStatement, - argument: argument - }; - }, - - createSequenceExpression: function (expressions) { - return { - type: Syntax.SequenceExpression, - expressions: expressions - }; - }, - - createSwitchCase: function (test, consequent) { - return { - type: Syntax.SwitchCase, - test: test, - consequent: consequent - }; - }, - - createSwitchStatement: function (discriminant, cases) { - return { - type: Syntax.SwitchStatement, - discriminant: discriminant, - cases: cases - }; - }, - - createThisExpression: function () { - return { - type: Syntax.ThisExpression - }; - }, - - createThrowStatement: function (argument) { - return { - type: Syntax.ThrowStatement, - argument: argument - }; - }, - - createTryStatement: function (block, guardedHandlers, handlers, finalizer) { - return { - type: Syntax.TryStatement, - block: block, - guardedHandlers: guardedHandlers, - handlers: handlers, - finalizer: finalizer - }; - }, - - createUnaryExpression: function (operator, argument) { - if (operator === '++' || operator === '--') { - return { - type: Syntax.UpdateExpression, - operator: operator, - argument: argument, - prefix: true - }; - } - return { - type: Syntax.UnaryExpression, - operator: operator, - argument: argument, - prefix: true - }; - }, - - createVariableDeclaration: function (declarations, kind) { - return { - type: Syntax.VariableDeclaration, - declarations: declarations, - kind: kind - }; - }, - - createVariableDeclarator: function (id, init) { - return { - type: Syntax.VariableDeclarator, - id: id, - init: init - }; - }, - - createWhileStatement: function (test, body) { - return { - type: Syntax.WhileStatement, - test: test, - body: body - }; - }, - - createWithStatement: function (object, body) { - return { - type: Syntax.WithStatement, - object: object, - body: body - }; - } - }; - - // Return true if there is a line terminator before the next token. - - function peekLineTerminator() { - var pos, line, start, found; - - pos = index; - line = lineNumber; - start = lineStart; - skipComment(); - found = lineNumber !== line; - index = pos; - lineNumber = line; - lineStart = start; - - return found; - } - - // Throw an exception - - function throwError(token, messageFormat) { - var error, - args = Array.prototype.slice.call(arguments, 2), - msg = messageFormat.replace( - /%(\d)/g, - function (whole, index) { - assert(index < args.length, 'Message reference must be in range'); - return args[index]; - } - ); - - if (typeof token.lineNumber === 'number') { - error = new Error('Line ' + token.lineNumber + ': ' + msg); - error.index = token.start; - error.lineNumber = token.lineNumber; - error.column = token.start - lineStart + 1; - } else { - error = new Error('Line ' + lineNumber + ': ' + msg); - error.index = index; - error.lineNumber = lineNumber; - error.column = index - lineStart + 1; - } - - error.description = msg; - throw error; - } - - function throwErrorTolerant() { - try { - throwError.apply(null, arguments); - } catch (e) { - if (extra.errors) { - extra.errors.push(e); - } else { - throw e; - } - } - } - - - // Throw an exception because of the token. - - function throwUnexpected(token) { - if (token.type === Token.EOF) { - throwError(token, Messages.UnexpectedEOS); - } - - if (token.type === Token.NumericLiteral) { - throwError(token, Messages.UnexpectedNumber); - } - - if (token.type === Token.StringLiteral) { - throwError(token, Messages.UnexpectedString); - } - - if (token.type === Token.Identifier) { - throwError(token, Messages.UnexpectedIdentifier); - } - - if (token.type === Token.Keyword) { - if (isFutureReservedWord(token.value)) { - throwError(token, Messages.UnexpectedReserved); - } else if (strict && isStrictModeReservedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictReservedWord); - return; - } - throwError(token, Messages.UnexpectedToken, token.value); - } - - // BooleanLiteral, NullLiteral, or Punctuator. - throwError(token, Messages.UnexpectedToken, token.value); - } - - // Expect the next token to match the specified punctuator. - // If not, an exception will be thrown. - - function expect(value) { - var token = lex(); - if (token.type !== Token.Punctuator || token.value !== value) { - throwUnexpected(token); - } - } - - // Expect the next token to match the specified keyword. - // If not, an exception will be thrown. - - function expectKeyword(keyword) { - var token = lex(); - if (token.type !== Token.Keyword || token.value !== keyword) { - throwUnexpected(token); - } - } - - // Return true if the next token matches the specified punctuator. - - function match(value) { - return lookahead.type === Token.Punctuator && lookahead.value === value; - } - - // Return true if the next token matches the specified keyword - - function matchKeyword(keyword) { - return lookahead.type === Token.Keyword && lookahead.value === keyword; - } - - // Return true if the next token is an assignment operator - - function matchAssign() { - var op; - - if (lookahead.type !== Token.Punctuator) { - return false; - } - op = lookahead.value; - return op === '=' || - op === '*=' || - op === '/=' || - op === '%=' || - op === '+=' || - op === '-=' || - op === '<<=' || - op === '>>=' || - op === '>>>=' || - op === '&=' || - op === '^=' || - op === '|='; - } - - function consumeSemicolon() { - var line; - - // Catch the very common case first: immediately a semicolon (U+003B). - if (source.charCodeAt(index) === 0x3B || match(';')) { - lex(); - return; - } - - line = lineNumber; - skipComment(); - if (lineNumber !== line) { - return; - } - - if (lookahead.type !== Token.EOF && !match('}')) { - throwUnexpected(lookahead); - } - } - - // Return true if provided expression is LeftHandSideExpression - - function isLeftHandSide(expr) { - return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression; - } - - // 11.1.4 Array Initialiser - - function parseArrayInitialiser() { - var elements = [], startToken; - - startToken = lookahead; - expect('['); - - while (!match(']')) { - if (match(',')) { - lex(); - elements.push(null); - } else { - elements.push(parseAssignmentExpression()); - - if (!match(']')) { - expect(','); - } - } - } - - lex(); - - return delegate.markEnd(delegate.createArrayExpression(elements), startToken); - } - - // 11.1.5 Object Initialiser - - function parsePropertyFunction(param, first) { - var previousStrict, body, startToken; - - previousStrict = strict; - startToken = lookahead; - body = parseFunctionSourceElements(); - if (first && strict && isRestrictedWord(param[0].name)) { - throwErrorTolerant(first, Messages.StrictParamName); - } - strict = previousStrict; - return delegate.markEnd(delegate.createFunctionExpression(null, param, [], body), startToken); - } - - function parseObjectPropertyKey() { - var token, startToken; - - startToken = lookahead; - token = lex(); - - // Note: This function is called only from parseObjectProperty(), where - // EOF and Punctuator tokens are already filtered out. - - if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) { - if (strict && token.octal) { - throwErrorTolerant(token, Messages.StrictOctalLiteral); - } - return delegate.markEnd(delegate.createLiteral(token), startToken); - } - - return delegate.markEnd(delegate.createIdentifier(token.value), startToken); - } - - function parseObjectProperty() { - var token, key, id, value, param, startToken; - - token = lookahead; - startToken = lookahead; - - if (token.type === Token.Identifier) { - - id = parseObjectPropertyKey(); - - // Property Assignment: Getter and Setter. - - if (token.value === 'get' && !match(':')) { - key = parseObjectPropertyKey(); - expect('('); - expect(')'); - value = parsePropertyFunction([]); - return delegate.markEnd(delegate.createProperty('get', key, value), startToken); - } - if (token.value === 'set' && !match(':')) { - key = parseObjectPropertyKey(); - expect('('); - token = lookahead; - if (token.type !== Token.Identifier) { - expect(')'); - throwErrorTolerant(token, Messages.UnexpectedToken, token.value); - value = parsePropertyFunction([]); - } else { - param = [ parseVariableIdentifier() ]; - expect(')'); - value = parsePropertyFunction(param, token); - } - return delegate.markEnd(delegate.createProperty('set', key, value), startToken); - } - expect(':'); - value = parseAssignmentExpression(); - return delegate.markEnd(delegate.createProperty('init', id, value), startToken); - } - if (token.type === Token.EOF || token.type === Token.Punctuator) { - throwUnexpected(token); - } else { - key = parseObjectPropertyKey(); - expect(':'); - value = parseAssignmentExpression(); - return delegate.markEnd(delegate.createProperty('init', key, value), startToken); - } - } - - function parseObjectInitialiser() { - var properties = [], property, name, key, kind, map = {}, toString = String, startToken; - - startToken = lookahead; - - expect('{'); - - while (!match('}')) { - property = parseObjectProperty(); - - if (property.key.type === Syntax.Identifier) { - name = property.key.name; - } else { - name = toString(property.key.value); - } - kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set; - - key = '$' + name; - if (Object.prototype.hasOwnProperty.call(map, key)) { - if (map[key] === PropertyKind.Data) { - if (strict && kind === PropertyKind.Data) { - throwErrorTolerant({}, Messages.StrictDuplicateProperty); - } else if (kind !== PropertyKind.Data) { - throwErrorTolerant({}, Messages.AccessorDataProperty); - } - } else { - if (kind === PropertyKind.Data) { - throwErrorTolerant({}, Messages.AccessorDataProperty); - } else if (map[key] & kind) { - throwErrorTolerant({}, Messages.AccessorGetSet); - } - } - map[key] |= kind; - } else { - map[key] = kind; - } - - properties.push(property); - - if (!match('}')) { - expect(','); - } - } - - expect('}'); - - return delegate.markEnd(delegate.createObjectExpression(properties), startToken); - } - - // 11.1.6 The Grouping Operator - - function parseGroupExpression() { - var expr; - - expect('('); - - expr = parseExpression(); - - expect(')'); - - return expr; - } - - - // 11.1 Primary Expressions - - function parsePrimaryExpression() { - var type, token, expr, startToken; - - if (match('(')) { - return parseGroupExpression(); - } - - if (match('[')) { - return parseArrayInitialiser(); - } - - if (match('{')) { - return parseObjectInitialiser(); - } - - type = lookahead.type; - startToken = lookahead; - - if (type === Token.Identifier) { - expr = delegate.createIdentifier(lex().value); - } else if (type === Token.StringLiteral || type === Token.NumericLiteral) { - if (strict && lookahead.octal) { - throwErrorTolerant(lookahead, Messages.StrictOctalLiteral); - } - expr = delegate.createLiteral(lex()); - } else if (type === Token.Keyword) { - if (matchKeyword('function')) { - return parseFunctionExpression(); - } - if (matchKeyword('this')) { - lex(); - expr = delegate.createThisExpression(); - } else { - throwUnexpected(lex()); - } - } else if (type === Token.BooleanLiteral) { - token = lex(); - token.value = (token.value === 'true'); - expr = delegate.createLiteral(token); - } else if (type === Token.NullLiteral) { - token = lex(); - token.value = null; - expr = delegate.createLiteral(token); - } else if (match('/') || match('/=')) { - if (typeof extra.tokens !== 'undefined') { - expr = delegate.createLiteral(collectRegex()); - } else { - expr = delegate.createLiteral(scanRegExp()); - } - peek(); - } else { - throwUnexpected(lex()); - } - - return delegate.markEnd(expr, startToken); - } - - // 11.2 Left-Hand-Side Expressions - - function parseArguments() { - var args = []; - - expect('('); - - if (!match(')')) { - while (index < length) { - args.push(parseAssignmentExpression()); - if (match(')')) { - break; - } - expect(','); - } - } - - expect(')'); - - return args; - } - - function parseNonComputedProperty() { - var token, startToken; - - startToken = lookahead; - token = lex(); - - if (!isIdentifierName(token)) { - throwUnexpected(token); - } - - return delegate.markEnd(delegate.createIdentifier(token.value), startToken); - } - - function parseNonComputedMember() { - expect('.'); - - return parseNonComputedProperty(); - } - - function parseComputedMember() { - var expr; - - expect('['); - - expr = parseExpression(); - - expect(']'); - - return expr; - } - - function parseNewExpression() { - var callee, args, startToken; - - startToken = lookahead; - expectKeyword('new'); - callee = parseLeftHandSideExpression(); - args = match('(') ? parseArguments() : []; - - return delegate.markEnd(delegate.createNewExpression(callee, args), startToken); - } - - function parseLeftHandSideExpressionAllowCall() { - var previousAllowIn, expr, args, property, startToken; - - startToken = lookahead; - - previousAllowIn = state.allowIn; - state.allowIn = true; - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - state.allowIn = previousAllowIn; - - for (;;) { - if (match('.')) { - property = parseNonComputedMember(); - expr = delegate.createMemberExpression('.', expr, property); - } else if (match('(')) { - args = parseArguments(); - expr = delegate.createCallExpression(expr, args); - } else if (match('[')) { - property = parseComputedMember(); - expr = delegate.createMemberExpression('[', expr, property); - } else { - break; - } - delegate.markEnd(expr, startToken); - } - - return expr; - } - - function parseLeftHandSideExpression() { - var previousAllowIn, expr, property, startToken; - - startToken = lookahead; - - previousAllowIn = state.allowIn; - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - state.allowIn = previousAllowIn; - - while (match('.') || match('[')) { - if (match('[')) { - property = parseComputedMember(); - expr = delegate.createMemberExpression('[', expr, property); - } else { - property = parseNonComputedMember(); - expr = delegate.createMemberExpression('.', expr, property); - } - delegate.markEnd(expr, startToken); - } - - return expr; - } - - // 11.3 Postfix Expressions - - function parsePostfixExpression() { - var expr, token, startToken = lookahead; - - expr = parseLeftHandSideExpressionAllowCall(); - - if (lookahead.type === Token.Punctuator) { - if ((match('++') || match('--')) && !peekLineTerminator()) { - // 11.3.1, 11.3.2 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant({}, Messages.StrictLHSPostfix); - } - - if (!isLeftHandSide(expr)) { - throwErrorTolerant({}, Messages.InvalidLHSInAssignment); - } - - token = lex(); - expr = delegate.markEnd(delegate.createPostfixExpression(token.value, expr), startToken); - } - } - - return expr; - } - - // 11.4 Unary Operators - - function parseUnaryExpression() { - var token, expr, startToken; - - if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) { - expr = parsePostfixExpression(); - } else if (match('++') || match('--')) { - startToken = lookahead; - token = lex(); - expr = parseUnaryExpression(); - // 11.4.4, 11.4.5 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant({}, Messages.StrictLHSPrefix); - } - - if (!isLeftHandSide(expr)) { - throwErrorTolerant({}, Messages.InvalidLHSInAssignment); - } - - expr = delegate.createUnaryExpression(token.value, expr); - expr = delegate.markEnd(expr, startToken); - } else if (match('+') || match('-') || match('~') || match('!')) { - startToken = lookahead; - token = lex(); - expr = parseUnaryExpression(); - expr = delegate.createUnaryExpression(token.value, expr); - expr = delegate.markEnd(expr, startToken); - } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) { - startToken = lookahead; - token = lex(); - expr = parseUnaryExpression(); - expr = delegate.createUnaryExpression(token.value, expr); - expr = delegate.markEnd(expr, startToken); - if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { - throwErrorTolerant({}, Messages.StrictDelete); - } - } else { - expr = parsePostfixExpression(); - } - - return expr; - } - - function binaryPrecedence(token, allowIn) { - var prec = 0; - - if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { - return 0; - } - - switch (token.value) { - case '||': - prec = 1; - break; - - case '&&': - prec = 2; - break; - - case '|': - prec = 3; - break; - - case '^': - prec = 4; - break; - - case '&': - prec = 5; - break; - - case '==': - case '!=': - case '===': - case '!==': - prec = 6; - break; - - case '<': - case '>': - case '<=': - case '>=': - case 'instanceof': - prec = 7; - break; - - case 'in': - prec = allowIn ? 7 : 0; - break; - - case '<<': - case '>>': - case '>>>': - prec = 8; - break; - - case '+': - case '-': - prec = 9; - break; - - case '*': - case '/': - case '%': - prec = 11; - break; - - default: - break; - } - - return prec; - } - - // 11.5 Multiplicative Operators - // 11.6 Additive Operators - // 11.7 Bitwise Shift Operators - // 11.8 Relational Operators - // 11.9 Equality Operators - // 11.10 Binary Bitwise Operators - // 11.11 Binary Logical Operators - - function parseBinaryExpression() { - var marker, markers, expr, token, prec, stack, right, operator, left, i; - - marker = lookahead; - left = parseUnaryExpression(); - - token = lookahead; - prec = binaryPrecedence(token, state.allowIn); - if (prec === 0) { - return left; - } - token.prec = prec; - lex(); - - markers = [marker, lookahead]; - right = parseUnaryExpression(); - - stack = [left, token, right]; - - while ((prec = binaryPrecedence(lookahead, state.allowIn)) > 0) { - - // Reduce: make a binary expression from the three topmost entries. - while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) { - right = stack.pop(); - operator = stack.pop().value; - left = stack.pop(); - expr = delegate.createBinaryExpression(operator, left, right); - markers.pop(); - marker = markers[markers.length - 1]; - delegate.markEnd(expr, marker); - stack.push(expr); - } - - // Shift. - token = lex(); - token.prec = prec; - stack.push(token); - markers.push(lookahead); - expr = parseUnaryExpression(); - stack.push(expr); - } - - // Final reduce to clean-up the stack. - i = stack.length - 1; - expr = stack[i]; - markers.pop(); - while (i > 1) { - expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr); - i -= 2; - marker = markers.pop(); - delegate.markEnd(expr, marker); - } - - return expr; - } - - - // 11.12 Conditional Operator - - function parseConditionalExpression() { - var expr, previousAllowIn, consequent, alternate, startToken; - - startToken = lookahead; - - expr = parseBinaryExpression(); - - if (match('?')) { - lex(); - previousAllowIn = state.allowIn; - state.allowIn = true; - consequent = parseAssignmentExpression(); - state.allowIn = previousAllowIn; - expect(':'); - alternate = parseAssignmentExpression(); - - expr = delegate.createConditionalExpression(expr, consequent, alternate); - delegate.markEnd(expr, startToken); - } - - return expr; - } - - // 11.13 Assignment Operators - - function parseAssignmentExpression() { - var token, left, right, node, startToken; - - token = lookahead; - startToken = lookahead; - - node = left = parseConditionalExpression(); - - if (matchAssign()) { - // LeftHandSideExpression - if (!isLeftHandSide(left)) { - throwErrorTolerant({}, Messages.InvalidLHSInAssignment); - } - - // 11.13.1 - if (strict && left.type === Syntax.Identifier && isRestrictedWord(left.name)) { - throwErrorTolerant(token, Messages.StrictLHSAssignment); - } - - token = lex(); - right = parseAssignmentExpression(); - node = delegate.markEnd(delegate.createAssignmentExpression(token.value, left, right), startToken); - } - - return node; - } - - // 11.14 Comma Operator - - function parseExpression() { - var expr, startToken = lookahead; - - expr = parseAssignmentExpression(); - - if (match(',')) { - expr = delegate.createSequenceExpression([ expr ]); - - while (index < length) { - if (!match(',')) { - break; - } - lex(); - expr.expressions.push(parseAssignmentExpression()); - } - - delegate.markEnd(expr, startToken); - } - - return expr; - } - - // 12.1 Block - - function parseStatementList() { - var list = [], - statement; - - while (index < length) { - if (match('}')) { - break; - } - statement = parseSourceElement(); - if (typeof statement === 'undefined') { - break; - } - list.push(statement); - } - - return list; - } - - function parseBlock() { - var block, startToken; - - startToken = lookahead; - expect('{'); - - block = parseStatementList(); - - expect('}'); - - return delegate.markEnd(delegate.createBlockStatement(block), startToken); - } - - // 12.2 Variable Statement - - function parseVariableIdentifier() { - var token, startToken; - - startToken = lookahead; - token = lex(); - - if (token.type !== Token.Identifier) { - throwUnexpected(token); - } - - return delegate.markEnd(delegate.createIdentifier(token.value), startToken); - } - - function parseVariableDeclaration(kind) { - var init = null, id, startToken; - - startToken = lookahead; - id = parseVariableIdentifier(); - - // 12.2.1 - if (strict && isRestrictedWord(id.name)) { - throwErrorTolerant({}, Messages.StrictVarName); - } - - if (kind === 'const') { - expect('='); - init = parseAssignmentExpression(); - } else if (match('=')) { - lex(); - init = parseAssignmentExpression(); - } - - return delegate.markEnd(delegate.createVariableDeclarator(id, init), startToken); - } - - function parseVariableDeclarationList(kind) { - var list = []; - - do { - list.push(parseVariableDeclaration(kind)); - if (!match(',')) { - break; - } - lex(); - } while (index < length); - - return list; - } - - function parseVariableStatement() { - var declarations; - - expectKeyword('var'); - - declarations = parseVariableDeclarationList(); - - consumeSemicolon(); - - return delegate.createVariableDeclaration(declarations, 'var'); - } - - // kind may be `const` or `let` - // Both are experimental and not in the specification yet. - // see http://wiki.ecmascript.org/doku.php?id=harmony:const - // and http://wiki.ecmascript.org/doku.php?id=harmony:let - function parseConstLetDeclaration(kind) { - var declarations, startToken; - - startToken = lookahead; - - expectKeyword(kind); - - declarations = parseVariableDeclarationList(kind); - - consumeSemicolon(); - - return delegate.markEnd(delegate.createVariableDeclaration(declarations, kind), startToken); - } - - // 12.3 Empty Statement - - function parseEmptyStatement() { - expect(';'); - return delegate.createEmptyStatement(); - } - - // 12.4 Expression Statement - - function parseExpressionStatement() { - var expr = parseExpression(); - consumeSemicolon(); - return delegate.createExpressionStatement(expr); - } - - // 12.5 If statement - - function parseIfStatement() { - var test, consequent, alternate; - - expectKeyword('if'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - consequent = parseStatement(); - - if (matchKeyword('else')) { - lex(); - alternate = parseStatement(); - } else { - alternate = null; - } - - return delegate.createIfStatement(test, consequent, alternate); - } - - // 12.6 Iteration Statements - - function parseDoWhileStatement() { - var body, test, oldInIteration; - - expectKeyword('do'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - expectKeyword('while'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - if (match(';')) { - lex(); - } - - return delegate.createDoWhileStatement(body, test); - } - - function parseWhileStatement() { - var test, body, oldInIteration; - - expectKeyword('while'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - return delegate.createWhileStatement(test, body); - } - - function parseForVariableDeclaration() { - var token, declarations, startToken; - - startToken = lookahead; - token = lex(); - declarations = parseVariableDeclarationList(); - - return delegate.markEnd(delegate.createVariableDeclaration(declarations, token.value), startToken); - } - - function parseForStatement() { - var init, test, update, left, right, body, oldInIteration; - - init = test = update = null; - - expectKeyword('for'); - - expect('('); - - if (match(';')) { - lex(); - } else { - if (matchKeyword('var') || matchKeyword('let')) { - state.allowIn = false; - init = parseForVariableDeclaration(); - state.allowIn = true; - - if (init.declarations.length === 1 && matchKeyword('in')) { - lex(); - left = init; - right = parseExpression(); - init = null; - } - } else { - state.allowIn = false; - init = parseExpression(); - state.allowIn = true; - - if (matchKeyword('in')) { - // LeftHandSideExpression - if (!isLeftHandSide(init)) { - throwErrorTolerant({}, Messages.InvalidLHSInForIn); - } - - lex(); - left = init; - right = parseExpression(); - init = null; - } - } - - if (typeof left === 'undefined') { - expect(';'); - } - } - - if (typeof left === 'undefined') { - - if (!match(';')) { - test = parseExpression(); - } - expect(';'); - - if (!match(')')) { - update = parseExpression(); - } - } - - expect(')'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - return (typeof left === 'undefined') ? - delegate.createForStatement(init, test, update, body) : - delegate.createForInStatement(left, right, body); - } - - // 12.7 The continue statement - - function parseContinueStatement() { - var label = null, key; - - expectKeyword('continue'); - - // Optimize the most common form: 'continue;'. - if (source.charCodeAt(index) === 0x3B) { - lex(); - - if (!state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return delegate.createContinueStatement(null); - } - - if (peekLineTerminator()) { - if (!state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return delegate.createContinueStatement(null); - } - - if (lookahead.type === Token.Identifier) { - label = parseVariableIdentifier(); - - key = '$' + label.name; - if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { - throwError({}, Messages.UnknownLabel, label.name); - } - } - - consumeSemicolon(); - - if (label === null && !state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return delegate.createContinueStatement(label); - } - - // 12.8 The break statement - - function parseBreakStatement() { - var label = null, key; - - expectKeyword('break'); - - // Catch the very common case first: immediately a semicolon (U+003B). - if (source.charCodeAt(index) === 0x3B) { - lex(); - - if (!(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return delegate.createBreakStatement(null); - } - - if (peekLineTerminator()) { - if (!(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return delegate.createBreakStatement(null); - } - - if (lookahead.type === Token.Identifier) { - label = parseVariableIdentifier(); - - key = '$' + label.name; - if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { - throwError({}, Messages.UnknownLabel, label.name); - } - } - - consumeSemicolon(); - - if (label === null && !(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return delegate.createBreakStatement(label); - } - - // 12.9 The return statement - - function parseReturnStatement() { - var argument = null; - - expectKeyword('return'); - - if (!state.inFunctionBody) { - throwErrorTolerant({}, Messages.IllegalReturn); - } - - // 'return' followed by a space and an identifier is very common. - if (source.charCodeAt(index) === 0x20) { - if (isIdentifierStart(source.charCodeAt(index + 1))) { - argument = parseExpression(); - consumeSemicolon(); - return delegate.createReturnStatement(argument); - } - } - - if (peekLineTerminator()) { - return delegate.createReturnStatement(null); - } - - if (!match(';')) { - if (!match('}') && lookahead.type !== Token.EOF) { - argument = parseExpression(); - } - } - - consumeSemicolon(); - - return delegate.createReturnStatement(argument); - } - - // 12.10 The with statement - - function parseWithStatement() { - var object, body; - - if (strict) { - // TODO(ikarienator): Should we update the test cases instead? - skipComment(); - throwErrorTolerant({}, Messages.StrictModeWith); - } - - expectKeyword('with'); - - expect('('); - - object = parseExpression(); - - expect(')'); - - body = parseStatement(); - - return delegate.createWithStatement(object, body); - } - - // 12.10 The swith statement - - function parseSwitchCase() { - var test, consequent = [], statement, startToken; - - startToken = lookahead; - if (matchKeyword('default')) { - lex(); - test = null; - } else { - expectKeyword('case'); - test = parseExpression(); - } - expect(':'); - - while (index < length) { - if (match('}') || matchKeyword('default') || matchKeyword('case')) { - break; - } - statement = parseStatement(); - consequent.push(statement); - } - - return delegate.markEnd(delegate.createSwitchCase(test, consequent), startToken); - } - - function parseSwitchStatement() { - var discriminant, cases, clause, oldInSwitch, defaultFound; - - expectKeyword('switch'); - - expect('('); - - discriminant = parseExpression(); - - expect(')'); - - expect('{'); - - cases = []; - - if (match('}')) { - lex(); - return delegate.createSwitchStatement(discriminant, cases); - } - - oldInSwitch = state.inSwitch; - state.inSwitch = true; - defaultFound = false; - - while (index < length) { - if (match('}')) { - break; - } - clause = parseSwitchCase(); - if (clause.test === null) { - if (defaultFound) { - throwError({}, Messages.MultipleDefaultsInSwitch); - } - defaultFound = true; - } - cases.push(clause); - } - - state.inSwitch = oldInSwitch; - - expect('}'); - - return delegate.createSwitchStatement(discriminant, cases); - } - - // 12.13 The throw statement - - function parseThrowStatement() { - var argument; - - expectKeyword('throw'); - - if (peekLineTerminator()) { - throwError({}, Messages.NewlineAfterThrow); - } - - argument = parseExpression(); - - consumeSemicolon(); - - return delegate.createThrowStatement(argument); - } - - // 12.14 The try statement - - function parseCatchClause() { - var param, body, startToken; - - startToken = lookahead; - expectKeyword('catch'); - - expect('('); - if (match(')')) { - throwUnexpected(lookahead); - } - - param = parseVariableIdentifier(); - // 12.14.1 - if (strict && isRestrictedWord(param.name)) { - throwErrorTolerant({}, Messages.StrictCatchVariable); - } - - expect(')'); - body = parseBlock(); - return delegate.markEnd(delegate.createCatchClause(param, body), startToken); - } - - function parseTryStatement() { - var block, handlers = [], finalizer = null; - - expectKeyword('try'); - - block = parseBlock(); - - if (matchKeyword('catch')) { - handlers.push(parseCatchClause()); - } - - if (matchKeyword('finally')) { - lex(); - finalizer = parseBlock(); - } - - if (handlers.length === 0 && !finalizer) { - throwError({}, Messages.NoCatchOrFinally); - } - - return delegate.createTryStatement(block, [], handlers, finalizer); - } - - // 12.15 The debugger statement - - function parseDebuggerStatement() { - expectKeyword('debugger'); - - consumeSemicolon(); - - return delegate.createDebuggerStatement(); - } - - // 12 Statements - - function parseStatement() { - var type = lookahead.type, - expr, - labeledBody, - key, - startToken; - - if (type === Token.EOF) { - throwUnexpected(lookahead); - } - - if (type === Token.Punctuator && lookahead.value === '{') { - return parseBlock(); - } - - startToken = lookahead; - - if (type === Token.Punctuator) { - switch (lookahead.value) { - case ';': - return delegate.markEnd(parseEmptyStatement(), startToken); - case '(': - return delegate.markEnd(parseExpressionStatement(), startToken); - default: - break; - } - } - - if (type === Token.Keyword) { - switch (lookahead.value) { - case 'break': - return delegate.markEnd(parseBreakStatement(), startToken); - case 'continue': - return delegate.markEnd(parseContinueStatement(), startToken); - case 'debugger': - return delegate.markEnd(parseDebuggerStatement(), startToken); - case 'do': - return delegate.markEnd(parseDoWhileStatement(), startToken); - case 'for': - return delegate.markEnd(parseForStatement(), startToken); - case 'function': - return delegate.markEnd(parseFunctionDeclaration(), startToken); - case 'if': - return delegate.markEnd(parseIfStatement(), startToken); - case 'return': - return delegate.markEnd(parseReturnStatement(), startToken); - case 'switch': - return delegate.markEnd(parseSwitchStatement(), startToken); - case 'throw': - return delegate.markEnd(parseThrowStatement(), startToken); - case 'try': - return delegate.markEnd(parseTryStatement(), startToken); - case 'var': - return delegate.markEnd(parseVariableStatement(), startToken); - case 'while': - return delegate.markEnd(parseWhileStatement(), startToken); - case 'with': - return delegate.markEnd(parseWithStatement(), startToken); - default: - break; - } - } - - expr = parseExpression(); - - // 12.12 Labelled Statements - if ((expr.type === Syntax.Identifier) && match(':')) { - lex(); - - key = '$' + expr.name; - if (Object.prototype.hasOwnProperty.call(state.labelSet, key)) { - throwError({}, Messages.Redeclaration, 'Label', expr.name); - } - - state.labelSet[key] = true; - labeledBody = parseStatement(); - delete state.labelSet[key]; - return delegate.markEnd(delegate.createLabeledStatement(expr, labeledBody), startToken); - } - - consumeSemicolon(); - - return delegate.markEnd(delegate.createExpressionStatement(expr), startToken); - } - - // 13 Function Definition - - function parseFunctionSourceElements() { - var sourceElement, sourceElements = [], token, directive, firstRestricted, - oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, startToken; - - startToken = lookahead; - expect('{'); - - while (index < length) { - if (lookahead.type !== Token.StringLiteral) { - break; - } - token = lookahead; - - sourceElement = parseSourceElement(); - sourceElements.push(sourceElement); - if (sourceElement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = source.slice(token.start + 1, token.end - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } - - oldLabelSet = state.labelSet; - oldInIteration = state.inIteration; - oldInSwitch = state.inSwitch; - oldInFunctionBody = state.inFunctionBody; - - state.labelSet = {}; - state.inIteration = false; - state.inSwitch = false; - state.inFunctionBody = true; - - while (index < length) { - if (match('}')) { - break; - } - sourceElement = parseSourceElement(); - if (typeof sourceElement === 'undefined') { - break; - } - sourceElements.push(sourceElement); - } - - expect('}'); - - state.labelSet = oldLabelSet; - state.inIteration = oldInIteration; - state.inSwitch = oldInSwitch; - state.inFunctionBody = oldInFunctionBody; - - return delegate.markEnd(delegate.createBlockStatement(sourceElements), startToken); - } - - function parseParams(firstRestricted) { - var param, params = [], token, stricted, paramSet, key, message; - expect('('); - - if (!match(')')) { - paramSet = {}; - while (index < length) { - token = lookahead; - param = parseVariableIdentifier(); - key = '$' + token.value; - if (strict) { - if (isRestrictedWord(token.value)) { - stricted = token; - message = Messages.StrictParamName; - } - if (Object.prototype.hasOwnProperty.call(paramSet, key)) { - stricted = token; - message = Messages.StrictParamDupe; - } - } else if (!firstRestricted) { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictParamName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } else if (Object.prototype.hasOwnProperty.call(paramSet, key)) { - firstRestricted = token; - message = Messages.StrictParamDupe; - } - } - params.push(param); - paramSet[key] = true; - if (match(')')) { - break; - } - expect(','); - } - } - - expect(')'); - - return { - params: params, - stricted: stricted, - firstRestricted: firstRestricted, - message: message - }; - } - - function parseFunctionDeclaration() { - var id, params = [], body, token, stricted, tmp, firstRestricted, message, previousStrict, startToken; - - startToken = lookahead; - - expectKeyword('function'); - token = lookahead; - id = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - - tmp = parseParams(firstRestricted); - params = tmp.params; - stricted = tmp.stricted; - firstRestricted = tmp.firstRestricted; - if (tmp.message) { - message = tmp.message; - } - - previousStrict = strict; - body = parseFunctionSourceElements(); - if (strict && firstRestricted) { - throwError(firstRestricted, message); - } - if (strict && stricted) { - throwErrorTolerant(stricted, message); - } - strict = previousStrict; - - return delegate.markEnd(delegate.createFunctionDeclaration(id, params, [], body), startToken); - } - - function parseFunctionExpression() { - var token, id = null, stricted, firstRestricted, message, tmp, params = [], body, previousStrict, startToken; - - startToken = lookahead; - expectKeyword('function'); - - if (!match('(')) { - token = lookahead; - id = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - } - - tmp = parseParams(firstRestricted); - params = tmp.params; - stricted = tmp.stricted; - firstRestricted = tmp.firstRestricted; - if (tmp.message) { - message = tmp.message; - } - - previousStrict = strict; - body = parseFunctionSourceElements(); - if (strict && firstRestricted) { - throwError(firstRestricted, message); - } - if (strict && stricted) { - throwErrorTolerant(stricted, message); - } - strict = previousStrict; - - return delegate.markEnd(delegate.createFunctionExpression(id, params, [], body), startToken); - } - - // 14 Program - - function parseSourceElement() { - if (lookahead.type === Token.Keyword) { - switch (lookahead.value) { - case 'const': - case 'let': - return parseConstLetDeclaration(lookahead.value); - case 'function': - return parseFunctionDeclaration(); - default: - return parseStatement(); - } - } - - if (lookahead.type !== Token.EOF) { - return parseStatement(); - } - } - - function parseSourceElements() { - var sourceElement, sourceElements = [], token, directive, firstRestricted; - - while (index < length) { - token = lookahead; - if (token.type !== Token.StringLiteral) { - break; - } - - sourceElement = parseSourceElement(); - sourceElements.push(sourceElement); - if (sourceElement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = source.slice(token.start + 1, token.end - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } - - while (index < length) { - sourceElement = parseSourceElement(); - /* istanbul ignore if */ - if (typeof sourceElement === 'undefined') { - break; - } - sourceElements.push(sourceElement); - } - return sourceElements; - } - - function parseProgram() { - var body, startToken; - - skipComment(); - peek(); - startToken = lookahead; - strict = false; - - body = parseSourceElements(); - return delegate.markEnd(delegate.createProgram(body), startToken); - } - - function filterTokenLocation() { - var i, entry, token, tokens = []; - - for (i = 0; i < extra.tokens.length; ++i) { - entry = extra.tokens[i]; - token = { - type: entry.type, - value: entry.value - }; - if (extra.range) { - token.range = entry.range; - } - if (extra.loc) { - token.loc = entry.loc; - } - tokens.push(token); - } - - extra.tokens = tokens; - } - - function tokenize(code, options) { - var toString, - token, - tokens; - - toString = String; - if (typeof code !== 'string' && !(code instanceof String)) { - code = toString(code); - } - - delegate = SyntaxTreeDelegate; - source = code; - index = 0; - lineNumber = (source.length > 0) ? 1 : 0; - lineStart = 0; - length = source.length; - lookahead = null; - state = { - allowIn: true, - labelSet: {}, - inFunctionBody: false, - inIteration: false, - inSwitch: false, - lastCommentStart: -1 - }; - - extra = {}; - - // Options matching. - options = options || {}; - - // Of course we collect tokens here. - options.tokens = true; - extra.tokens = []; - extra.tokenize = true; - // The following two fields are necessary to compute the Regex tokens. - extra.openParenToken = -1; - extra.openCurlyToken = -1; - - extra.range = (typeof options.range === 'boolean') && options.range; - extra.loc = (typeof options.loc === 'boolean') && options.loc; - - if (typeof options.comment === 'boolean' && options.comment) { - extra.comments = []; - } - if (typeof options.tolerant === 'boolean' && options.tolerant) { - extra.errors = []; - } - - try { - peek(); - if (lookahead.type === Token.EOF) { - return extra.tokens; - } - - token = lex(); - while (lookahead.type !== Token.EOF) { - try { - token = lex(); - } catch (lexError) { - token = lookahead; - if (extra.errors) { - extra.errors.push(lexError); - // We have to break on the first error - // to avoid infinite loops. - break; - } else { - throw lexError; - } - } - } - - filterTokenLocation(); - tokens = extra.tokens; - if (typeof extra.comments !== 'undefined') { - tokens.comments = extra.comments; - } - if (typeof extra.errors !== 'undefined') { - tokens.errors = extra.errors; - } - } catch (e) { - throw e; - } finally { - extra = {}; - } - return tokens; - } - - function parse(code, options) { - var program, toString; - - toString = String; - if (typeof code !== 'string' && !(code instanceof String)) { - code = toString(code); - } - - delegate = SyntaxTreeDelegate; - source = code; - index = 0; - lineNumber = (source.length > 0) ? 1 : 0; - lineStart = 0; - length = source.length; - lookahead = null; - state = { - allowIn: true, - labelSet: {}, - inFunctionBody: false, - inIteration: false, - inSwitch: false, - lastCommentStart: -1 - }; - - extra = {}; - if (typeof options !== 'undefined') { - extra.range = (typeof options.range === 'boolean') && options.range; - extra.loc = (typeof options.loc === 'boolean') && options.loc; - extra.attachComment = (typeof options.attachComment === 'boolean') && options.attachComment; - - if (extra.loc && options.source !== null && options.source !== undefined) { - extra.source = toString(options.source); - } - - if (typeof options.tokens === 'boolean' && options.tokens) { - extra.tokens = []; - } - if (typeof options.comment === 'boolean' && options.comment) { - extra.comments = []; - } - if (typeof options.tolerant === 'boolean' && options.tolerant) { - extra.errors = []; - } - if (extra.attachComment) { - extra.range = true; - extra.comments = []; - extra.bottomRightStack = []; - extra.trailingComments = []; - extra.leadingComments = []; - } - } - - try { - program = parseProgram(); - if (typeof extra.comments !== 'undefined') { - program.comments = extra.comments; - } - if (typeof extra.tokens !== 'undefined') { - filterTokenLocation(); - program.tokens = extra.tokens; - } - if (typeof extra.errors !== 'undefined') { - program.errors = extra.errors; - } - } catch (e) { - throw e; - } finally { - extra = {}; - } - - return program; - } - - // Sync with *.json manifests. - exports.version = '1.2.2'; - - exports.tokenize = tokenize; - - exports.parse = parse; - - // Deep copy. - /* istanbul ignore next */ - exports.Syntax = (function () { - var name, types = {}; - - if (typeof Object.create === 'function') { - types = Object.create(null); - } - - for (name in Syntax) { - if (Syntax.hasOwnProperty(name)) { - types[name] = Syntax[name]; - } - } - - if (typeof Object.freeze === 'function') { - Object.freeze(types); - } - - return types; - }()); - -})); -/* vim: set sw=4 ts=4 et tw=80 : */ - -},{}],1:[function(require,module,exports){ -(function (process){ -/* parser generated by jison 0.4.13 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var parser = (function(){ -var parser = {trace: function trace() { }, -yy: {}, -symbols_: {"error":2,"JSON_PATH":3,"DOLLAR":4,"PATH_COMPONENTS":5,"LEADING_CHILD_MEMBER_EXPRESSION":6,"PATH_COMPONENT":7,"MEMBER_COMPONENT":8,"SUBSCRIPT_COMPONENT":9,"CHILD_MEMBER_COMPONENT":10,"DESCENDANT_MEMBER_COMPONENT":11,"DOT":12,"MEMBER_EXPRESSION":13,"DOT_DOT":14,"STAR":15,"IDENTIFIER":16,"SCRIPT_EXPRESSION":17,"INTEGER":18,"END":19,"CHILD_SUBSCRIPT_COMPONENT":20,"DESCENDANT_SUBSCRIPT_COMPONENT":21,"[":22,"SUBSCRIPT":23,"]":24,"SUBSCRIPT_EXPRESSION":25,"SUBSCRIPT_EXPRESSION_LIST":26,"SUBSCRIPT_EXPRESSION_LISTABLE":27,",":28,"STRING_LITERAL":29,"ARRAY_SLICE":30,"FILTER_EXPRESSION":31,"QQ_STRING":32,"Q_STRING":33,"$accept":0,"$end":1}, -terminals_: {2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"}, -productions_: [0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */ -/**/) { -/* this == yyval */ -if (!yy.ast) { - yy.ast = _ast; - _ast.initialize(); -} - -var $0 = $$.length - 1; -switch (yystate) { -case 1:yy.ast.set({ expression: { type: "root", value: $$[$0] } }); yy.ast.unshift(); return yy.ast.yield() -break; -case 2:yy.ast.set({ expression: { type: "root", value: $$[$0-1] } }); yy.ast.unshift(); return yy.ast.yield() -break; -case 3:yy.ast.unshift(); return yy.ast.yield() -break; -case 4:yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $$[$0-1] }}); yy.ast.unshift(); return yy.ast.yield() -break; -case 5: -break; -case 6: -break; -case 7:yy.ast.set({ operation: "member" }); yy.ast.push() -break; -case 8:yy.ast.set({ operation: "subscript" }); yy.ast.push() -break; -case 9:yy.ast.set({ scope: "child" }) -break; -case 10:yy.ast.set({ scope: "descendant" }) -break; -case 11: -break; -case 12:yy.ast.set({ scope: "child", operation: "member" }) -break; -case 13: -break; -case 14:yy.ast.set({ expression: { type: "wildcard", value: $$[$0] } }) -break; -case 15:yy.ast.set({ expression: { type: "identifier", value: $$[$0] } }) -break; -case 16:yy.ast.set({ expression: { type: "script_expression", value: $$[$0] } }) -break; -case 17:yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($$[$0]) } }) -break; -case 18: -break; -case 19:yy.ast.set({ scope: "child" }) -break; -case 20:yy.ast.set({ scope: "descendant" }) -break; -case 21: -break; -case 22: -break; -case 23: -break; -case 24:$$[$0].length > 1? yy.ast.set({ expression: { type: "union", value: $$[$0] } }) : this.$ = $$[$0] -break; -case 25:this.$ = [$$[$0]] -break; -case 26:this.$ = $$[$0-2].concat($$[$0]) -break; -case 27:this.$ = { expression: { type: "numeric_literal", value: parseInt($$[$0]) } }; yy.ast.set(this.$) -break; -case 28:this.$ = { expression: { type: "string_literal", value: $$[$0] } }; yy.ast.set(this.$) -break; -case 29:this.$ = { expression: { type: "slice", value: $$[$0] } }; yy.ast.set(this.$) -break; -case 30:this.$ = { expression: { type: "wildcard", value: $$[$0] } }; yy.ast.set(this.$) -break; -case 31:this.$ = { expression: { type: "script_expression", value: $$[$0] } }; yy.ast.set(this.$) -break; -case 32:this.$ = { expression: { type: "filter_expression", value: $$[$0] } }; yy.ast.set(this.$) -break; -case 33:this.$ = $$[$0] -break; -case 34:this.$ = $$[$0] -break; -} -}, -table: [{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}], -defaultActions: {27:[2,23],29:[2,30],30:[2,31],31:[2,32]}, -parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - throw new Error(str); - } -}, -parse: function parse(input) { - var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == 'undefined') { - this.lexer.yylloc = {}; - } - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === 'function') { - this.parseError = this.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || EOF; - if (typeof token !== 'number') { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (this.lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + this.lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: this.lexer.match, - token: this.terminals_[symbol] || symbol, - line: this.lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - this.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; -var _ast = { - - initialize: function() { - this._nodes = []; - this._node = {}; - this._stash = []; - }, - - set: function(props) { - for (var k in props) this._node[k] = props[k]; - return this._node; - }, - - node: function(obj) { - if (arguments.length) this._node = obj; - return this._node; - }, - - push: function() { - this._nodes.push(this._node); - this._node = {}; - }, - - unshift: function() { - this._nodes.unshift(this._node); - this._node = {}; - }, - - yield: function() { - var _nodes = this._nodes; - this.initialize(); - return _nodes; - } -}; -/* generated by jison-lex 0.2.1 */ -var lexer = (function(){ -var lexer = { - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input) { - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function (match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin(condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState(condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START -/**/) { - -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0:return 4 -break; -case 1:return 14 -break; -case 2:return 12 -break; -case 3:return 15 -break; -case 4:return 16 -break; -case 5:return 22 -break; -case 6:return 24 -break; -case 7:return 28 -break; -case 8:return 30 -break; -case 9:return 18 -break; -case 10:yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2); return 32; -break; -case 11:yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2); return 33; -break; -case 12:return 17 -break; -case 13:return 31 -break; -} -}, -rules: [/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/], -conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13],"inclusive":true}} -}; -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (typeof require !== 'undefined' && typeof exports !== 'undefined') { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain(args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if (typeof module !== 'undefined' && require.main === module) { - exports.main(process.argv.slice(1)); -} -} - -}).call(this,require('_process')) -},{"_process":12,"fs":8,"path":11}],2:[function(require,module,exports){ -module.exports = { - identifier: "[a-zA-Z_]+[a-zA-Z0-9_]*", - integer: "-?(?:0|[1-9][0-9]*)", - qq_string: "\"(?:\\\\[\"bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^\"\\\\])*\"", - q_string: "'(?:\\\\[\'bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^\'\\\\])*'" -}; - -},{}],3:[function(require,module,exports){ -var dict = require('./dict'); -var fs = require('fs'); -var grammar = { - - lex: { - - macros: { - esc: "\\\\", - int: dict.integer - }, - - rules: [ - ["\\$", "return 'DOLLAR'"], - ["\\.\\.", "return 'DOT_DOT'"], - ["\\.", "return 'DOT'"], - ["\\*", "return 'STAR'"], - [dict.identifier, "return 'IDENTIFIER'"], - ["\\[", "return '['"], - ["\\]", "return ']'"], - [",", "return ','"], - ["({int})?\\:({int})?(\\:({int})?)?", "return 'ARRAY_SLICE'"], - ["{int}", "return 'INTEGER'"], - [dict.qq_string, "yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"], - [dict.q_string, "yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"], - ["\\(.+?\\)(?=\\])", "return 'SCRIPT_EXPRESSION'"], - ["\\?\\(.+?\\)(?=\\])", "return 'FILTER_EXPRESSION'"] - ] - }, - - start: "JSON_PATH", - - bnf: { - - JSON_PATH: [ - [ 'DOLLAR', 'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()' ], - [ 'DOLLAR PATH_COMPONENTS', 'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()' ], - [ 'LEADING_CHILD_MEMBER_EXPRESSION', 'yy.ast.unshift(); return yy.ast.yield()' ], - [ 'LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS', 'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()' ] ], - - PATH_COMPONENTS: [ - [ 'PATH_COMPONENT', '' ], - [ 'PATH_COMPONENTS PATH_COMPONENT', '' ] ], - - PATH_COMPONENT: [ - [ 'MEMBER_COMPONENT', 'yy.ast.set({ operation: "member" }); yy.ast.push()' ], - [ 'SUBSCRIPT_COMPONENT', 'yy.ast.set({ operation: "subscript" }); yy.ast.push() ' ] ], - - MEMBER_COMPONENT: [ - [ 'CHILD_MEMBER_COMPONENT', 'yy.ast.set({ scope: "child" })' ], - [ 'DESCENDANT_MEMBER_COMPONENT', 'yy.ast.set({ scope: "descendant" })' ] ], - - CHILD_MEMBER_COMPONENT: [ - [ 'DOT MEMBER_EXPRESSION', '' ] ], - - LEADING_CHILD_MEMBER_EXPRESSION: [ - [ 'MEMBER_EXPRESSION', 'yy.ast.set({ scope: "child", operation: "member" })' ] ], - - DESCENDANT_MEMBER_COMPONENT: [ - [ 'DOT_DOT MEMBER_EXPRESSION', '' ] ], - - MEMBER_EXPRESSION: [ - [ 'STAR', 'yy.ast.set({ expression: { type: "wildcard", value: $1 } })' ], - [ 'IDENTIFIER', 'yy.ast.set({ expression: { type: "identifier", value: $1 } })' ], - [ 'SCRIPT_EXPRESSION', 'yy.ast.set({ expression: { type: "script_expression", value: $1 } })' ], - [ 'INTEGER', 'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })' ], - [ 'END', '' ] ], - - SUBSCRIPT_COMPONENT: [ - [ 'CHILD_SUBSCRIPT_COMPONENT', 'yy.ast.set({ scope: "child" })' ], - [ 'DESCENDANT_SUBSCRIPT_COMPONENT', 'yy.ast.set({ scope: "descendant" })' ] ], - - CHILD_SUBSCRIPT_COMPONENT: [ - [ '[ SUBSCRIPT ]', '' ] ], - - DESCENDANT_SUBSCRIPT_COMPONENT: [ - [ 'DOT_DOT [ SUBSCRIPT ]', '' ] ], - - SUBSCRIPT: [ - [ 'SUBSCRIPT_EXPRESSION', '' ], - [ 'SUBSCRIPT_EXPRESSION_LIST', '$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1' ] ], - - SUBSCRIPT_EXPRESSION_LIST: [ - [ 'SUBSCRIPT_EXPRESSION_LISTABLE', '$$ = [$1]'], - [ 'SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE', '$$ = $1.concat($3)' ] ], - - SUBSCRIPT_EXPRESSION_LISTABLE: [ - [ 'INTEGER', '$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)' ], - [ 'STRING_LITERAL', '$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)' ], - [ 'ARRAY_SLICE', '$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)' ] ], - - SUBSCRIPT_EXPRESSION: [ - [ 'STAR', '$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)' ], - [ 'SCRIPT_EXPRESSION', '$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)' ], - [ 'FILTER_EXPRESSION', '$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)' ] ], - - STRING_LITERAL: [ - [ 'QQ_STRING', "$$ = $1" ], - [ 'Q_STRING', "$$ = $1" ] ] - } -}; -if (fs.readFileSync) { - grammar.moduleInclude = fs.readFileSync(require.resolve("../include/module.js")); - grammar.actionInclude = fs.readFileSync(require.resolve("../include/action.js")); -} - -module.exports = grammar; - -},{"./dict":2,"fs":8}],4:[function(require,module,exports){ -var aesprim = require('./aesprim'); -var slice = require('./slice'); -var _evaluate = require('static-eval'); -var _uniq = require('underscore').uniq; - -var Handlers = function() { - return this.initialize.apply(this, arguments); -} - -Handlers.prototype.initialize = function() { - this.traverse = traverser(true); - this.descend = traverser(); -} - -Handlers.prototype.keys = Object.keys; - -Handlers.prototype.resolve = function(component) { - - var key = [ component.operation, component.scope, component.expression.type ].join('-'); - var method = this._fns[key]; - - if (!method) throw new Error("couldn't resolve key: " + key); - return method.bind(this); -}; - -Handlers.prototype.register = function(key, handler) { - - if (!handler instanceof Function) { - throw new Error("handler must be a function"); - } - - this._fns[key] = handler; -}; - -Handlers.prototype._fns = { - - 'member-child-identifier': function(component, partial) { - var key = component.expression.value; - var value = partial.value; - if (value instanceof Object && key in value) { - return [ { value: value[key], path: partial.path.concat(key) } ] - } - }, - - 'member-descendant-identifier': - _traverse(function(key, value, ref) { return key == ref }), - - 'subscript-child-numeric_literal': - _descend(function(key, value, ref) { return key === ref }), - - 'member-child-numeric_literal': - _descend(function(key, value, ref) { return String(key) === String(ref) }), - - 'subscript-descendant-numeric_literal': - _traverse(function(key, value, ref) { return key === ref }), - - 'member-child-wildcard': - _descend(function() { return true }), - - 'member-descendant-wildcard': - _traverse(function() { return true }), - - 'subscript-descendant-wildcard': - _traverse(function() { return true }), - - 'subscript-child-wildcard': - _descend(function() { return true }), - - 'subscript-child-slice': function(component, partial) { - if (is_array(partial.value)) { - var args = component.expression.value.split(':').map(_parse_nullable_int); - var values = partial.value.map(function(v, i) { return { value: v, path: partial.path.concat(i) } }); - return slice.apply(null, [values].concat(args)); - } - }, - - 'subscript-child-union': function(component, partial) { - var results = []; - component.expression.value.forEach(function(component) { - var _component = { operation: 'subscript', scope: 'child', expression: component.expression }; - var handler = this.resolve(_component); - var _results = handler(_component, partial); - if (_results) { - results = results.concat(_results); - } - }, this); - - return unique(results); - }, - - 'subscript-descendant-union': function(component, partial, count) { - - var jp = require('..'); - var self = this; - - var results = []; - var nodes = jp.nodes(partial, '$..*').slice(1); - - nodes.forEach(function(node) { - if (results.length >= count) return; - component.expression.value.forEach(function(component) { - var _component = { operation: 'subscript', scope: 'child', expression: component.expression }; - var handler = self.resolve(_component); - var _results = handler(_component, node); - results = results.concat(_results); - }); - }); - - return unique(results); - }, - - 'subscript-child-filter_expression': function(component, partial, count) { - - // slice out the expression from ?(expression) - var src = component.expression.value.slice(2, -1); - var ast = aesprim.parse(src).body[0].expression; - - var passable = function(key, value) { - return evaluate(ast, { '@': value }); - } - - return this.descend(partial, null, passable, count); - - }, - - 'subscript-descendant-filter_expression': function(component, partial, count) { - - // slice out the expression from ?(expression) - var src = component.expression.value.slice(2, -1); - var ast = aesprim.parse(src).body[0].expression; - - var passable = function(key, value) { - return evaluate(ast, { '@': value }); - } - - return this.traverse(partial, null, passable, count); - }, - - 'subscript-child-script_expression': function(component, partial) { - var exp = component.expression.value.slice(1, -1); - return eval_recurse(partial, exp, '$[{{value}}]'); - }, - - 'member-child-script_expression': function(component, partial) { - var exp = component.expression.value.slice(1, -1); - return eval_recurse(partial, exp, '$.{{value}}'); - }, - - 'member-descendant-script_expression': function(component, partial) { - var exp = component.expression.value.slice(1, -1); - return eval_recurse(partial, exp, '$..value'); - } -}; - -Handlers.prototype._fns['subscript-child-string_literal'] = - Handlers.prototype._fns['member-child-identifier']; - -Handlers.prototype._fns['member-descendant-numeric_literal'] = - Handlers.prototype._fns['subscript-descendant-string_literal'] = - Handlers.prototype._fns['member-descendant-identifier']; - -function eval_recurse(partial, src, template) { - - var jp = require('./index'); - var ast = aesprim.parse(src).body[0].expression; - var value = evaluate(ast, { '@': partial.value }); - var path = template.replace(/\{\{\s*value\s*\}\}/g, value); - - var results = jp.nodes(partial.value, path); - results.forEach(function(r) { - r.path = partial.path.concat(r.path.slice(1)); - }); - - return results; -} - -function is_array(val) { - return Array.isArray(val); -} - -function is_object(val) { - // is this a non-array, non-null object? - return val && !(val instanceof Array) && val instanceof Object; -} - -function traverser(recurse) { - - return function(partial, ref, passable, count) { - - var value = partial.value; - var path = partial.path; - - var results = []; - - var descend = function(value, path) { - - if (is_array(value)) { - value.forEach(function(element, index) { - if (results.length >= count) { return } - if (passable(index, element, ref)) { - results.push({ path: path.concat(index), value: element }); - } - }); - value.forEach(function(element, index) { - if (results.length >= count) { return } - if (recurse) { - descend(element, path.concat(index)); - } - }); - } else if (is_object(value)) { - this.keys(value).forEach(function(k) { - if (results.length >= count) { return } - if (passable(k, value[k], ref)) { - results.push({ path: path.concat(k), value: value[k] }); - } - }) - this.keys(value).forEach(function(k) { - if (results.length >= count) { return } - if (recurse) { - descend(value[k], path.concat(k)); - } - }); - } - }.bind(this); - descend(value, path); - return results; - } -} - -function _descend(passable) { - return function(component, partial, count) { - return this.descend(partial, component.expression.value, passable, count); - } -} - -function _traverse(passable) { - return function(component, partial, count) { - return this.traverse(partial, component.expression.value, passable, count); - } -} - -function evaluate() { - try { return _evaluate.apply(this, arguments) } - catch (e) { } -} - -function unique(results) { - results = results.filter(function(d) { return d }) - return _uniq( - results, - function(r) { return r.path.map(function(c) { return String(c).replace('-', '--') }).join('-') } - ); -} - -function _parse_nullable_int(val) { - var sval = String(val); - return sval.match(/^-?[0-9]+$/) ? parseInt(sval) : null; -} - -module.exports = Handlers; - -},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":15,"underscore":8}],5:[function(require,module,exports){ -var assert = require('assert'); -var dict = require('./dict'); -var Parser = require('./parser'); -var Handlers = require('./handlers'); - -var JSONPath = function() { - this.initialize.apply(this, arguments); -}; - -JSONPath.prototype.initialize = function() { - this.parser = new Parser(); - this.handlers = new Handlers(); -}; - -JSONPath.prototype.parse = function(string) { - assert.ok(_is_string(string), "we need a path"); - return this.parser.parse(string); -}; - -JSONPath.prototype.parent = function(obj, string) { - - assert.ok(obj instanceof Object, "obj needs to be an object"); - assert.ok(string, "we need a path"); - - var node = this.nodes(obj, string)[0]; - var key = node.path.pop(); /* jshint unused:false */ - return this.value(obj, node.path); -} - -JSONPath.prototype.apply = function(obj, string, fn) { - - assert.ok(obj instanceof Object, "obj needs to be an object"); - assert.ok(string, "we need a path"); - assert.equal(typeof fn, "function", "fn needs to be function") - - var nodes = this.nodes(obj, string).sort(function(a, b) { - // sort nodes so we apply from the bottom up - return b.path.length - a.path.length; - }); - - nodes.forEach(function(node) { - var key = node.path.pop(); - var parent = this.value(obj, this.stringify(node.path)); - var val = node.value = fn.call(obj, parent[key]); - parent[key] = val; - }, this); - - return nodes; -} - -JSONPath.prototype.value = function(obj, path, value) { - - assert.ok(obj instanceof Object, "obj needs to be an object"); - assert.ok(path, "we need a path"); - - if (arguments.length >= 3) { - var node = this.nodes(obj, path).shift(); - if (!node) return this._vivify(obj, path, value); - var key = node.path.slice(-1).shift(); - var parent = this.parent(obj, this.stringify(node.path)); - parent[key] = value; - } - return this.query(obj, this.stringify(path), 1).shift(); -} - -JSONPath.prototype._vivify = function(obj, string, value) { - - var self = this; - - assert.ok(obj instanceof Object, "obj needs to be an object"); - assert.ok(string, "we need a path"); - - var path = this.parser.parse(string) - .map(function(component) { return component.expression.value }); - - var setValue = function(path, value) { - var key = path.pop(); - var node = self.value(obj, path); - if (!node) { - setValue(path.concat(), typeof key === 'string' ? {} : []); - node = self.value(obj, path); - } - node[key] = value; - } - setValue(path, value); - return this.query(obj, string)[0]; -} - -JSONPath.prototype.query = function(obj, string, count) { - - assert.ok(obj instanceof Object, "obj needs to be an object"); - assert.ok(_is_string(string), "we need a path"); - - var results = this.nodes(obj, string, count) - .map(function(r) { return r.value }); - - return results; -}; - -JSONPath.prototype.paths = function(obj, string, count) { - - assert.ok(obj instanceof Object, "obj needs to be an object"); - assert.ok(string, "we need a path"); - - var results = this.nodes(obj, string, count) - .map(function(r) { return r.path }); - - return results; -}; - -JSONPath.prototype.nodes = function(obj, string, count) { - - assert.ok(obj instanceof Object, "obj needs to be an object"); - assert.ok(string, "we need a path"); - - if (count === 0) return []; - - var path = this.parser.parse(string); - var handlers = this.handlers; - - var partials = [ { path: ['$'], value: obj } ]; - var matches = []; - - if (path.length && path[0].expression.type == 'root') path.shift(); - - if (!path.length) return partials; - - path.forEach(function(component, index) { - - if (matches.length >= count) return; - var handler = handlers.resolve(component); - var _partials = []; - - partials.forEach(function(p) { - - if (matches.length >= count) return; - var results = handler(component, p, count); - - if (index == path.length - 1) { - // if we're through the components we're done - matches = matches.concat(results || []); - } else { - // otherwise accumulate and carry on through - _partials = _partials.concat(results || []); - } - }); - - partials = _partials; - - }); - - return count ? matches.slice(0, count) : matches; -}; - -JSONPath.prototype.stringify = function(path) { - - assert.ok(path, "we need a path"); - - var string = '$'; - - var templates = { - 'descendant-member': '..{{value}}', - 'child-member': '.{{value}}', - 'descendant-subscript': '..[{{value}}]', - 'child-subscript': '[{{value}}]' - }; - - path = this._normalize(path); - - path.forEach(function(component) { - - if (component.expression.type == 'root') return; - - var key = [component.scope, component.operation].join('-'); - var template = templates[key]; - var value; - - if (component.expression.type == 'string_literal') { - value = JSON.stringify(component.expression.value) - } else { - value = component.expression.value; - } - - if (!template) throw new Error("couldn't find template " + key); - - string += template.replace(/{{value}}/, value); - }); - - return string; -} - -JSONPath.prototype._normalize = function(path) { - - assert.ok(path, "we need a path"); - - if (typeof path == "string") { - - return this.parser.parse(path); - - } else if (Array.isArray(path) && typeof path[0] == "string") { - - var _path = [ { expression: { type: "root", value: "$" } } ]; - - path.forEach(function(component, index) { - - if (component == '$' && index === 0) return; - - if (typeof component == "string" && component.match("^" + dict.identifier + "$")) { - - _path.push({ - operation: 'member', - scope: 'child', - expression: { value: component, type: 'identifier' } - }); - - } else { - - var type = typeof component == "number" ? - 'numeric_literal' : 'string_literal'; - - _path.push({ - operation: 'subscript', - scope: 'child', - expression: { value: component, type: type } - }); - } - }); - - return _path; - - } else if (Array.isArray(path) && typeof path[0] == "object") { - - return path - } - - throw new Error("couldn't understand path " + path); -} - -function _is_string(obj) { - return Object.prototype.toString.call(obj) == '[object String]'; -} - -JSONPath.Handlers = Handlers; -JSONPath.Parser = Parser; - -var instance = new JSONPath; -instance.JSONPath = JSONPath; - -module.exports = instance; - -},{"./dict":2,"./handlers":4,"./parser":6,"assert":9}],6:[function(require,module,exports){ -var grammar = require('./grammar'); -var gparser = require('../generated/parser'); - -var Parser = function() { - - var parser = new gparser.Parser(); - - var _parseError = parser.parseError; - parser.yy.parseError = function() { - if (parser.yy.ast) { - parser.yy.ast.initialize(); - } - _parseError.apply(parser, arguments); - } - - return parser; - -}; - -Parser.grammar = grammar; -module.exports = Parser; - -},{"../generated/parser":1,"./grammar":3}],7:[function(require,module,exports){ -module.exports = function(arr, start, end, step) { - - if (typeof start == 'string') throw new Error("start cannot be a string"); - if (typeof end == 'string') throw new Error("end cannot be a string"); - if (typeof step == 'string') throw new Error("step cannot be a string"); - - var len = arr.length; - - if (step === 0) throw new Error("step cannot be zero"); - step = step ? integer(step) : 1; - - // normalize negative values - start = start < 0 ? len + start : start; - end = end < 0 ? len + end : end; - - // default extents to extents - start = integer(start === 0 ? 0 : !start ? (step > 0 ? 0 : len - 1) : start); - end = integer(end === 0 ? 0 : !end ? (step > 0 ? len : -1) : end); - - // clamp extents - start = step > 0 ? Math.max(0, start) : Math.min(len, start); - end = step > 0 ? Math.min(end, len) : Math.max(-1, end); - - // return empty if extents are backwards - if (step > 0 && end <= start) return []; - if (step < 0 && start <= end) return []; - - var result = []; - - for (var i = start; i != end; i += step) { - if ((step < 0 && i <= end) || (step > 0 && i >= end)) break; - result.push(arr[i]); - } - - return result; -} - -function integer(val) { - return String(val).match(/^[0-9]+$/) ? parseInt(val) : - Number.isFinite(val) ? parseInt(val, 10) : 0; -} - -},{}],8:[function(require,module,exports){ - -},{}],9:[function(require,module,exports){ -// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 -// -// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! -// -// Originally from narwhal.js (http://narwhaljs.org) -// Copyright (c) 2009 Thomas Robinson <280north.com> -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the 'Software'), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -// when used in node, this will actually load the util module we depend on -// versus loading the builtin util module as happens otherwise -// this is a bug in node module loading as far as I am concerned -var util = require('util/'); - -var pSlice = Array.prototype.slice; -var hasOwn = Object.prototype.hasOwnProperty; - -// 1. The assert module provides functions that throw -// AssertionError's when particular conditions are not met. The -// assert module must conform to the following interface. - -var assert = module.exports = ok; - -// 2. The AssertionError is defined in assert. -// new assert.AssertionError({ message: message, -// actual: actual, -// expected: expected }) - -assert.AssertionError = function AssertionError(options) { - this.name = 'AssertionError'; - this.actual = options.actual; - this.expected = options.expected; - this.operator = options.operator; - if (options.message) { - this.message = options.message; - this.generatedMessage = false; - } else { - this.message = getMessage(this); - this.generatedMessage = true; - } - var stackStartFunction = options.stackStartFunction || fail; - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, stackStartFunction); - } - else { - // non v8 browsers so we can have a stacktrace - var err = new Error(); - if (err.stack) { - var out = err.stack; - - // try to strip useless frames - var fn_name = stackStartFunction.name; - var idx = out.indexOf('\n' + fn_name); - if (idx >= 0) { - // once we have located the function frame - // we need to strip out everything before it (and its line) - var next_line = out.indexOf('\n', idx + 1); - out = out.substring(next_line + 1); - } - - this.stack = out; - } - } -}; - -// assert.AssertionError instanceof Error -util.inherits(assert.AssertionError, Error); - -function replacer(key, value) { - if (util.isUndefined(value)) { - return '' + value; - } - if (util.isNumber(value) && !isFinite(value)) { - return value.toString(); - } - if (util.isFunction(value) || util.isRegExp(value)) { - return value.toString(); - } - return value; -} - -function truncate(s, n) { - if (util.isString(s)) { - return s.length < n ? s : s.slice(0, n); - } else { - return s; - } -} - -function getMessage(self) { - return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + - self.operator + ' ' + - truncate(JSON.stringify(self.expected, replacer), 128); -} - -// At present only the three keys mentioned above are used and -// understood by the spec. Implementations or sub modules can pass -// other keys to the AssertionError's constructor - they will be -// ignored. - -// 3. All of the following functions must throw an AssertionError -// when a corresponding condition is not met, with a message that -// may be undefined if not provided. All assertion methods provide -// both the actual and expected values to the assertion error for -// display purposes. - -function fail(actual, expected, message, operator, stackStartFunction) { - throw new assert.AssertionError({ - message: message, - actual: actual, - expected: expected, - operator: operator, - stackStartFunction: stackStartFunction - }); -} - -// EXTENSION! allows for well behaved errors defined elsewhere. -assert.fail = fail; - -// 4. Pure assertion tests whether a value is truthy, as determined -// by !!guard. -// assert.ok(guard, message_opt); -// This statement is equivalent to assert.equal(true, !!guard, -// message_opt);. To test strictly for the value true, use -// assert.strictEqual(true, guard, message_opt);. - -function ok(value, message) { - if (!value) fail(value, true, message, '==', assert.ok); -} -assert.ok = ok; - -// 5. The equality assertion tests shallow, coercive equality with -// ==. -// assert.equal(actual, expected, message_opt); - -assert.equal = function equal(actual, expected, message) { - if (actual != expected) fail(actual, expected, message, '==', assert.equal); -}; - -// 6. The non-equality assertion tests for whether two objects are not equal -// with != assert.notEqual(actual, expected, message_opt); - -assert.notEqual = function notEqual(actual, expected, message) { - if (actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); - } -}; - -// 7. The equivalence assertion tests a deep equality relation. -// assert.deepEqual(actual, expected, message_opt); - -assert.deepEqual = function deepEqual(actual, expected, message) { - if (!_deepEqual(actual, expected)) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); - } -}; - -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - - // 7.3 If the expected value is a RegExp object, the actual value is - // equivalent if it is also a RegExp object with the same source and - // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - - // 7.4. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (!util.isObject(actual) && !util.isObject(expected)) { - return actual == expected; - - // 7.5 For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } -} - -function isArguments(object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; -} - -function objEquiv(a, b) { - if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - // if one is a primitive, the other must be same - if (util.isPrimitive(a) || util.isPrimitive(b)) { - return a === b; - } - var aIsArgs = isArguments(a), - bIsArgs = isArguments(b); - if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs)) - return false; - if (aIsArgs) { - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - var ka = objectKeys(a), - kb = objectKeys(b), - key, i; - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key])) return false; - } - return true; -} - -// 8. The non-equivalence assertion tests for any deep inequality. -// assert.notDeepEqual(actual, expected, message_opt); - -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if (_deepEqual(actual, expected)) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); - } -}; - -// 9. The strict equality assertion tests strict equality, as determined by ===. -// assert.strictEqual(actual, expected, message_opt); - -assert.strictEqual = function strictEqual(actual, expected, message) { - if (actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); - } -}; - -// 10. The strict non-equality assertion tests for strict inequality, as -// determined by !==. assert.notStrictEqual(actual, expected, message_opt); - -assert.notStrictEqual = function notStrictEqual(actual, expected, message) { - if (actual === expected) { - fail(actual, expected, message, '!==', assert.notStrictEqual); - } -}; - -function expectedException(actual, expected) { - if (!actual || !expected) { - return false; - } - - if (Object.prototype.toString.call(expected) == '[object RegExp]') { - return expected.test(actual); - } else if (actual instanceof expected) { - return true; - } else if (expected.call({}, actual) === true) { - return true; - } - - return false; -} - -function _throws(shouldThrow, block, expected, message) { - var actual; - - if (util.isString(expected)) { - message = expected; - expected = null; - } - - try { - block(); - } catch (e) { - actual = e; - } - - message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + - (message ? ' ' + message : '.'); - - if (shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); - } - - if (!shouldThrow && expectedException(actual, expected)) { - fail(actual, expected, 'Got unwanted exception' + message); - } - - if ((shouldThrow && actual && expected && - !expectedException(actual, expected)) || (!shouldThrow && actual)) { - throw actual; - } -} - -// 11. Expected to throw an error: -// assert.throws(block, Error_opt, message_opt); - -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [true].concat(pSlice.call(arguments))); -}; - -// EXTENSION! This is annoying to write outside this module. -assert.doesNotThrow = function(block, /*optional*/message) { - _throws.apply(this, [false].concat(pSlice.call(arguments))); -}; - -assert.ifError = function(err) { if (err) {throw err;}}; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - if (hasOwn.call(obj, key)) keys.push(key); - } - return keys; -}; - -},{"util/":14}],10:[function(require,module,exports){ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - -},{}],11:[function(require,module,exports){ -(function (process){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; -var splitPath = function(filename) { - return splitPathRe.exec(filename).slice(1); -}; - -// path.resolve([from ...], to) -// posix version -exports.resolve = function() { - var resolvedPath = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : process.cwd(); - - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; - -// path.normalize(path) -// posix version -exports.normalize = function(path) { - var isAbsolute = exports.isAbsolute(path), - trailingSlash = substr(path, -1) === '/'; - - // Normalize the path - path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; -}; - -// posix version -exports.isAbsolute = function(path) { - return path.charAt(0) === '/'; -}; - -// posix version -exports.join = function() { - var paths = Array.prototype.slice.call(arguments, 0); - return exports.normalize(filter(paths, function(p, index) { - if (typeof p !== 'string') { - throw new TypeError('Arguments to path.join must be strings'); - } - return p; - }).join('/')); -}; - - -// path.relative(from, to) -// posix version -exports.relative = function(from, to) { - from = exports.resolve(from).substr(1); - to = exports.resolve(to).substr(1); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end - start + 1); - } - - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -}; - -exports.sep = '/'; -exports.delimiter = ':'; - -exports.dirname = function(path) { - var result = splitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -}; - - -exports.basename = function(path, ext) { - var f = splitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -exports.extname = function(path) { - return splitPath(path)[3]; -}; - -function filter (xs, f) { - if (xs.filter) return xs.filter(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - if (f(xs[i], i, xs)) res.push(xs[i]); - } - return res; -} - -// String.prototype.substr - negative index don't work in IE8 -var substr = 'ab'.substr(-1) === 'b' - ? function (str, start, len) { return str.substr(start, len) } - : function (str, start, len) { - if (start < 0) start = str.length + start; - return str.substr(start, len); - } -; - -}).call(this,require('_process')) -},{"_process":12}],12:[function(require,module,exports){ -// shim for using process in browser - -var process = module.exports = {}; -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = setTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - clearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - setTimeout(drainQueue, 0); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - -},{}],13:[function(require,module,exports){ -module.exports = function isBuffer(arg) { - return arg && typeof arg === 'object' - && typeof arg.copy === 'function' - && typeof arg.fill === 'function' - && typeof arg.readUInt8 === 'function'; -} -},{}],14:[function(require,module,exports){ -(function (process,global){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; - - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; - - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.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] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = require('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * The Function.prototype.inherits from lang.js rewritten as a standalone - * function (not on Function.prototype). NOTE: If this file is to be loaded - * during bootstrapping this function needs to be rewritten using some native - * functions as prototype setup using normal JavaScript does not work as - * expected during bootstrapping (see mirror.js in r114903). - * - * @param {function} ctor Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor Constructor function to inherit prototype from. - */ -exports.inherits = require('inherits'); - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":13,"_process":12,"inherits":10}],15:[function(require,module,exports){ -var unparse = require('escodegen').generate; - -module.exports = function (ast, vars) { - if (!vars) vars = {}; - var FAIL = {}; - - var result = (function walk (node) { - if (node.type === 'Literal') { - return node.value; - } - else if (node.type === 'UnaryExpression'){ - var val = walk(node.argument) - if (node.operator === '+') return +val - if (node.operator === '-') return -val - if (node.operator === '~') return ~val - if (node.operator === '!') return !val - return FAIL - } - else if (node.type === 'ArrayExpression') { - var xs = []; - for (var i = 0, l = node.elements.length; i < l; i++) { - var x = walk(node.elements[i]); - if (x === FAIL) return FAIL; - xs.push(x); - } - return xs; - } - else if (node.type === 'ObjectExpression') { - var obj = {}; - for (var i = 0; i < node.properties.length; i++) { - var prop = node.properties[i]; - var value = prop.value === null - ? prop.value - : walk(prop.value) - ; - if (value === FAIL) return FAIL; - obj[prop.key.value || prop.key.name] = value; - } - return obj; - } - else if (node.type === 'BinaryExpression' || - node.type === 'LogicalExpression') { - var l = walk(node.left); - if (l === FAIL) return FAIL; - var r = walk(node.right); - if (r === FAIL) return FAIL; - - var op = node.operator; - if (op === '==') return l == r; - if (op === '===') return l === r; - if (op === '!=') return l != r; - if (op === '!==') return l !== r; - if (op === '+') return l + r; - if (op === '-') return l - r; - if (op === '*') return l * r; - if (op === '/') return l / r; - if (op === '%') return l % r; - if (op === '<') return l < r; - if (op === '<=') return l <= r; - if (op === '>') return l > r; - if (op === '>=') return l >= r; - if (op === '|') return l | r; - if (op === '&') return l & r; - if (op === '^') return l ^ r; - if (op === '&&') return l && r; - if (op === '||') return l || r; - - return FAIL; - } - else if (node.type === 'Identifier') { - if ({}.hasOwnProperty.call(vars, node.name)) { - return vars[node.name]; - } - else return FAIL; - } - else if (node.type === 'CallExpression') { - var callee = walk(node.callee); - if (callee === FAIL) return FAIL; - - var ctx = node.callee.object ? walk(node.callee.object) : FAIL; - if (ctx === FAIL) ctx = null; - - var args = []; - for (var i = 0, l = node.arguments.length; i < l; i++) { - var x = walk(node.arguments[i]); - if (x === FAIL) return FAIL; - args.push(x); - } - return callee.apply(ctx, args); - } - else if (node.type === 'MemberExpression') { - var obj = walk(node.object); - if (obj === FAIL) return FAIL; - if (node.property.type === 'Identifier') { - return obj[node.property.name]; - } - var prop = walk(node.property); - if (prop === FAIL) return FAIL; - return obj[prop]; - } - else if (node.type === 'ConditionalExpression') { - var val = walk(node.test) - if (val === FAIL) return FAIL; - return val ? walk(node.consequent) : walk(node.alternate) - } - else if (node.type === 'FunctionExpression') { - return Function('return ' + unparse(node))(); - } - else return FAIL; - })(ast); - - return result === FAIL ? undefined : result; -}; - -},{"escodegen":8}],"jsonpath":[function(require,module,exports){ -module.exports = require('./lib/index'); - -},{"./lib/index":5}]},{},["jsonpath"])("jsonpath") -}); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("../../../../webpack/buildin/global.js"))) - -/***/ }), - -/***/ "../../../../jszip/dist/jszip.js": -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(Buffer, global) {var require;var require;/*! - -JSZip v3.1.5 - A JavaScript class for generating and reading zip files - - -(c) 2009-2016 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. - -JSZip uses the library pako released under the MIT license : -https://github.com/nodeca/pako/blob/master/LICENSE -*/ - -(function(f){if(true){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSZip = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64; - enc4 = remainingBytes > 2 ? (chr3 & 63) : 64; - - output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4)); - - } - - return output.join(""); -}; - -// public method for decoding -exports.decode = function(input) { - var chr1, chr2, chr3; - var enc1, enc2, enc3, enc4; - var i = 0, resultIndex = 0; - - var dataUrlPrefix = "data:"; - - if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) { - // This is a common error: people give a data url - // (data:image/png;base64,iVBOR...) with a {base64: true} and - // wonders why things don't work. - // We can detect that the string input looks like a data url but we - // *can't* be sure it is one: removing everything up to the comma would - // be too dangerous. - throw new Error("Invalid base64 input, it looks like a data url."); - } - - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - - var totalLength = input.length * 3 / 4; - if(input.charAt(input.length - 1) === _keyStr.charAt(64)) { - totalLength--; - } - if(input.charAt(input.length - 2) === _keyStr.charAt(64)) { - totalLength--; - } - if (totalLength % 1 !== 0) { - // totalLength is not an integer, the length does not match a valid - // base64 content. That can happen if: - // - the input is not a base64 content - // - the input is *almost* a base64 content, with a extra chars at the - // beginning or at the end - // - the input uses a base64 variant (base64url for example) - throw new Error("Invalid base64 input, bad content length."); - } - var output; - if (support.uint8array) { - output = new Uint8Array(totalLength|0); - } else { - output = new Array(totalLength|0); - } - - while (i < input.length) { - - enc1 = _keyStr.indexOf(input.charAt(i++)); - enc2 = _keyStr.indexOf(input.charAt(i++)); - enc3 = _keyStr.indexOf(input.charAt(i++)); - enc4 = _keyStr.indexOf(input.charAt(i++)); - - chr1 = (enc1 << 2) | (enc2 >> 4); - chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); - chr3 = ((enc3 & 3) << 6) | enc4; - - output[resultIndex++] = chr1; - - if (enc3 !== 64) { - output[resultIndex++] = chr2; - } - if (enc4 !== 64) { - output[resultIndex++] = chr3; - } - - } - - return output; -}; - -},{"./support":30,"./utils":32}],2:[function(require,module,exports){ -'use strict'; - -var external = require("./external"); -var DataWorker = require('./stream/DataWorker'); -var DataLengthProbe = require('./stream/DataLengthProbe'); -var Crc32Probe = require('./stream/Crc32Probe'); -var DataLengthProbe = require('./stream/DataLengthProbe'); - -/** - * Represent a compressed object, with everything needed to decompress it. - * @constructor - * @param {number} compressedSize the size of the data compressed. - * @param {number} uncompressedSize the size of the data after decompression. - * @param {number} crc32 the crc32 of the decompressed file. - * @param {object} compression the type of compression, see lib/compressions.js. - * @param {String|ArrayBuffer|Uint8Array|Buffer} data the compressed data. - */ -function CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) { - this.compressedSize = compressedSize; - this.uncompressedSize = uncompressedSize; - this.crc32 = crc32; - this.compression = compression; - this.compressedContent = data; -} - -CompressedObject.prototype = { - /** - * Create a worker to get the uncompressed content. - * @return {GenericWorker} the worker. - */ - getContentWorker : function () { - var worker = new DataWorker(external.Promise.resolve(this.compressedContent)) - .pipe(this.compression.uncompressWorker()) - .pipe(new DataLengthProbe("data_length")); - - var that = this; - worker.on("end", function () { - if(this.streamInfo['data_length'] !== that.uncompressedSize) { - throw new Error("Bug : uncompressed data size mismatch"); - } - }); - return worker; - }, - /** - * Create a worker to get the compressed content. - * @return {GenericWorker} the worker. - */ - getCompressedWorker : function () { - return new DataWorker(external.Promise.resolve(this.compressedContent)) - .withStreamInfo("compressedSize", this.compressedSize) - .withStreamInfo("uncompressedSize", this.uncompressedSize) - .withStreamInfo("crc32", this.crc32) - .withStreamInfo("compression", this.compression) - ; - } -}; - -/** - * Chain the given worker with other workers to compress the content with the - * given compresion. - * @param {GenericWorker} uncompressedWorker the worker to pipe. - * @param {Object} compression the compression object. - * @param {Object} compressionOptions the options to use when compressing. - * @return {GenericWorker} the new worker compressing the content. - */ -CompressedObject.createWorkerFrom = function (uncompressedWorker, compression, compressionOptions) { - return uncompressedWorker - .pipe(new Crc32Probe()) - .pipe(new DataLengthProbe("uncompressedSize")) - .pipe(compression.compressWorker(compressionOptions)) - .pipe(new DataLengthProbe("compressedSize")) - .withStreamInfo("compression", compression); -}; - -module.exports = CompressedObject; - -},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(require,module,exports){ -'use strict'; - -var GenericWorker = require("./stream/GenericWorker"); - -exports.STORE = { - magic: "\x00\x00", - compressWorker : function (compressionOptions) { - return new GenericWorker("STORE compression"); - }, - uncompressWorker : function () { - return new GenericWorker("STORE decompression"); - } -}; -exports.DEFLATE = require('./flate'); - -},{"./flate":7,"./stream/GenericWorker":28}],4:[function(require,module,exports){ -'use strict'; - -var utils = require('./utils'); - -/** - * The following functions come from pako, from pako/lib/zlib/crc32.js - * released under the MIT license, see pako https://github.com/nodeca/pako/ - */ - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for(var n =0; n < 256; n++){ - c = n; - for(var k =0; k < 8; k++){ - c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, end = pos + len; - - crc = crc ^ (-1); - - for (var i = pos; i < end; i++ ) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - -// That's all for the pako functions. - -/** - * Compute the crc32 of a string. - * This is almost the same as the function crc32, but for strings. Using the - * same function for the two use cases leads to horrible performances. - * @param {Number} crc the starting value of the crc. - * @param {String} str the string to use. - * @param {Number} len the length of the string. - * @param {Number} pos the starting position for the crc32 computation. - * @return {Number} the computed crc32. - */ -function crc32str(crc, str, len, pos) { - var t = crcTable, end = pos + len; - - crc = crc ^ (-1); - - for (var i = pos; i < end; i++ ) { - crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - -module.exports = function crc32wrapper(input, crc) { - if (typeof input === "undefined" || !input.length) { - return 0; - } - - var isArray = utils.getTypeOf(input) !== "string"; - - if(isArray) { - return crc32(crc|0, input, input.length, 0); - } else { - return crc32str(crc|0, input, input.length, 0); - } -}; - -},{"./utils":32}],5:[function(require,module,exports){ -'use strict'; -exports.base64 = false; -exports.binary = false; -exports.dir = false; -exports.createFolders = true; -exports.date = null; -exports.compression = null; -exports.compressionOptions = null; -exports.comment = null; -exports.unixPermissions = null; -exports.dosPermissions = null; - -},{}],6:[function(require,module,exports){ -/* global Promise */ -'use strict'; - -// load the global object first: -// - it should be better integrated in the system (unhandledRejection in node) -// - the environment may have a custom Promise implementation (see zone.js) -var ES6Promise = null; -if (typeof Promise !== "undefined") { - ES6Promise = Promise; -} else { - ES6Promise = require("lie"); -} - -/** - * Let the user use/change some implementations. - */ -module.exports = { - Promise: ES6Promise -}; - -},{"lie":58}],7:[function(require,module,exports){ -'use strict'; -var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined'); - -var pako = require("pako"); -var utils = require("./utils"); -var GenericWorker = require("./stream/GenericWorker"); - -var ARRAY_TYPE = USE_TYPEDARRAY ? "uint8array" : "array"; - -exports.magic = "\x08\x00"; - -/** - * Create a worker that uses pako to inflate/deflate. - * @constructor - * @param {String} action the name of the pako function to call : either "Deflate" or "Inflate". - * @param {Object} options the options to use when (de)compressing. - */ -function FlateWorker(action, options) { - GenericWorker.call(this, "FlateWorker/" + action); - - this._pako = null; - this._pakoAction = action; - this._pakoOptions = options; - // the `meta` object from the last chunk received - // this allow this worker to pass around metadata - this.meta = {}; -} - -utils.inherits(FlateWorker, GenericWorker); - -/** - * @see GenericWorker.processChunk - */ -FlateWorker.prototype.processChunk = function (chunk) { - this.meta = chunk.meta; - if (this._pako === null) { - this._createPako(); - } - this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false); -}; - -/** - * @see GenericWorker.flush - */ -FlateWorker.prototype.flush = function () { - GenericWorker.prototype.flush.call(this); - if (this._pako === null) { - this._createPako(); - } - this._pako.push([], true); -}; -/** - * @see GenericWorker.cleanUp - */ -FlateWorker.prototype.cleanUp = function () { - GenericWorker.prototype.cleanUp.call(this); - this._pako = null; -}; - -/** - * Create the _pako object. - * TODO: lazy-loading this object isn't the best solution but it's the - * quickest. The best solution is to lazy-load the worker list. See also the - * issue #446. - */ -FlateWorker.prototype._createPako = function () { - this._pako = new pako[this._pakoAction]({ - raw: true, - level: this._pakoOptions.level || -1 // default compression - }); - var self = this; - this._pako.onData = function(data) { - self.push({ - data : data, - meta : self.meta - }); - }; -}; - -exports.compressWorker = function (compressionOptions) { - return new FlateWorker("Deflate", compressionOptions); -}; -exports.uncompressWorker = function () { - return new FlateWorker("Inflate", {}); -}; - -},{"./stream/GenericWorker":28,"./utils":32,"pako":59}],8:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils'); -var GenericWorker = require('../stream/GenericWorker'); -var utf8 = require('../utf8'); -var crc32 = require('../crc32'); -var signature = require('../signature'); - -/** - * Transform an integer into a string in hexadecimal. - * @private - * @param {number} dec the number to convert. - * @param {number} bytes the number of bytes to generate. - * @returns {string} the result. - */ -var decToHex = function(dec, bytes) { - var hex = "", i; - for (i = 0; i < bytes; i++) { - hex += String.fromCharCode(dec & 0xff); - dec = dec >>> 8; - } - return hex; -}; - -/** - * Generate the UNIX part of the external file attributes. - * @param {Object} unixPermissions the unix permissions or null. - * @param {Boolean} isDir true if the entry is a directory, false otherwise. - * @return {Number} a 32 bit integer. - * - * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute : - * - * TTTTsstrwxrwxrwx0000000000ADVSHR - * ^^^^____________________________ file type, see zipinfo.c (UNX_*) - * ^^^_________________________ setuid, setgid, sticky - * ^^^^^^^^^________________ permissions - * ^^^^^^^^^^______ not used ? - * ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only - */ -var generateUnixExternalFileAttr = function (unixPermissions, isDir) { - - var result = unixPermissions; - if (!unixPermissions) { - // I can't use octal values in strict mode, hence the hexa. - // 040775 => 0x41fd - // 0100664 => 0x81b4 - result = isDir ? 0x41fd : 0x81b4; - } - return (result & 0xFFFF) << 16; -}; - -/** - * Generate the DOS part of the external file attributes. - * @param {Object} dosPermissions the dos permissions or null. - * @param {Boolean} isDir true if the entry is a directory, false otherwise. - * @return {Number} a 32 bit integer. - * - * Bit 0 Read-Only - * Bit 1 Hidden - * Bit 2 System - * Bit 3 Volume Label - * Bit 4 Directory - * Bit 5 Archive - */ -var generateDosExternalFileAttr = function (dosPermissions, isDir) { - - // the dir flag is already set for compatibility - return (dosPermissions || 0) & 0x3F; -}; - -/** - * Generate the various parts used in the construction of the final zip file. - * @param {Object} streamInfo the hash with informations about the compressed file. - * @param {Boolean} streamedContent is the content streamed ? - * @param {Boolean} streamingEnded is the stream finished ? - * @param {number} offset the current offset from the start of the zip file. - * @param {String} platform let's pretend we are this platform (change platform dependents fields) - * @param {Function} encodeFileName the function to encode the file name / comment. - * @return {Object} the zip parts. - */ -var generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) { - var file = streamInfo['file'], - compression = streamInfo['compression'], - useCustomEncoding = encodeFileName !== utf8.utf8encode, - encodedFileName = utils.transformTo("string", encodeFileName(file.name)), - utfEncodedFileName = utils.transformTo("string", utf8.utf8encode(file.name)), - comment = file.comment, - encodedComment = utils.transformTo("string", encodeFileName(comment)), - utfEncodedComment = utils.transformTo("string", utf8.utf8encode(comment)), - useUTF8ForFileName = utfEncodedFileName.length !== file.name.length, - useUTF8ForComment = utfEncodedComment.length !== comment.length, - dosTime, - dosDate, - extraFields = "", - unicodePathExtraField = "", - unicodeCommentExtraField = "", - dir = file.dir, - date = file.date; - - - var dataInfo = { - crc32 : 0, - compressedSize : 0, - uncompressedSize : 0 - }; - - // if the content is streamed, the sizes/crc32 are only available AFTER - // the end of the stream. - if (!streamedContent || streamingEnded) { - dataInfo.crc32 = streamInfo['crc32']; - dataInfo.compressedSize = streamInfo['compressedSize']; - dataInfo.uncompressedSize = streamInfo['uncompressedSize']; - } - - var bitflag = 0; - if (streamedContent) { - // Bit 3: the sizes/crc32 are set to zero in the local header. - // The correct values are put in the data descriptor immediately - // following the compressed data. - bitflag |= 0x0008; - } - if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) { - // Bit 11: Language encoding flag (EFS). - bitflag |= 0x0800; - } - - - var extFileAttr = 0; - var versionMadeBy = 0; - if (dir) { - // dos or unix, we set the dos dir flag - extFileAttr |= 0x00010; - } - if(platform === "UNIX") { - versionMadeBy = 0x031E; // UNIX, version 3.0 - extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir); - } else { // DOS or other, fallback to DOS - versionMadeBy = 0x0014; // DOS, version 2.0 - extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir); - } - - // date - // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html - // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html - // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html - - dosTime = date.getUTCHours(); - dosTime = dosTime << 6; - dosTime = dosTime | date.getUTCMinutes(); - dosTime = dosTime << 5; - dosTime = dosTime | date.getUTCSeconds() / 2; - - dosDate = date.getUTCFullYear() - 1980; - dosDate = dosDate << 4; - dosDate = dosDate | (date.getUTCMonth() + 1); - dosDate = dosDate << 5; - dosDate = dosDate | date.getUTCDate(); - - if (useUTF8ForFileName) { - // set the unicode path extra field. unzip needs at least one extra - // field to correctly handle unicode path, so using the path is as good - // as any other information. This could improve the situation with - // other archive managers too. - // This field is usually used without the utf8 flag, with a non - // unicode path in the header (winrar, winzip). This helps (a bit) - // with the messy Windows' default compressed folders feature but - // breaks on p7zip which doesn't seek the unicode path extra field. - // So for now, UTF-8 everywhere ! - unicodePathExtraField = - // Version - decToHex(1, 1) + - // NameCRC32 - decToHex(crc32(encodedFileName), 4) + - // UnicodeName - utfEncodedFileName; - - extraFields += - // Info-ZIP Unicode Path Extra Field - "\x75\x70" + - // size - decToHex(unicodePathExtraField.length, 2) + - // content - unicodePathExtraField; - } - - if(useUTF8ForComment) { - - unicodeCommentExtraField = - // Version - decToHex(1, 1) + - // CommentCRC32 - decToHex(crc32(encodedComment), 4) + - // UnicodeName - utfEncodedComment; - - extraFields += - // Info-ZIP Unicode Path Extra Field - "\x75\x63" + - // size - decToHex(unicodeCommentExtraField.length, 2) + - // content - unicodeCommentExtraField; - } - - var header = ""; - - // version needed to extract - header += "\x0A\x00"; - // general purpose bit flag - header += decToHex(bitflag, 2); - // compression method - header += compression.magic; - // last mod file time - header += decToHex(dosTime, 2); - // last mod file date - header += decToHex(dosDate, 2); - // crc-32 - header += decToHex(dataInfo.crc32, 4); - // compressed size - header += decToHex(dataInfo.compressedSize, 4); - // uncompressed size - header += decToHex(dataInfo.uncompressedSize, 4); - // file name length - header += decToHex(encodedFileName.length, 2); - // extra field length - header += decToHex(extraFields.length, 2); - - - var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields; - - var dirRecord = signature.CENTRAL_FILE_HEADER + - // version made by (00: DOS) - decToHex(versionMadeBy, 2) + - // file header (common to file and central directory) - header + - // file comment length - decToHex(encodedComment.length, 2) + - // disk number start - "\x00\x00" + - // internal file attributes TODO - "\x00\x00" + - // external file attributes - decToHex(extFileAttr, 4) + - // relative offset of local header - decToHex(offset, 4) + - // file name - encodedFileName + - // extra field - extraFields + - // file comment - encodedComment; - - return { - fileRecord: fileRecord, - dirRecord: dirRecord - }; -}; - -/** - * Generate the EOCD record. - * @param {Number} entriesCount the number of entries in the zip file. - * @param {Number} centralDirLength the length (in bytes) of the central dir. - * @param {Number} localDirLength the length (in bytes) of the local dir. - * @param {String} comment the zip file comment as a binary string. - * @param {Function} encodeFileName the function to encode the comment. - * @return {String} the EOCD record. - */ -var generateCentralDirectoryEnd = function (entriesCount, centralDirLength, localDirLength, comment, encodeFileName) { - var dirEnd = ""; - var encodedComment = utils.transformTo("string", encodeFileName(comment)); - - // end of central dir signature - dirEnd = signature.CENTRAL_DIRECTORY_END + - // number of this disk - "\x00\x00" + - // number of the disk with the start of the central directory - "\x00\x00" + - // total number of entries in the central directory on this disk - decToHex(entriesCount, 2) + - // total number of entries in the central directory - decToHex(entriesCount, 2) + - // size of the central directory 4 bytes - decToHex(centralDirLength, 4) + - // offset of start of central directory with respect to the starting disk number - decToHex(localDirLength, 4) + - // .ZIP file comment length - decToHex(encodedComment.length, 2) + - // .ZIP file comment - encodedComment; - - return dirEnd; -}; - -/** - * Generate data descriptors for a file entry. - * @param {Object} streamInfo the hash generated by a worker, containing informations - * on the file entry. - * @return {String} the data descriptors. - */ -var generateDataDescriptors = function (streamInfo) { - var descriptor = ""; - descriptor = signature.DATA_DESCRIPTOR + - // crc-32 4 bytes - decToHex(streamInfo['crc32'], 4) + - // compressed size 4 bytes - decToHex(streamInfo['compressedSize'], 4) + - // uncompressed size 4 bytes - decToHex(streamInfo['uncompressedSize'], 4); - - return descriptor; -}; - - -/** - * A worker to concatenate other workers to create a zip file. - * @param {Boolean} streamFiles `true` to stream the content of the files, - * `false` to accumulate it. - * @param {String} comment the comment to use. - * @param {String} platform the platform to use, "UNIX" or "DOS". - * @param {Function} encodeFileName the function to encode file names and comments. - */ -function ZipFileWorker(streamFiles, comment, platform, encodeFileName) { - GenericWorker.call(this, "ZipFileWorker"); - // The number of bytes written so far. This doesn't count accumulated chunks. - this.bytesWritten = 0; - // The comment of the zip file - this.zipComment = comment; - // The platform "generating" the zip file. - this.zipPlatform = platform; - // the function to encode file names and comments. - this.encodeFileName = encodeFileName; - // Should we stream the content of the files ? - this.streamFiles = streamFiles; - // If `streamFiles` is false, we will need to accumulate the content of the - // files to calculate sizes / crc32 (and write them *before* the content). - // This boolean indicates if we are accumulating chunks (it will change a lot - // during the lifetime of this worker). - this.accumulate = false; - // The buffer receiving chunks when accumulating content. - this.contentBuffer = []; - // The list of generated directory records. - this.dirRecords = []; - // The offset (in bytes) from the beginning of the zip file for the current source. - this.currentSourceOffset = 0; - // The total number of entries in this zip file. - this.entriesCount = 0; - // the name of the file currently being added, null when handling the end of the zip file. - // Used for the emited metadata. - this.currentFile = null; - - - - this._sources = []; -} -utils.inherits(ZipFileWorker, GenericWorker); - -/** - * @see GenericWorker.push - */ -ZipFileWorker.prototype.push = function (chunk) { - - var currentFilePercent = chunk.meta.percent || 0; - var entriesCount = this.entriesCount; - var remainingFiles = this._sources.length; - - if(this.accumulate) { - this.contentBuffer.push(chunk); - } else { - this.bytesWritten += chunk.data.length; - - GenericWorker.prototype.push.call(this, { - data : chunk.data, - meta : { - currentFile : this.currentFile, - percent : entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100 - } - }); - } -}; - -/** - * The worker started a new source (an other worker). - * @param {Object} streamInfo the streamInfo object from the new source. - */ -ZipFileWorker.prototype.openedSource = function (streamInfo) { - this.currentSourceOffset = this.bytesWritten; - this.currentFile = streamInfo['file'].name; - - var streamedContent = this.streamFiles && !streamInfo['file'].dir; - - // don't stream folders (because they don't have any content) - if(streamedContent) { - var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); - this.push({ - data : record.fileRecord, - meta : {percent:0} - }); - } else { - // we need to wait for the whole file before pushing anything - this.accumulate = true; - } -}; - -/** - * The worker finished a source (an other worker). - * @param {Object} streamInfo the streamInfo object from the finished source. - */ -ZipFileWorker.prototype.closedSource = function (streamInfo) { - this.accumulate = false; - var streamedContent = this.streamFiles && !streamInfo['file'].dir; - var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); - - this.dirRecords.push(record.dirRecord); - if(streamedContent) { - // after the streamed file, we put data descriptors - this.push({ - data : generateDataDescriptors(streamInfo), - meta : {percent:100} - }); - } else { - // the content wasn't streamed, we need to push everything now - // first the file record, then the content - this.push({ - data : record.fileRecord, - meta : {percent:0} - }); - while(this.contentBuffer.length) { - this.push(this.contentBuffer.shift()); - } - } - this.currentFile = null; -}; - -/** - * @see GenericWorker.flush - */ -ZipFileWorker.prototype.flush = function () { - - var localDirLength = this.bytesWritten; - for(var i = 0; i < this.dirRecords.length; i++) { - this.push({ - data : this.dirRecords[i], - meta : {percent:100} - }); - } - var centralDirLength = this.bytesWritten - localDirLength; - - var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName); - - this.push({ - data : dirEnd, - meta : {percent:100} - }); -}; - -/** - * Prepare the next source to be read. - */ -ZipFileWorker.prototype.prepareNextSource = function () { - this.previous = this._sources.shift(); - this.openedSource(this.previous.streamInfo); - if (this.isPaused) { - this.previous.pause(); - } else { - this.previous.resume(); - } -}; - -/** - * @see GenericWorker.registerPrevious - */ -ZipFileWorker.prototype.registerPrevious = function (previous) { - this._sources.push(previous); - var self = this; - - previous.on('data', function (chunk) { - self.processChunk(chunk); - }); - previous.on('end', function () { - self.closedSource(self.previous.streamInfo); - if(self._sources.length) { - self.prepareNextSource(); - } else { - self.end(); - } - }); - previous.on('error', function (e) { - self.error(e); - }); - return this; -}; - -/** - * @see GenericWorker.resume - */ -ZipFileWorker.prototype.resume = function () { - if(!GenericWorker.prototype.resume.call(this)) { - return false; - } - - if (!this.previous && this._sources.length) { - this.prepareNextSource(); - return true; - } - if (!this.previous && !this._sources.length && !this.generatedError) { - this.end(); - return true; - } -}; - -/** - * @see GenericWorker.error - */ -ZipFileWorker.prototype.error = function (e) { - var sources = this._sources; - if(!GenericWorker.prototype.error.call(this, e)) { - return false; - } - for(var i = 0; i < sources.length; i++) { - try { - sources[i].error(e); - } catch(e) { - // the `error` exploded, nothing to do - } - } - return true; -}; - -/** - * @see GenericWorker.lock - */ -ZipFileWorker.prototype.lock = function () { - GenericWorker.prototype.lock.call(this); - var sources = this._sources; - for(var i = 0; i < sources.length; i++) { - sources[i].lock(); - } -}; - -module.exports = ZipFileWorker; - -},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(require,module,exports){ -'use strict'; - -var compressions = require('../compressions'); -var ZipFileWorker = require('./ZipFileWorker'); - -/** - * Find the compression to use. - * @param {String} fileCompression the compression defined at the file level, if any. - * @param {String} zipCompression the compression defined at the load() level. - * @return {Object} the compression object to use. - */ -var getCompression = function (fileCompression, zipCompression) { - - var compressionName = fileCompression || zipCompression; - var compression = compressions[compressionName]; - if (!compression) { - throw new Error(compressionName + " is not a valid compression method !"); - } - return compression; -}; - -/** - * Create a worker to generate a zip file. - * @param {JSZip} zip the JSZip instance at the right root level. - * @param {Object} options to generate the zip file. - * @param {String} comment the comment to use. - */ -exports.generateWorker = function (zip, options, comment) { - - var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName); - var entriesCount = 0; - try { - - zip.forEach(function (relativePath, file) { - entriesCount++; - var compression = getCompression(file.options.compression, options.compression); - var compressionOptions = file.options.compressionOptions || options.compressionOptions || {}; - var dir = file.dir, date = file.date; - - file._compressWorker(compression, compressionOptions) - .withStreamInfo("file", { - name : relativePath, - dir : dir, - date : date, - comment : file.comment || "", - unixPermissions : file.unixPermissions, - dosPermissions : file.dosPermissions - }) - .pipe(zipFileWorker); - }); - zipFileWorker.entriesCount = entriesCount; - } catch (e) { - zipFileWorker.error(e); - } - - return zipFileWorker; -}; - -},{"../compressions":3,"./ZipFileWorker":8}],10:[function(require,module,exports){ -'use strict'; - -/** - * Representation a of zip file in js - * @constructor - */ -function JSZip() { - // if this constructor is used without `new`, it adds `new` before itself: - if(!(this instanceof JSZip)) { - return new JSZip(); - } - - if(arguments.length) { - throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide."); - } - - // object containing the files : - // { - // "folder/" : {...}, - // "folder/data.txt" : {...} - // } - this.files = {}; - - this.comment = null; - - // Where we are in the hierarchy - this.root = ""; - this.clone = function() { - var newObj = new JSZip(); - for (var i in this) { - if (typeof this[i] !== "function") { - newObj[i] = this[i]; - } - } - return newObj; - }; -} -JSZip.prototype = require('./object'); -JSZip.prototype.loadAsync = require('./load'); -JSZip.support = require('./support'); -JSZip.defaults = require('./defaults'); - -// TODO find a better way to handle this version, -// a require('package.json').version doesn't work with webpack, see #327 -JSZip.version = "3.1.5"; - -JSZip.loadAsync = function (content, options) { - return new JSZip().loadAsync(content, options); -}; - -JSZip.external = require("./external"); -module.exports = JSZip; - -},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(require,module,exports){ -'use strict'; -var utils = require('./utils'); -var external = require("./external"); -var utf8 = require('./utf8'); -var utils = require('./utils'); -var ZipEntries = require('./zipEntries'); -var Crc32Probe = require('./stream/Crc32Probe'); -var nodejsUtils = require("./nodejsUtils"); - -/** - * Check the CRC32 of an entry. - * @param {ZipEntry} zipEntry the zip entry to check. - * @return {Promise} the result. - */ -function checkEntryCRC32(zipEntry) { - return new external.Promise(function (resolve, reject) { - var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe()); - worker.on("error", function (e) { - reject(e); - }) - .on("end", function () { - if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) { - reject(new Error("Corrupted zip : CRC32 mismatch")); - } else { - resolve(); - } - }) - .resume(); - }); -} - -module.exports = function(data, options) { - var zip = this; - options = utils.extend(options || {}, { - base64: false, - checkCRC32: false, - optimizedBinaryString: false, - createFolders: false, - decodeFileName: utf8.utf8decode - }); - - if (nodejsUtils.isNode && nodejsUtils.isStream(data)) { - return external.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")); - } - - return utils.prepareContent("the loaded zip file", data, true, options.optimizedBinaryString, options.base64) - .then(function(data) { - var zipEntries = new ZipEntries(options); - zipEntries.load(data); - return zipEntries; - }).then(function checkCRC32(zipEntries) { - var promises = [external.Promise.resolve(zipEntries)]; - var files = zipEntries.files; - if (options.checkCRC32) { - for (var i = 0; i < files.length; i++) { - promises.push(checkEntryCRC32(files[i])); - } - } - return external.Promise.all(promises); - }).then(function addFiles(results) { - var zipEntries = results.shift(); - var files = zipEntries.files; - for (var i = 0; i < files.length; i++) { - var input = files[i]; - zip.file(input.fileNameStr, input.decompressed, { - binary: true, - optimizedBinaryString: true, - date: input.date, - dir: input.dir, - comment : input.fileCommentStr.length ? input.fileCommentStr : null, - unixPermissions : input.unixPermissions, - dosPermissions : input.dosPermissions, - createFolders: options.createFolders - }); - } - if (zipEntries.zipComment.length) { - zip.comment = zipEntries.zipComment; - } - - return zip; - }); -}; - -},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(require,module,exports){ -"use strict"; - -var utils = require('../utils'); -var GenericWorker = require('../stream/GenericWorker'); - -/** - * A worker that use a nodejs stream as source. - * @constructor - * @param {String} filename the name of the file entry for this stream. - * @param {Readable} stream the nodejs stream. - */ -function NodejsStreamInputAdapter(filename, stream) { - GenericWorker.call(this, "Nodejs stream input adapter for " + filename); - this._upstreamEnded = false; - this._bindStream(stream); -} - -utils.inherits(NodejsStreamInputAdapter, GenericWorker); - -/** - * Prepare the stream and bind the callbacks on it. - * Do this ASAP on node 0.10 ! A lazy binding doesn't always work. - * @param {Stream} stream the nodejs stream to use. - */ -NodejsStreamInputAdapter.prototype._bindStream = function (stream) { - var self = this; - this._stream = stream; - stream.pause(); - stream - .on("data", function (chunk) { - self.push({ - data: chunk, - meta : { - percent : 0 - } - }); - }) - .on("error", function (e) { - if(self.isPaused) { - this.generatedError = e; - } else { - self.error(e); - } - }) - .on("end", function () { - if(self.isPaused) { - self._upstreamEnded = true; - } else { - self.end(); - } - }); -}; -NodejsStreamInputAdapter.prototype.pause = function () { - if(!GenericWorker.prototype.pause.call(this)) { - return false; - } - this._stream.pause(); - return true; -}; -NodejsStreamInputAdapter.prototype.resume = function () { - if(!GenericWorker.prototype.resume.call(this)) { - return false; - } - - if(this._upstreamEnded) { - this.end(); - } else { - this._stream.resume(); - } - - return true; -}; - -module.exports = NodejsStreamInputAdapter; - -},{"../stream/GenericWorker":28,"../utils":32}],13:[function(require,module,exports){ -'use strict'; - -var Readable = require('readable-stream').Readable; - -var utils = require('../utils'); -utils.inherits(NodejsStreamOutputAdapter, Readable); - -/** -* A nodejs stream using a worker as source. -* @see the SourceWrapper in http://nodejs.org/api/stream.html -* @constructor -* @param {StreamHelper} helper the helper wrapping the worker -* @param {Object} options the nodejs stream options -* @param {Function} updateCb the update callback. -*/ -function NodejsStreamOutputAdapter(helper, options, updateCb) { - Readable.call(this, options); - this._helper = helper; - - var self = this; - helper.on("data", function (data, meta) { - if (!self.push(data)) { - self._helper.pause(); - } - if(updateCb) { - updateCb(meta); - } - }) - .on("error", function(e) { - self.emit('error', e); - }) - .on("end", function () { - self.push(null); - }); -} - - -NodejsStreamOutputAdapter.prototype._read = function() { - this._helper.resume(); -}; - -module.exports = NodejsStreamOutputAdapter; - -},{"../utils":32,"readable-stream":16}],14:[function(require,module,exports){ -'use strict'; - -module.exports = { - /** - * True if this is running in Nodejs, will be undefined in a browser. - * In a browser, browserify won't include this file and the whole module - * will be resolved an empty object. - */ - isNode : typeof Buffer !== "undefined", - /** - * Create a new nodejs Buffer from an existing content. - * @param {Object} data the data to pass to the constructor. - * @param {String} encoding the encoding to use. - * @return {Buffer} a new Buffer. - */ - newBufferFrom: function(data, encoding) { - // XXX We can't use `Buffer.from` which comes from `Uint8Array.from` - // in nodejs v4 (< v.4.5). It's not the expected implementation (and - // has a different signature). - // see https://github.com/nodejs/node/issues/8053 - // A condition on nodejs' version won't solve the issue as we don't - // control the Buffer polyfills that may or may not be used. - return new Buffer(data, encoding); - }, - /** - * Create a new nodejs Buffer with the specified size. - * @param {Integer} size the size of the buffer. - * @return {Buffer} a new Buffer. - */ - allocBuffer: function (size) { - if (Buffer.alloc) { - return Buffer.alloc(size); - } else { - return new Buffer(size); - } - }, - /** - * Find out if an object is a Buffer. - * @param {Object} b the object to test. - * @return {Boolean} true if the object is a Buffer, false otherwise. - */ - isBuffer : function(b){ - return Buffer.isBuffer(b); - }, - - isStream : function (obj) { - return obj && - typeof obj.on === "function" && - typeof obj.pause === "function" && - typeof obj.resume === "function"; - } -}; - -},{}],15:[function(require,module,exports){ -'use strict'; -var utf8 = require('./utf8'); -var utils = require('./utils'); -var GenericWorker = require('./stream/GenericWorker'); -var StreamHelper = require('./stream/StreamHelper'); -var defaults = require('./defaults'); -var CompressedObject = require('./compressedObject'); -var ZipObject = require('./zipObject'); -var generate = require("./generate"); -var nodejsUtils = require("./nodejsUtils"); -var NodejsStreamInputAdapter = require("./nodejs/NodejsStreamInputAdapter"); - - -/** - * Add a file in the current folder. - * @private - * @param {string} name the name of the file - * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file - * @param {Object} originalOptions the options of the file - * @return {Object} the new file. - */ -var fileAdd = function(name, data, originalOptions) { - // be sure sub folders exist - var dataType = utils.getTypeOf(data), - parent; - - - /* - * Correct options. - */ - - var o = utils.extend(originalOptions || {}, defaults); - o.date = o.date || new Date(); - if (o.compression !== null) { - o.compression = o.compression.toUpperCase(); - } - - if (typeof o.unixPermissions === "string") { - o.unixPermissions = parseInt(o.unixPermissions, 8); - } - - // UNX_IFDIR 0040000 see zipinfo.c - if (o.unixPermissions && (o.unixPermissions & 0x4000)) { - o.dir = true; - } - // Bit 4 Directory - if (o.dosPermissions && (o.dosPermissions & 0x0010)) { - o.dir = true; - } - - if (o.dir) { - name = forceTrailingSlash(name); - } - if (o.createFolders && (parent = parentFolder(name))) { - folderAdd.call(this, parent, true); - } - - var isUnicodeString = dataType === "string" && o.binary === false && o.base64 === false; - if (!originalOptions || typeof originalOptions.binary === "undefined") { - o.binary = !isUnicodeString; - } - - - var isCompressedEmpty = (data instanceof CompressedObject) && data.uncompressedSize === 0; - - if (isCompressedEmpty || o.dir || !data || data.length === 0) { - o.base64 = false; - o.binary = true; - data = ""; - o.compression = "STORE"; - dataType = "string"; - } - - /* - * Convert content to fit. - */ - - var zipObjectContent = null; - if (data instanceof CompressedObject || data instanceof GenericWorker) { - zipObjectContent = data; - } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) { - zipObjectContent = new NodejsStreamInputAdapter(name, data); - } else { - zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64); - } - - var object = new ZipObject(name, zipObjectContent, o); - this.files[name] = object; - /* - TODO: we can't throw an exception because we have async promises - (we can have a promise of a Date() for example) but returning a - promise is useless because file(name, data) returns the JSZip - object for chaining. Should we break that to allow the user - to catch the error ? - - return external.Promise.resolve(zipObjectContent) - .then(function () { - return object; - }); - */ -}; - -/** - * Find the parent folder of the path. - * @private - * @param {string} path the path to use - * @return {string} the parent folder, or "" - */ -var parentFolder = function (path) { - if (path.slice(-1) === '/') { - path = path.substring(0, path.length - 1); - } - var lastSlash = path.lastIndexOf('/'); - return (lastSlash > 0) ? path.substring(0, lastSlash) : ""; -}; - -/** - * Returns the path with a slash at the end. - * @private - * @param {String} path the path to check. - * @return {String} the path with a trailing slash. - */ -var forceTrailingSlash = function(path) { - // Check the name ends with a / - if (path.slice(-1) !== "/") { - path += "/"; // IE doesn't like substr(-1) - } - return path; -}; - -/** - * Add a (sub) folder in the current folder. - * @private - * @param {string} name the folder's name - * @param {boolean=} [createFolders] If true, automatically create sub - * folders. Defaults to false. - * @return {Object} the new folder. - */ -var folderAdd = function(name, createFolders) { - createFolders = (typeof createFolders !== 'undefined') ? createFolders : defaults.createFolders; - - name = forceTrailingSlash(name); - - // Does this folder already exist? - if (!this.files[name]) { - fileAdd.call(this, name, null, { - dir: true, - createFolders: createFolders - }); - } - return this.files[name]; -}; - -/** -* Cross-window, cross-Node-context regular expression detection -* @param {Object} object Anything -* @return {Boolean} true if the object is a regular expression, -* false otherwise -*/ -function isRegExp(object) { - return Object.prototype.toString.call(object) === "[object RegExp]"; -} - -// return the actual prototype of JSZip -var out = { - /** - * @see loadAsync - */ - load: function() { - throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); - }, - - - /** - * Call a callback function for each entry at this folder level. - * @param {Function} cb the callback function: - * function (relativePath, file) {...} - * It takes 2 arguments : the relative path and the file. - */ - forEach: function(cb) { - var filename, relativePath, file; - for (filename in this.files) { - if (!this.files.hasOwnProperty(filename)) { - continue; - } - file = this.files[filename]; - relativePath = filename.slice(this.root.length, filename.length); - if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root - cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn... - } - } - }, - - /** - * Filter nested files/folders with the specified function. - * @param {Function} search the predicate to use : - * function (relativePath, file) {...} - * It takes 2 arguments : the relative path and the file. - * @return {Array} An array of matching elements. - */ - filter: function(search) { - var result = []; - this.forEach(function (relativePath, entry) { - if (search(relativePath, entry)) { // the file matches the function - result.push(entry); - } - - }); - return result; - }, - - /** - * Add a file to the zip file, or search a file. - * @param {string|RegExp} name The name of the file to add (if data is defined), - * the name of the file to find (if no data) or a regex to match files. - * @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded - * @param {Object} o File options - * @return {JSZip|Object|Array} this JSZip object (when adding a file), - * a file (when searching by string) or an array of files (when searching by regex). - */ - file: function(name, data, o) { - if (arguments.length === 1) { - if (isRegExp(name)) { - var regexp = name; - return this.filter(function(relativePath, file) { - return !file.dir && regexp.test(relativePath); - }); - } - else { // text - var obj = this.files[this.root + name]; - if (obj && !obj.dir) { - return obj; - } else { - return null; - } - } - } - else { // more than one argument : we have data ! - name = this.root + name; - fileAdd.call(this, name, data, o); - } - return this; - }, - - /** - * Add a directory to the zip file, or search. - * @param {String|RegExp} arg The name of the directory to add, or a regex to search folders. - * @return {JSZip} an object with the new directory as the root, or an array containing matching folders. - */ - folder: function(arg) { - if (!arg) { - return this; - } - - if (isRegExp(arg)) { - return this.filter(function(relativePath, file) { - return file.dir && arg.test(relativePath); - }); - } - - // else, name is a new folder - var name = this.root + arg; - var newFolder = folderAdd.call(this, name); - - // Allow chaining by returning a new object with this folder as the root - var ret = this.clone(); - ret.root = newFolder.name; - return ret; - }, - - /** - * Delete a file, or a directory and all sub-files, from the zip - * @param {string} name the name of the file to delete - * @return {JSZip} this JSZip object - */ - remove: function(name) { - name = this.root + name; - var file = this.files[name]; - if (!file) { - // Look for any folders - if (name.slice(-1) !== "/") { - name += "/"; - } - file = this.files[name]; - } - - if (file && !file.dir) { - // file - delete this.files[name]; - } else { - // maybe a folder, delete recursively - var kids = this.filter(function(relativePath, file) { - return file.name.slice(0, name.length) === name; - }); - for (var i = 0; i < kids.length; i++) { - delete this.files[kids[i].name]; - } - } - - return this; - }, - - /** - * Generate the complete zip file - * @param {Object} options the options to generate the zip file : - * - compression, "STORE" by default. - * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob. - * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file - */ - generate: function(options) { - throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); - }, - - /** - * Generate the complete zip file as an internal stream. - * @param {Object} options the options to generate the zip file : - * - compression, "STORE" by default. - * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob. - * @return {StreamHelper} the streamed zip file. - */ - generateInternalStream: function(options) { - var worker, opts = {}; - try { - opts = utils.extend(options || {}, { - streamFiles: false, - compression: "STORE", - compressionOptions : null, - type: "", - platform: "DOS", - comment: null, - mimeType: 'application/zip', - encodeFileName: utf8.utf8encode - }); - - opts.type = opts.type.toLowerCase(); - opts.compression = opts.compression.toUpperCase(); - - // "binarystring" is prefered but the internals use "string". - if(opts.type === "binarystring") { - opts.type = "string"; - } - - if (!opts.type) { - throw new Error("No output type specified."); - } - - utils.checkSupport(opts.type); - - // accept nodejs `process.platform` - if( - opts.platform === 'darwin' || - opts.platform === 'freebsd' || - opts.platform === 'linux' || - opts.platform === 'sunos' - ) { - opts.platform = "UNIX"; - } - if (opts.platform === 'win32') { - opts.platform = "DOS"; - } - - var comment = opts.comment || this.comment || ""; - worker = generate.generateWorker(this, opts, comment); - } catch (e) { - worker = new GenericWorker("error"); - worker.error(e); - } - return new StreamHelper(worker, opts.type || "string", opts.mimeType); - }, - /** - * Generate the complete zip file asynchronously. - * @see generateInternalStream - */ - generateAsync: function(options, onUpdate) { - return this.generateInternalStream(options).accumulate(onUpdate); - }, - /** - * Generate the complete zip file asynchronously. - * @see generateInternalStream - */ - generateNodeStream: function(options, onUpdate) { - options = options || {}; - if (!options.type) { - options.type = "nodebuffer"; - } - return this.generateInternalStream(options).toNodejsStream(onUpdate); - } -}; -module.exports = out; - -},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(require,module,exports){ -/* - * This file is used by module bundlers (browserify/webpack/etc) when - * including a stream implementation. We use "readable-stream" to get a - * consistent behavior between nodejs versions but bundlers often have a shim - * for "stream". Using this shim greatly improve the compatibility and greatly - * reduce the final size of the bundle (only one stream implementation, not - * two). - */ -module.exports = require("stream"); - -},{"stream":undefined}],17:[function(require,module,exports){ -'use strict'; -var DataReader = require('./DataReader'); -var utils = require('../utils'); - -function ArrayReader(data) { - DataReader.call(this, data); - for(var i = 0; i < this.data.length; i++) { - data[i] = data[i] & 0xFF; - } -} -utils.inherits(ArrayReader, DataReader); -/** - * @see DataReader.byteAt - */ -ArrayReader.prototype.byteAt = function(i) { - return this.data[this.zero + i]; -}; -/** - * @see DataReader.lastIndexOfSignature - */ -ArrayReader.prototype.lastIndexOfSignature = function(sig) { - var sig0 = sig.charCodeAt(0), - sig1 = sig.charCodeAt(1), - sig2 = sig.charCodeAt(2), - sig3 = sig.charCodeAt(3); - for (var i = this.length - 4; i >= 0; --i) { - if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) { - return i - this.zero; - } - } - - return -1; -}; -/** - * @see DataReader.readAndCheckSignature - */ -ArrayReader.prototype.readAndCheckSignature = function (sig) { - var sig0 = sig.charCodeAt(0), - sig1 = sig.charCodeAt(1), - sig2 = sig.charCodeAt(2), - sig3 = sig.charCodeAt(3), - data = this.readData(4); - return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3]; -}; -/** - * @see DataReader.readData - */ -ArrayReader.prototype.readData = function(size) { - this.checkOffset(size); - if(size === 0) { - return []; - } - var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); - this.index += size; - return result; -}; -module.exports = ArrayReader; - -},{"../utils":32,"./DataReader":18}],18:[function(require,module,exports){ -'use strict'; -var utils = require('../utils'); - -function DataReader(data) { - this.data = data; // type : see implementation - this.length = data.length; - this.index = 0; - this.zero = 0; -} -DataReader.prototype = { - /** - * Check that the offset will not go too far. - * @param {string} offset the additional offset to check. - * @throws {Error} an Error if the offset is out of bounds. - */ - checkOffset: function(offset) { - this.checkIndex(this.index + offset); - }, - /** - * Check that the specified index will not be too far. - * @param {string} newIndex the index to check. - * @throws {Error} an Error if the index is out of bounds. - */ - checkIndex: function(newIndex) { - if (this.length < this.zero + newIndex || newIndex < 0) { - throw new Error("End of data reached (data length = " + this.length + ", asked index = " + (newIndex) + "). Corrupted zip ?"); - } - }, - /** - * Change the index. - * @param {number} newIndex The new index. - * @throws {Error} if the new index is out of the data. - */ - setIndex: function(newIndex) { - this.checkIndex(newIndex); - this.index = newIndex; - }, - /** - * Skip the next n bytes. - * @param {number} n the number of bytes to skip. - * @throws {Error} if the new index is out of the data. - */ - skip: function(n) { - this.setIndex(this.index + n); - }, - /** - * Get the byte at the specified index. - * @param {number} i the index to use. - * @return {number} a byte. - */ - byteAt: function(i) { - // see implementations - }, - /** - * Get the next number with a given byte size. - * @param {number} size the number of bytes to read. - * @return {number} the corresponding number. - */ - readInt: function(size) { - var result = 0, - i; - this.checkOffset(size); - for (i = this.index + size - 1; i >= this.index; i--) { - result = (result << 8) + this.byteAt(i); - } - this.index += size; - return result; - }, - /** - * Get the next string with a given byte size. - * @param {number} size the number of bytes to read. - * @return {string} the corresponding string. - */ - readString: function(size) { - return utils.transformTo("string", this.readData(size)); - }, - /** - * Get raw data without conversion, bytes. - * @param {number} size the number of bytes to read. - * @return {Object} the raw data, implementation specific. - */ - readData: function(size) { - // see implementations - }, - /** - * Find the last occurence of a zip signature (4 bytes). - * @param {string} sig the signature to find. - * @return {number} the index of the last occurence, -1 if not found. - */ - lastIndexOfSignature: function(sig) { - // see implementations - }, - /** - * Read the signature (4 bytes) at the current position and compare it with sig. - * @param {string} sig the expected signature - * @return {boolean} true if the signature matches, false otherwise. - */ - readAndCheckSignature: function(sig) { - // see implementations - }, - /** - * Get the next date. - * @return {Date} the date. - */ - readDate: function() { - var dostime = this.readInt(4); - return new Date(Date.UTC( - ((dostime >> 25) & 0x7f) + 1980, // year - ((dostime >> 21) & 0x0f) - 1, // month - (dostime >> 16) & 0x1f, // day - (dostime >> 11) & 0x1f, // hour - (dostime >> 5) & 0x3f, // minute - (dostime & 0x1f) << 1)); // second - } -}; -module.exports = DataReader; - -},{"../utils":32}],19:[function(require,module,exports){ -'use strict'; -var Uint8ArrayReader = require('./Uint8ArrayReader'); -var utils = require('../utils'); - -function NodeBufferReader(data) { - Uint8ArrayReader.call(this, data); -} -utils.inherits(NodeBufferReader, Uint8ArrayReader); - -/** - * @see DataReader.readData - */ -NodeBufferReader.prototype.readData = function(size) { - this.checkOffset(size); - var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); - this.index += size; - return result; -}; -module.exports = NodeBufferReader; - -},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(require,module,exports){ -'use strict'; -var DataReader = require('./DataReader'); -var utils = require('../utils'); - -function StringReader(data) { - DataReader.call(this, data); -} -utils.inherits(StringReader, DataReader); -/** - * @see DataReader.byteAt - */ -StringReader.prototype.byteAt = function(i) { - return this.data.charCodeAt(this.zero + i); -}; -/** - * @see DataReader.lastIndexOfSignature - */ -StringReader.prototype.lastIndexOfSignature = function(sig) { - return this.data.lastIndexOf(sig) - this.zero; -}; -/** - * @see DataReader.readAndCheckSignature - */ -StringReader.prototype.readAndCheckSignature = function (sig) { - var data = this.readData(4); - return sig === data; -}; -/** - * @see DataReader.readData - */ -StringReader.prototype.readData = function(size) { - this.checkOffset(size); - // this will work because the constructor applied the "& 0xff" mask. - var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); - this.index += size; - return result; -}; -module.exports = StringReader; - -},{"../utils":32,"./DataReader":18}],21:[function(require,module,exports){ -'use strict'; -var ArrayReader = require('./ArrayReader'); -var utils = require('../utils'); - -function Uint8ArrayReader(data) { - ArrayReader.call(this, data); -} -utils.inherits(Uint8ArrayReader, ArrayReader); -/** - * @see DataReader.readData - */ -Uint8ArrayReader.prototype.readData = function(size) { - this.checkOffset(size); - if(size === 0) { - // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of []. - return new Uint8Array(0); - } - var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size); - this.index += size; - return result; -}; -module.exports = Uint8ArrayReader; - -},{"../utils":32,"./ArrayReader":17}],22:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils'); -var support = require('../support'); -var ArrayReader = require('./ArrayReader'); -var StringReader = require('./StringReader'); -var NodeBufferReader = require('./NodeBufferReader'); -var Uint8ArrayReader = require('./Uint8ArrayReader'); - -/** - * Create a reader adapted to the data. - * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read. - * @return {DataReader} the data reader. - */ -module.exports = function (data) { - var type = utils.getTypeOf(data); - utils.checkSupport(type); - if (type === "string" && !support.uint8array) { - return new StringReader(data); - } - if (type === "nodebuffer") { - return new NodeBufferReader(data); - } - if (support.uint8array) { - return new Uint8ArrayReader(utils.transformTo("uint8array", data)); - } - return new ArrayReader(utils.transformTo("array", data)); -}; - -},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(require,module,exports){ -'use strict'; -exports.LOCAL_FILE_HEADER = "PK\x03\x04"; -exports.CENTRAL_FILE_HEADER = "PK\x01\x02"; -exports.CENTRAL_DIRECTORY_END = "PK\x05\x06"; -exports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x06\x07"; -exports.ZIP64_CENTRAL_DIRECTORY_END = "PK\x06\x06"; -exports.DATA_DESCRIPTOR = "PK\x07\x08"; - -},{}],24:[function(require,module,exports){ -'use strict'; - -var GenericWorker = require('./GenericWorker'); -var utils = require('../utils'); - -/** - * A worker which convert chunks to a specified type. - * @constructor - * @param {String} destType the destination type. - */ -function ConvertWorker(destType) { - GenericWorker.call(this, "ConvertWorker to " + destType); - this.destType = destType; -} -utils.inherits(ConvertWorker, GenericWorker); - -/** - * @see GenericWorker.processChunk - */ -ConvertWorker.prototype.processChunk = function (chunk) { - this.push({ - data : utils.transformTo(this.destType, chunk.data), - meta : chunk.meta - }); -}; -module.exports = ConvertWorker; - -},{"../utils":32,"./GenericWorker":28}],25:[function(require,module,exports){ -'use strict'; - -var GenericWorker = require('./GenericWorker'); -var crc32 = require('../crc32'); -var utils = require('../utils'); - -/** - * A worker which calculate the crc32 of the data flowing through. - * @constructor - */ -function Crc32Probe() { - GenericWorker.call(this, "Crc32Probe"); - this.withStreamInfo("crc32", 0); -} -utils.inherits(Crc32Probe, GenericWorker); - -/** - * @see GenericWorker.processChunk - */ -Crc32Probe.prototype.processChunk = function (chunk) { - this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0); - this.push(chunk); -}; -module.exports = Crc32Probe; - -},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils'); -var GenericWorker = require('./GenericWorker'); - -/** - * A worker which calculate the total length of the data flowing through. - * @constructor - * @param {String} propName the name used to expose the length - */ -function DataLengthProbe(propName) { - GenericWorker.call(this, "DataLengthProbe for " + propName); - this.propName = propName; - this.withStreamInfo(propName, 0); -} -utils.inherits(DataLengthProbe, GenericWorker); - -/** - * @see GenericWorker.processChunk - */ -DataLengthProbe.prototype.processChunk = function (chunk) { - if(chunk) { - var length = this.streamInfo[this.propName] || 0; - this.streamInfo[this.propName] = length + chunk.data.length; - } - GenericWorker.prototype.processChunk.call(this, chunk); -}; -module.exports = DataLengthProbe; - - -},{"../utils":32,"./GenericWorker":28}],27:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils'); -var GenericWorker = require('./GenericWorker'); - -// the size of the generated chunks -// TODO expose this as a public variable -var DEFAULT_BLOCK_SIZE = 16 * 1024; - -/** - * A worker that reads a content and emits chunks. - * @constructor - * @param {Promise} dataP the promise of the data to split - */ -function DataWorker(dataP) { - GenericWorker.call(this, "DataWorker"); - var self = this; - this.dataIsReady = false; - this.index = 0; - this.max = 0; - this.data = null; - this.type = ""; - - this._tickScheduled = false; - - dataP.then(function (data) { - self.dataIsReady = true; - self.data = data; - self.max = data && data.length || 0; - self.type = utils.getTypeOf(data); - if(!self.isPaused) { - self._tickAndRepeat(); - } - }, function (e) { - self.error(e); - }); -} - -utils.inherits(DataWorker, GenericWorker); - -/** - * @see GenericWorker.cleanUp - */ -DataWorker.prototype.cleanUp = function () { - GenericWorker.prototype.cleanUp.call(this); - this.data = null; -}; - -/** - * @see GenericWorker.resume - */ -DataWorker.prototype.resume = function () { - if(!GenericWorker.prototype.resume.call(this)) { - return false; - } - - if (!this._tickScheduled && this.dataIsReady) { - this._tickScheduled = true; - utils.delay(this._tickAndRepeat, [], this); - } - return true; -}; - -/** - * Trigger a tick a schedule an other call to this function. - */ -DataWorker.prototype._tickAndRepeat = function() { - this._tickScheduled = false; - if(this.isPaused || this.isFinished) { - return; - } - this._tick(); - if(!this.isFinished) { - utils.delay(this._tickAndRepeat, [], this); - this._tickScheduled = true; - } -}; - -/** - * Read and push a chunk. - */ -DataWorker.prototype._tick = function() { - - if(this.isPaused || this.isFinished) { - return false; - } - - var size = DEFAULT_BLOCK_SIZE; - var data = null, nextIndex = Math.min(this.max, this.index + size); - if (this.index >= this.max) { - // EOF - return this.end(); - } else { - switch(this.type) { - case "string": - data = this.data.substring(this.index, nextIndex); - break; - case "uint8array": - data = this.data.subarray(this.index, nextIndex); - break; - case "array": - case "nodebuffer": - data = this.data.slice(this.index, nextIndex); - break; - } - this.index = nextIndex; - return this.push({ - data : data, - meta : { - percent : this.max ? this.index / this.max * 100 : 0 - } - }); - } -}; - -module.exports = DataWorker; - -},{"../utils":32,"./GenericWorker":28}],28:[function(require,module,exports){ -'use strict'; - -/** - * A worker that does nothing but passing chunks to the next one. This is like - * a nodejs stream but with some differences. On the good side : - * - it works on IE 6-9 without any issue / polyfill - * - it weights less than the full dependencies bundled with browserify - * - it forwards errors (no need to declare an error handler EVERYWHERE) - * - * A chunk is an object with 2 attributes : `meta` and `data`. The former is an - * object containing anything (`percent` for example), see each worker for more - * details. The latter is the real data (String, Uint8Array, etc). - * - * @constructor - * @param {String} name the name of the stream (mainly used for debugging purposes) - */ -function GenericWorker(name) { - // the name of the worker - this.name = name || "default"; - // an object containing metadata about the workers chain - this.streamInfo = {}; - // an error which happened when the worker was paused - this.generatedError = null; - // an object containing metadata to be merged by this worker into the general metadata - this.extraStreamInfo = {}; - // true if the stream is paused (and should not do anything), false otherwise - this.isPaused = true; - // true if the stream is finished (and should not do anything), false otherwise - this.isFinished = false; - // true if the stream is locked to prevent further structure updates (pipe), false otherwise - this.isLocked = false; - // the event listeners - this._listeners = { - 'data':[], - 'end':[], - 'error':[] - }; - // the previous worker, if any - this.previous = null; -} - -GenericWorker.prototype = { - /** - * Push a chunk to the next workers. - * @param {Object} chunk the chunk to push - */ - push : function (chunk) { - this.emit("data", chunk); - }, - /** - * End the stream. - * @return {Boolean} true if this call ended the worker, false otherwise. - */ - end : function () { - if (this.isFinished) { - return false; - } - - this.flush(); - try { - this.emit("end"); - this.cleanUp(); - this.isFinished = true; - } catch (e) { - this.emit("error", e); - } - return true; - }, - /** - * End the stream with an error. - * @param {Error} e the error which caused the premature end. - * @return {Boolean} true if this call ended the worker with an error, false otherwise. - */ - error : function (e) { - if (this.isFinished) { - return false; - } - - if(this.isPaused) { - this.generatedError = e; - } else { - this.isFinished = true; - - this.emit("error", e); - - // in the workers chain exploded in the middle of the chain, - // the error event will go downward but we also need to notify - // workers upward that there has been an error. - if(this.previous) { - this.previous.error(e); - } - - this.cleanUp(); - } - return true; - }, - /** - * Add a callback on an event. - * @param {String} name the name of the event (data, end, error) - * @param {Function} listener the function to call when the event is triggered - * @return {GenericWorker} the current object for chainability - */ - on : function (name, listener) { - this._listeners[name].push(listener); - return this; - }, - /** - * Clean any references when a worker is ending. - */ - cleanUp : function () { - this.streamInfo = this.generatedError = this.extraStreamInfo = null; - this._listeners = []; - }, - /** - * Trigger an event. This will call registered callback with the provided arg. - * @param {String} name the name of the event (data, end, error) - * @param {Object} arg the argument to call the callback with. - */ - emit : function (name, arg) { - if (this._listeners[name]) { - for(var i = 0; i < this._listeners[name].length; i++) { - this._listeners[name][i].call(this, arg); - } - } - }, - /** - * Chain a worker with an other. - * @param {Worker} next the worker receiving events from the current one. - * @return {worker} the next worker for chainability - */ - pipe : function (next) { - return next.registerPrevious(this); - }, - /** - * Same as `pipe` in the other direction. - * Using an API with `pipe(next)` is very easy. - * Implementing the API with the point of view of the next one registering - * a source is easier, see the ZipFileWorker. - * @param {Worker} previous the previous worker, sending events to this one - * @return {Worker} the current worker for chainability - */ - registerPrevious : function (previous) { - if (this.isLocked) { - throw new Error("The stream '" + this + "' has already been used."); - } - - // sharing the streamInfo... - this.streamInfo = previous.streamInfo; - // ... and adding our own bits - this.mergeStreamInfo(); - this.previous = previous; - var self = this; - previous.on('data', function (chunk) { - self.processChunk(chunk); - }); - previous.on('end', function () { - self.end(); - }); - previous.on('error', function (e) { - self.error(e); - }); - return this; - }, - /** - * Pause the stream so it doesn't send events anymore. - * @return {Boolean} true if this call paused the worker, false otherwise. - */ - pause : function () { - if(this.isPaused || this.isFinished) { - return false; - } - this.isPaused = true; - - if(this.previous) { - this.previous.pause(); - } - return true; - }, - /** - * Resume a paused stream. - * @return {Boolean} true if this call resumed the worker, false otherwise. - */ - resume : function () { - if(!this.isPaused || this.isFinished) { - return false; - } - this.isPaused = false; - - // if true, the worker tried to resume but failed - var withError = false; - if(this.generatedError) { - this.error(this.generatedError); - withError = true; - } - if(this.previous) { - this.previous.resume(); - } - - return !withError; - }, - /** - * Flush any remaining bytes as the stream is ending. - */ - flush : function () {}, - /** - * Process a chunk. This is usually the method overridden. - * @param {Object} chunk the chunk to process. - */ - processChunk : function(chunk) { - this.push(chunk); - }, - /** - * Add a key/value to be added in the workers chain streamInfo once activated. - * @param {String} key the key to use - * @param {Object} value the associated value - * @return {Worker} the current worker for chainability - */ - withStreamInfo : function (key, value) { - this.extraStreamInfo[key] = value; - this.mergeStreamInfo(); - return this; - }, - /** - * Merge this worker's streamInfo into the chain's streamInfo. - */ - mergeStreamInfo : function () { - for(var key in this.extraStreamInfo) { - if (!this.extraStreamInfo.hasOwnProperty(key)) { - continue; - } - this.streamInfo[key] = this.extraStreamInfo[key]; - } - }, - - /** - * Lock the stream to prevent further updates on the workers chain. - * After calling this method, all calls to pipe will fail. - */ - lock: function () { - if (this.isLocked) { - throw new Error("The stream '" + this + "' has already been used."); - } - this.isLocked = true; - if (this.previous) { - this.previous.lock(); - } - }, - - /** - * - * Pretty print the workers chain. - */ - toString : function () { - var me = "Worker " + this.name; - if (this.previous) { - return this.previous + " -> " + me; - } else { - return me; - } - } -}; - -module.exports = GenericWorker; - -},{}],29:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils'); -var ConvertWorker = require('./ConvertWorker'); -var GenericWorker = require('./GenericWorker'); -var base64 = require('../base64'); -var support = require("../support"); -var external = require("../external"); - -var NodejsStreamOutputAdapter = null; -if (support.nodestream) { - try { - NodejsStreamOutputAdapter = require('../nodejs/NodejsStreamOutputAdapter'); - } catch(e) {} -} - -/** - * Apply the final transformation of the data. If the user wants a Blob for - * example, it's easier to work with an U8intArray and finally do the - * ArrayBuffer/Blob conversion. - * @param {String} type the name of the final type - * @param {String|Uint8Array|Buffer} content the content to transform - * @param {String} mimeType the mime type of the content, if applicable. - * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the content in the right format. - */ -function transformZipOutput(type, content, mimeType) { - switch(type) { - case "blob" : - return utils.newBlob(utils.transformTo("arraybuffer", content), mimeType); - case "base64" : - return base64.encode(content); - default : - return utils.transformTo(type, content); - } -} - -/** - * Concatenate an array of data of the given type. - * @param {String} type the type of the data in the given array. - * @param {Array} dataArray the array containing the data chunks to concatenate - * @return {String|Uint8Array|Buffer} the concatenated data - * @throws Error if the asked type is unsupported - */ -function concat (type, dataArray) { - var i, index = 0, res = null, totalLength = 0; - for(i = 0; i < dataArray.length; i++) { - totalLength += dataArray[i].length; - } - switch(type) { - case "string": - return dataArray.join(""); - case "array": - return Array.prototype.concat.apply([], dataArray); - case "uint8array": - res = new Uint8Array(totalLength); - for(i = 0; i < dataArray.length; i++) { - res.set(dataArray[i], index); - index += dataArray[i].length; - } - return res; - case "nodebuffer": - return Buffer.concat(dataArray); - default: - throw new Error("concat : unsupported type '" + type + "'"); - } -} - -/** - * Listen a StreamHelper, accumulate its content and concatenate it into a - * complete block. - * @param {StreamHelper} helper the helper to use. - * @param {Function} updateCallback a callback called on each update. Called - * with one arg : - * - the metadata linked to the update received. - * @return Promise the promise for the accumulation. - */ -function accumulate(helper, updateCallback) { - return new external.Promise(function (resolve, reject){ - var dataArray = []; - var chunkType = helper._internalType, - resultType = helper._outputType, - mimeType = helper._mimeType; - helper - .on('data', function (data, meta) { - dataArray.push(data); - if(updateCallback) { - updateCallback(meta); - } - }) - .on('error', function(err) { - dataArray = []; - reject(err); - }) - .on('end', function (){ - try { - var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType); - resolve(result); - } catch (e) { - reject(e); - } - dataArray = []; - }) - .resume(); - }); -} - -/** - * An helper to easily use workers outside of JSZip. - * @constructor - * @param {Worker} worker the worker to wrap - * @param {String} outputType the type of data expected by the use - * @param {String} mimeType the mime type of the content, if applicable. - */ -function StreamHelper(worker, outputType, mimeType) { - var internalType = outputType; - switch(outputType) { - case "blob": - case "arraybuffer": - internalType = "uint8array"; - break; - case "base64": - internalType = "string"; - break; - } - - try { - // the type used internally - this._internalType = internalType; - // the type used to output results - this._outputType = outputType; - // the mime type - this._mimeType = mimeType; - utils.checkSupport(internalType); - this._worker = worker.pipe(new ConvertWorker(internalType)); - // the last workers can be rewired without issues but we need to - // prevent any updates on previous workers. - worker.lock(); - } catch(e) { - this._worker = new GenericWorker("error"); - this._worker.error(e); - } -} - -StreamHelper.prototype = { - /** - * Listen a StreamHelper, accumulate its content and concatenate it into a - * complete block. - * @param {Function} updateCb the update callback. - * @return Promise the promise for the accumulation. - */ - accumulate : function (updateCb) { - return accumulate(this, updateCb); - }, - /** - * Add a listener on an event triggered on a stream. - * @param {String} evt the name of the event - * @param {Function} fn the listener - * @return {StreamHelper} the current helper. - */ - on : function (evt, fn) { - var self = this; - - if(evt === "data") { - this._worker.on(evt, function (chunk) { - fn.call(self, chunk.data, chunk.meta); - }); - } else { - this._worker.on(evt, function () { - utils.delay(fn, arguments, self); - }); - } - return this; - }, - /** - * Resume the flow of chunks. - * @return {StreamHelper} the current helper. - */ - resume : function () { - utils.delay(this._worker.resume, [], this._worker); - return this; - }, - /** - * Pause the flow of chunks. - * @return {StreamHelper} the current helper. - */ - pause : function () { - this._worker.pause(); - return this; - }, - /** - * Return a nodejs stream for this helper. - * @param {Function} updateCb the update callback. - * @return {NodejsStreamOutputAdapter} the nodejs stream. - */ - toNodejsStream : function (updateCb) { - utils.checkSupport("nodestream"); - if (this._outputType !== "nodebuffer") { - // an object stream containing blob/arraybuffer/uint8array/string - // is strange and I don't know if it would be useful. - // I you find this comment and have a good usecase, please open a - // bug report ! - throw new Error(this._outputType + " is not supported by this method"); - } - - return new NodejsStreamOutputAdapter(this, { - objectMode : this._outputType !== "nodebuffer" - }, updateCb); - } -}; - - -module.exports = StreamHelper; - -},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(require,module,exports){ -'use strict'; - -exports.base64 = true; -exports.array = true; -exports.string = true; -exports.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined"; -exports.nodebuffer = typeof Buffer !== "undefined"; -// contains true if JSZip can read/generate Uint8Array, false otherwise. -exports.uint8array = typeof Uint8Array !== "undefined"; - -if (typeof ArrayBuffer === "undefined") { - exports.blob = false; -} -else { - var buffer = new ArrayBuffer(0); - try { - exports.blob = new Blob([buffer], { - type: "application/zip" - }).size === 0; - } - catch (e) { - try { - var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder; - var builder = new Builder(); - builder.append(buffer); - exports.blob = builder.getBlob('application/zip').size === 0; - } - catch (e) { - exports.blob = false; - } - } -} - -try { - exports.nodestream = !!require('readable-stream').Readable; -} catch(e) { - exports.nodestream = false; -} - -},{"readable-stream":16}],31:[function(require,module,exports){ -'use strict'; - -var utils = require('./utils'); -var support = require('./support'); -var nodejsUtils = require('./nodejsUtils'); -var GenericWorker = require('./stream/GenericWorker'); - -/** - * The following functions come from pako, from pako/lib/utils/strings - * released under the MIT license, see pako https://github.com/nodeca/pako/ - */ - -// Table with utf8 lengths (calculated by first byte of sequence) -// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, -// because max possible codepoint is 0x10ffff -var _utf8len = new Array(256); -for (var i=0; i<256; i++) { - _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1); -} -_utf8len[254]=_utf8len[254]=1; // Invalid sequence start - -// convert string to array (typed, when possible) -var string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - if (support.uint8array) { - buf = new Uint8Array(buf_len); - } else { - buf = new Array(buf_len); - } - - // convert - for (i=0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { - c2 = str.charCodeAt(m_pos+1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -var utf8border = function(buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max-1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Fuckup - very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means vuffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -// convert array to string -var buf2string = function (buf) { - var str, i, out, c, c_len; - var len = buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len*2); - - for (out=0, i=0; i 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - // shrinkBuf(utf16buf, out) - if (utf16buf.length !== out) { - if(utf16buf.subarray) { - utf16buf = utf16buf.subarray(0, out); - } else { - utf16buf.length = out; - } - } - - // return String.fromCharCode.apply(null, utf16buf); - return utils.applyFromCharCode(utf16buf); -}; - - -// That's all for the pako functions. - - -/** - * Transform a javascript string into an array (typed if possible) of bytes, - * UTF-8 encoded. - * @param {String} str the string to encode - * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string. - */ -exports.utf8encode = function utf8encode(str) { - if (support.nodebuffer) { - return nodejsUtils.newBufferFrom(str, "utf-8"); - } - - return string2buf(str); -}; - - -/** - * Transform a bytes array (or a representation) representing an UTF-8 encoded - * string into a javascript string. - * @param {Array|Uint8Array|Buffer} buf the data de decode - * @return {String} the decoded string. - */ -exports.utf8decode = function utf8decode(buf) { - if (support.nodebuffer) { - return utils.transformTo("nodebuffer", buf).toString("utf-8"); - } - - buf = utils.transformTo(support.uint8array ? "uint8array" : "array", buf); - - return buf2string(buf); -}; - -/** - * A worker to decode utf8 encoded binary chunks into string chunks. - * @constructor - */ -function Utf8DecodeWorker() { - GenericWorker.call(this, "utf-8 decode"); - // the last bytes if a chunk didn't end with a complete codepoint. - this.leftOver = null; -} -utils.inherits(Utf8DecodeWorker, GenericWorker); - -/** - * @see GenericWorker.processChunk - */ -Utf8DecodeWorker.prototype.processChunk = function (chunk) { - - var data = utils.transformTo(support.uint8array ? "uint8array" : "array", chunk.data); - - // 1st step, re-use what's left of the previous chunk - if (this.leftOver && this.leftOver.length) { - if(support.uint8array) { - var previousData = data; - data = new Uint8Array(previousData.length + this.leftOver.length); - data.set(this.leftOver, 0); - data.set(previousData, this.leftOver.length); - } else { - data = this.leftOver.concat(data); - } - this.leftOver = null; - } - - var nextBoundary = utf8border(data); - var usableData = data; - if (nextBoundary !== data.length) { - if (support.uint8array) { - usableData = data.subarray(0, nextBoundary); - this.leftOver = data.subarray(nextBoundary, data.length); - } else { - usableData = data.slice(0, nextBoundary); - this.leftOver = data.slice(nextBoundary, data.length); - } - } - - this.push({ - data : exports.utf8decode(usableData), - meta : chunk.meta - }); -}; - -/** - * @see GenericWorker.flush - */ -Utf8DecodeWorker.prototype.flush = function () { - if(this.leftOver && this.leftOver.length) { - this.push({ - data : exports.utf8decode(this.leftOver), - meta : {} - }); - this.leftOver = null; - } -}; -exports.Utf8DecodeWorker = Utf8DecodeWorker; - -/** - * A worker to endcode string chunks into utf8 encoded binary chunks. - * @constructor - */ -function Utf8EncodeWorker() { - GenericWorker.call(this, "utf-8 encode"); -} -utils.inherits(Utf8EncodeWorker, GenericWorker); - -/** - * @see GenericWorker.processChunk - */ -Utf8EncodeWorker.prototype.processChunk = function (chunk) { - this.push({ - data : exports.utf8encode(chunk.data), - meta : chunk.meta - }); -}; -exports.Utf8EncodeWorker = Utf8EncodeWorker; - -},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(require,module,exports){ -'use strict'; - -var support = require('./support'); -var base64 = require('./base64'); -var nodejsUtils = require('./nodejsUtils'); -var setImmediate = require('core-js/library/fn/set-immediate'); -var external = require("./external"); - - -/** - * Convert a string that pass as a "binary string": it should represent a byte - * array but may have > 255 char codes. Be sure to take only the first byte - * and returns the byte array. - * @param {String} str the string to transform. - * @return {Array|Uint8Array} the string in a binary format. - */ -function string2binary(str) { - var result = null; - if (support.uint8array) { - result = new Uint8Array(str.length); - } else { - result = new Array(str.length); - } - return stringToArrayLike(str, result); -} - -/** - * Create a new blob with the given content and the given type. - * @param {String|ArrayBuffer} part the content to put in the blob. DO NOT use - * an Uint8Array because the stock browser of android 4 won't accept it (it - * will be silently converted to a string, "[object Uint8Array]"). - * - * Use only ONE part to build the blob to avoid a memory leak in IE11 / Edge: - * when a large amount of Array is used to create the Blob, the amount of - * memory consumed is nearly 100 times the original data amount. - * - * @param {String} type the mime type of the blob. - * @return {Blob} the created blob. - */ -exports.newBlob = function(part, type) { - exports.checkSupport("blob"); - - try { - // Blob constructor - return new Blob([part], { - type: type - }); - } - catch (e) { - - try { - // deprecated, browser only, old way - var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder; - var builder = new Builder(); - builder.append(part); - return builder.getBlob(type); - } - catch (e) { - - // well, fuck ?! - throw new Error("Bug : can't construct the Blob."); - } - } - - -}; -/** - * The identity function. - * @param {Object} input the input. - * @return {Object} the same input. - */ -function identity(input) { - return input; -} - -/** - * Fill in an array with a string. - * @param {String} str the string to use. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated). - * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array. - */ -function stringToArrayLike(str, array) { - for (var i = 0; i < str.length; ++i) { - array[i] = str.charCodeAt(i) & 0xFF; - } - return array; -} - -/** - * An helper for the function arrayLikeToString. - * This contains static informations and functions that - * can be optimized by the browser JIT compiler. - */ -var arrayToStringHelper = { - /** - * Transform an array of int into a string, chunk by chunk. - * See the performances notes on arrayLikeToString. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. - * @param {String} type the type of the array. - * @param {Integer} chunk the chunk size. - * @return {String} the resulting string. - * @throws Error if the chunk is too big for the stack. - */ - stringifyByChunk: function(array, type, chunk) { - var result = [], k = 0, len = array.length; - // shortcut - if (len <= chunk) { - return String.fromCharCode.apply(null, array); - } - while (k < len) { - if (type === "array" || type === "nodebuffer") { - result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len)))); - } - else { - result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len)))); - } - k += chunk; - } - return result.join(""); - }, - /** - * Call String.fromCharCode on every item in the array. - * This is the naive implementation, which generate A LOT of intermediate string. - * This should be used when everything else fail. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. - * @return {String} the result. - */ - stringifyByChar: function(array){ - var resultStr = ""; - for(var i = 0; i < array.length; i++) { - resultStr += String.fromCharCode(array[i]); - } - return resultStr; - }, - applyCanBeUsed : { - /** - * true if the browser accepts to use String.fromCharCode on Uint8Array - */ - uint8array : (function () { - try { - return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1; - } catch (e) { - return false; - } - })(), - /** - * true if the browser accepts to use String.fromCharCode on nodejs Buffer. - */ - nodebuffer : (function () { - try { - return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.allocBuffer(1)).length === 1; - } catch (e) { - return false; - } - })() - } -}; - -/** - * Transform an array-like object to a string. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. - * @return {String} the result. - */ -function arrayLikeToString(array) { - // Performances notes : - // -------------------- - // String.fromCharCode.apply(null, array) is the fastest, see - // see http://jsperf.com/converting-a-uint8array-to-a-string/2 - // but the stack is limited (and we can get huge arrays !). - // - // result += String.fromCharCode(array[i]); generate too many strings ! - // - // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2 - // TODO : we now have workers that split the work. Do we still need that ? - var chunk = 65536, - type = exports.getTypeOf(array), - canUseApply = true; - if (type === "uint8array") { - canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array; - } else if (type === "nodebuffer") { - canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer; - } - - if (canUseApply) { - while (chunk > 1) { - try { - return arrayToStringHelper.stringifyByChunk(array, type, chunk); - } catch (e) { - chunk = Math.floor(chunk / 2); - } - } - } - - // no apply or chunk error : slow and painful algorithm - // default browser on android 4.* - return arrayToStringHelper.stringifyByChar(array); -} - -exports.applyFromCharCode = arrayLikeToString; - - -/** - * Copy the data from an array-like to an other array-like. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array. - * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated. - * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array. - */ -function arrayLikeToArrayLike(arrayFrom, arrayTo) { - for (var i = 0; i < arrayFrom.length; i++) { - arrayTo[i] = arrayFrom[i]; - } - return arrayTo; -} - -// a matrix containing functions to transform everything into everything. -var transform = {}; - -// string to ? -transform["string"] = { - "string": identity, - "array": function(input) { - return stringToArrayLike(input, new Array(input.length)); - }, - "arraybuffer": function(input) { - return transform["string"]["uint8array"](input).buffer; - }, - "uint8array": function(input) { - return stringToArrayLike(input, new Uint8Array(input.length)); - }, - "nodebuffer": function(input) { - return stringToArrayLike(input, nodejsUtils.allocBuffer(input.length)); - } -}; - -// array to ? -transform["array"] = { - "string": arrayLikeToString, - "array": identity, - "arraybuffer": function(input) { - return (new Uint8Array(input)).buffer; - }, - "uint8array": function(input) { - return new Uint8Array(input); - }, - "nodebuffer": function(input) { - return nodejsUtils.newBufferFrom(input); - } -}; - -// arraybuffer to ? -transform["arraybuffer"] = { - "string": function(input) { - return arrayLikeToString(new Uint8Array(input)); - }, - "array": function(input) { - return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength)); - }, - "arraybuffer": identity, - "uint8array": function(input) { - return new Uint8Array(input); - }, - "nodebuffer": function(input) { - return nodejsUtils.newBufferFrom(new Uint8Array(input)); - } -}; - -// uint8array to ? -transform["uint8array"] = { - "string": arrayLikeToString, - "array": function(input) { - return arrayLikeToArrayLike(input, new Array(input.length)); - }, - "arraybuffer": function(input) { - return input.buffer; - }, - "uint8array": identity, - "nodebuffer": function(input) { - return nodejsUtils.newBufferFrom(input); - } -}; - -// nodebuffer to ? -transform["nodebuffer"] = { - "string": arrayLikeToString, - "array": function(input) { - return arrayLikeToArrayLike(input, new Array(input.length)); - }, - "arraybuffer": function(input) { - return transform["nodebuffer"]["uint8array"](input).buffer; - }, - "uint8array": function(input) { - return arrayLikeToArrayLike(input, new Uint8Array(input.length)); - }, - "nodebuffer": identity -}; - -/** - * Transform an input into any type. - * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer. - * If no output type is specified, the unmodified input will be returned. - * @param {String} outputType the output type. - * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert. - * @throws {Error} an Error if the browser doesn't support the requested output type. - */ -exports.transformTo = function(outputType, input) { - if (!input) { - // undefined, null, etc - // an empty string won't harm. - input = ""; - } - if (!outputType) { - return input; - } - exports.checkSupport(outputType); - var inputType = exports.getTypeOf(input); - var result = transform[inputType][outputType](input); - return result; -}; - -/** - * Return the type of the input. - * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer. - * @param {Object} input the input to identify. - * @return {String} the (lowercase) type of the input. - */ -exports.getTypeOf = function(input) { - if (typeof input === "string") { - return "string"; - } - if (Object.prototype.toString.call(input) === "[object Array]") { - return "array"; - } - if (support.nodebuffer && nodejsUtils.isBuffer(input)) { - return "nodebuffer"; - } - if (support.uint8array && input instanceof Uint8Array) { - return "uint8array"; - } - if (support.arraybuffer && input instanceof ArrayBuffer) { - return "arraybuffer"; - } -}; - -/** - * Throw an exception if the type is not supported. - * @param {String} type the type to check. - * @throws {Error} an Error if the browser doesn't support the requested type. - */ -exports.checkSupport = function(type) { - var supported = support[type.toLowerCase()]; - if (!supported) { - throw new Error(type + " is not supported by this platform"); - } -}; - -exports.MAX_VALUE_16BITS = 65535; -exports.MAX_VALUE_32BITS = -1; // well, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" is parsed as -1 - -/** - * Prettify a string read as binary. - * @param {string} str the string to prettify. - * @return {string} a pretty string. - */ -exports.pretty = function(str) { - var res = '', - code, i; - for (i = 0; i < (str || "").length; i++) { - code = str.charCodeAt(i); - res += '\\x' + (code < 16 ? "0" : "") + code.toString(16).toUpperCase(); - } - return res; -}; - -/** - * Defer the call of a function. - * @param {Function} callback the function to call asynchronously. - * @param {Array} args the arguments to give to the callback. - */ -exports.delay = function(callback, args, self) { - setImmediate(function () { - callback.apply(self || null, args || []); - }); -}; - -/** - * Extends a prototype with an other, without calling a constructor with - * side effects. Inspired by nodejs' `utils.inherits` - * @param {Function} ctor the constructor to augment - * @param {Function} superCtor the parent constructor to use - */ -exports.inherits = function (ctor, superCtor) { - var Obj = function() {}; - Obj.prototype = superCtor.prototype; - ctor.prototype = new Obj(); -}; - -/** - * Merge the objects passed as parameters into a new one. - * @private - * @param {...Object} var_args All objects to merge. - * @return {Object} a new object with the data of the others. - */ -exports.extend = function() { - var result = {}, i, attr; - for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers - for (attr in arguments[i]) { - if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === "undefined") { - result[attr] = arguments[i][attr]; - } - } - } - return result; -}; - -/** - * Transform arbitrary content into a Promise. - * @param {String} name a name for the content being processed. - * @param {Object} inputData the content to process. - * @param {Boolean} isBinary true if the content is not an unicode string - * @param {Boolean} isOptimizedBinaryString true if the string content only has one byte per character. - * @param {Boolean} isBase64 true if the string content is encoded with base64. - * @return {Promise} a promise in a format usable by JSZip. - */ -exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) { - - // if inputData is already a promise, this flatten it. - var promise = external.Promise.resolve(inputData).then(function(data) { - - - var isBlob = support.blob && (data instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(data)) !== -1); - - if (isBlob && typeof FileReader !== "undefined") { - return new external.Promise(function (resolve, reject) { - var reader = new FileReader(); - - reader.onload = function(e) { - resolve(e.target.result); - }; - reader.onerror = function(e) { - reject(e.target.error); - }; - reader.readAsArrayBuffer(data); - }); - } else { - return data; - } - }); - - return promise.then(function(data) { - var dataType = exports.getTypeOf(data); - - if (!dataType) { - return external.Promise.reject( - new Error("Can't read the data of '" + name + "'. Is it " + - "in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?") - ); - } - // special case : it's way easier to work with Uint8Array than with ArrayBuffer - if (dataType === "arraybuffer") { - data = exports.transformTo("uint8array", data); - } else if (dataType === "string") { - if (isBase64) { - data = base64.decode(data); - } - else if (isBinary) { - // optimizedBinaryString === true means that the file has already been filtered with a 0xFF mask - if (isOptimizedBinaryString !== true) { - // this is a string, not in a base64 format. - // Be sure that this is a correct "binary string" - data = string2binary(data); - } - } - } - return data; - }); -}; - -},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"core-js/library/fn/set-immediate":36}],33:[function(require,module,exports){ -'use strict'; -var readerFor = require('./reader/readerFor'); -var utils = require('./utils'); -var sig = require('./signature'); -var ZipEntry = require('./zipEntry'); -var utf8 = require('./utf8'); -var support = require('./support'); -// class ZipEntries {{{ -/** - * All the entries in the zip file. - * @constructor - * @param {Object} loadOptions Options for loading the stream. - */ -function ZipEntries(loadOptions) { - this.files = []; - this.loadOptions = loadOptions; -} -ZipEntries.prototype = { - /** - * Check that the reader is on the specified signature. - * @param {string} expectedSignature the expected signature. - * @throws {Error} if it is an other signature. - */ - checkSignature: function(expectedSignature) { - if (!this.reader.readAndCheckSignature(expectedSignature)) { - this.reader.index -= 4; - var signature = this.reader.readString(4); - throw new Error("Corrupted zip or bug: unexpected signature " + "(" + utils.pretty(signature) + ", expected " + utils.pretty(expectedSignature) + ")"); - } - }, - /** - * Check if the given signature is at the given index. - * @param {number} askedIndex the index to check. - * @param {string} expectedSignature the signature to expect. - * @return {boolean} true if the signature is here, false otherwise. - */ - isSignature: function(askedIndex, expectedSignature) { - var currentIndex = this.reader.index; - this.reader.setIndex(askedIndex); - var signature = this.reader.readString(4); - var result = signature === expectedSignature; - this.reader.setIndex(currentIndex); - return result; - }, - /** - * Read the end of the central directory. - */ - readBlockEndOfCentral: function() { - this.diskNumber = this.reader.readInt(2); - this.diskWithCentralDirStart = this.reader.readInt(2); - this.centralDirRecordsOnThisDisk = this.reader.readInt(2); - this.centralDirRecords = this.reader.readInt(2); - this.centralDirSize = this.reader.readInt(4); - this.centralDirOffset = this.reader.readInt(4); - - this.zipCommentLength = this.reader.readInt(2); - // warning : the encoding depends of the system locale - // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded. - // On a windows machine, this field is encoded with the localized windows code page. - var zipComment = this.reader.readData(this.zipCommentLength); - var decodeParamType = support.uint8array ? "uint8array" : "array"; - // To get consistent behavior with the generation part, we will assume that - // this is utf8 encoded unless specified otherwise. - var decodeContent = utils.transformTo(decodeParamType, zipComment); - this.zipComment = this.loadOptions.decodeFileName(decodeContent); - }, - /** - * Read the end of the Zip 64 central directory. - * Not merged with the method readEndOfCentral : - * The end of central can coexist with its Zip64 brother, - * I don't want to read the wrong number of bytes ! - */ - readBlockZip64EndOfCentral: function() { - this.zip64EndOfCentralSize = this.reader.readInt(8); - this.reader.skip(4); - // this.versionMadeBy = this.reader.readString(2); - // this.versionNeeded = this.reader.readInt(2); - this.diskNumber = this.reader.readInt(4); - this.diskWithCentralDirStart = this.reader.readInt(4); - this.centralDirRecordsOnThisDisk = this.reader.readInt(8); - this.centralDirRecords = this.reader.readInt(8); - this.centralDirSize = this.reader.readInt(8); - this.centralDirOffset = this.reader.readInt(8); - - this.zip64ExtensibleData = {}; - var extraDataSize = this.zip64EndOfCentralSize - 44, - index = 0, - extraFieldId, - extraFieldLength, - extraFieldValue; - while (index < extraDataSize) { - extraFieldId = this.reader.readInt(2); - extraFieldLength = this.reader.readInt(4); - extraFieldValue = this.reader.readData(extraFieldLength); - this.zip64ExtensibleData[extraFieldId] = { - id: extraFieldId, - length: extraFieldLength, - value: extraFieldValue - }; - } - }, - /** - * Read the end of the Zip 64 central directory locator. - */ - readBlockZip64EndOfCentralLocator: function() { - this.diskWithZip64CentralDirStart = this.reader.readInt(4); - this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8); - this.disksCount = this.reader.readInt(4); - if (this.disksCount > 1) { - throw new Error("Multi-volumes zip are not supported"); - } - }, - /** - * Read the local files, based on the offset read in the central part. - */ - readLocalFiles: function() { - var i, file; - for (i = 0; i < this.files.length; i++) { - file = this.files[i]; - this.reader.setIndex(file.localHeaderOffset); - this.checkSignature(sig.LOCAL_FILE_HEADER); - file.readLocalPart(this.reader); - file.handleUTF8(); - file.processAttributes(); - } - }, - /** - * Read the central directory. - */ - readCentralDir: function() { - var file; - - this.reader.setIndex(this.centralDirOffset); - while (this.reader.readAndCheckSignature(sig.CENTRAL_FILE_HEADER)) { - file = new ZipEntry({ - zip64: this.zip64 - }, this.loadOptions); - file.readCentralPart(this.reader); - this.files.push(file); - } - - if (this.centralDirRecords !== this.files.length) { - if (this.centralDirRecords !== 0 && this.files.length === 0) { - // We expected some records but couldn't find ANY. - // This is really suspicious, as if something went wrong. - throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length); - } else { - // We found some records but not all. - // Something is wrong but we got something for the user: no error here. - // console.warn("expected", this.centralDirRecords, "records in central dir, got", this.files.length); - } - } - }, - /** - * Read the end of central directory. - */ - readEndOfCentral: function() { - var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END); - if (offset < 0) { - // Check if the content is a truncated zip or complete garbage. - // A "LOCAL_FILE_HEADER" is not required at the beginning (auto - // extractible zip for example) but it can give a good hint. - // If an ajax request was used without responseType, we will also - // get unreadable data. - var isGarbage = !this.isSignature(0, sig.LOCAL_FILE_HEADER); - - if (isGarbage) { - throw new Error("Can't find end of central directory : is this a zip file ? " + - "If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"); - } else { - throw new Error("Corrupted zip: can't find end of central directory"); - } - - } - this.reader.setIndex(offset); - var endOfCentralDirOffset = offset; - this.checkSignature(sig.CENTRAL_DIRECTORY_END); - this.readBlockEndOfCentral(); - - - /* extract from the zip spec : - 4) If one of the fields in the end of central directory - record is too small to hold required data, the field - should be set to -1 (0xFFFF or 0xFFFFFFFF) and the - ZIP64 format record should be created. - 5) The end of central directory record and the - Zip64 end of central directory locator record must - reside on the same disk when splitting or spanning - an archive. - */ - if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) { - this.zip64 = true; - - /* - Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from - the zip file can fit into a 32bits integer. This cannot be solved : JavaScript represents - all numbers as 64-bit double precision IEEE 754 floating point numbers. - So, we have 53bits for integers and bitwise operations treat everything as 32bits. - see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators - and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5 - */ - - // should look for a zip64 EOCD locator - offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); - if (offset < 0) { - throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator"); - } - this.reader.setIndex(offset); - this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); - this.readBlockZip64EndOfCentralLocator(); - - // now the zip64 EOCD record - if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, sig.ZIP64_CENTRAL_DIRECTORY_END)) { - // console.warn("ZIP64 end of central directory not where expected."); - this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END); - if (this.relativeOffsetEndOfZip64CentralDir < 0) { - throw new Error("Corrupted zip: can't find the ZIP64 end of central directory"); - } - } - this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir); - this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END); - this.readBlockZip64EndOfCentral(); - } - - var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize; - if (this.zip64) { - expectedEndOfCentralDirOffset += 20; // end of central dir 64 locator - expectedEndOfCentralDirOffset += 12 /* should not include the leading 12 bytes */ + this.zip64EndOfCentralSize; - } - - var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset; - - if (extraBytes > 0) { - // console.warn(extraBytes, "extra bytes at beginning or within zipfile"); - if (this.isSignature(endOfCentralDirOffset, sig.CENTRAL_FILE_HEADER)) { - // The offsets seem wrong, but we have something at the specified offset. - // So… we keep it. - } else { - // the offset is wrong, update the "zero" of the reader - // this happens if data has been prepended (crx files for example) - this.reader.zero = extraBytes; - } - } else if (extraBytes < 0) { - throw new Error("Corrupted zip: missing " + Math.abs(extraBytes) + " bytes."); - } - }, - prepareReader: function(data) { - this.reader = readerFor(data); - }, - /** - * Read a zip file and create ZipEntries. - * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file. - */ - load: function(data) { - this.prepareReader(data); - this.readEndOfCentral(); - this.readCentralDir(); - this.readLocalFiles(); - } -}; -// }}} end of ZipEntries -module.exports = ZipEntries; - -},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(require,module,exports){ -'use strict'; -var readerFor = require('./reader/readerFor'); -var utils = require('./utils'); -var CompressedObject = require('./compressedObject'); -var crc32fn = require('./crc32'); -var utf8 = require('./utf8'); -var compressions = require('./compressions'); -var support = require('./support'); - -var MADE_BY_DOS = 0x00; -var MADE_BY_UNIX = 0x03; - -/** - * Find a compression registered in JSZip. - * @param {string} compressionMethod the method magic to find. - * @return {Object|null} the JSZip compression object, null if none found. - */ -var findCompression = function(compressionMethod) { - for (var method in compressions) { - if (!compressions.hasOwnProperty(method)) { - continue; - } - if (compressions[method].magic === compressionMethod) { - return compressions[method]; - } - } - return null; -}; - -// class ZipEntry {{{ -/** - * An entry in the zip file. - * @constructor - * @param {Object} options Options of the current file. - * @param {Object} loadOptions Options for loading the stream. - */ -function ZipEntry(options, loadOptions) { - this.options = options; - this.loadOptions = loadOptions; -} -ZipEntry.prototype = { - /** - * say if the file is encrypted. - * @return {boolean} true if the file is encrypted, false otherwise. - */ - isEncrypted: function() { - // bit 1 is set - return (this.bitFlag & 0x0001) === 0x0001; - }, - /** - * say if the file has utf-8 filename/comment. - * @return {boolean} true if the filename/comment is in utf-8, false otherwise. - */ - useUTF8: function() { - // bit 11 is set - return (this.bitFlag & 0x0800) === 0x0800; - }, - /** - * Read the local part of a zip file and add the info in this object. - * @param {DataReader} reader the reader to use. - */ - readLocalPart: function(reader) { - var compression, localExtraFieldsLength; - - // we already know everything from the central dir ! - // If the central dir data are false, we are doomed. - // On the bright side, the local part is scary : zip64, data descriptors, both, etc. - // The less data we get here, the more reliable this should be. - // Let's skip the whole header and dash to the data ! - reader.skip(22); - // in some zip created on windows, the filename stored in the central dir contains \ instead of /. - // Strangely, the filename here is OK. - // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes - // or APPNOTE#4.4.17.1, "All slashes MUST be forward slashes '/'") but there are a lot of bad zip generators... - // Search "unzip mismatching "local" filename continuing with "central" filename version" on - // the internet. - // - // I think I see the logic here : the central directory is used to display - // content and the local directory is used to extract the files. Mixing / and \ - // may be used to display \ to windows users and use / when extracting the files. - // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394 - this.fileNameLength = reader.readInt(2); - localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir - // the fileName is stored as binary data, the handleUTF8 method will take care of the encoding. - this.fileName = reader.readData(this.fileNameLength); - reader.skip(localExtraFieldsLength); - - if (this.compressedSize === -1 || this.uncompressedSize === -1) { - throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory " + "(compressedSize === -1 || uncompressedSize === -1)"); - } - - compression = findCompression(this.compressionMethod); - if (compression === null) { // no compression found - throw new Error("Corrupted zip : compression " + utils.pretty(this.compressionMethod) + " unknown (inner file : " + utils.transformTo("string", this.fileName) + ")"); - } - this.decompressed = new CompressedObject(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize)); - }, - - /** - * Read the central part of a zip file and add the info in this object. - * @param {DataReader} reader the reader to use. - */ - readCentralPart: function(reader) { - this.versionMadeBy = reader.readInt(2); - reader.skip(2); - // this.versionNeeded = reader.readInt(2); - this.bitFlag = reader.readInt(2); - this.compressionMethod = reader.readString(2); - this.date = reader.readDate(); - this.crc32 = reader.readInt(4); - this.compressedSize = reader.readInt(4); - this.uncompressedSize = reader.readInt(4); - var fileNameLength = reader.readInt(2); - this.extraFieldsLength = reader.readInt(2); - this.fileCommentLength = reader.readInt(2); - this.diskNumberStart = reader.readInt(2); - this.internalFileAttributes = reader.readInt(2); - this.externalFileAttributes = reader.readInt(4); - this.localHeaderOffset = reader.readInt(4); - - if (this.isEncrypted()) { - throw new Error("Encrypted zip are not supported"); - } - - // will be read in the local part, see the comments there - reader.skip(fileNameLength); - this.readExtraFields(reader); - this.parseZIP64ExtraField(reader); - this.fileComment = reader.readData(this.fileCommentLength); - }, - - /** - * Parse the external file attributes and get the unix/dos permissions. - */ - processAttributes: function () { - this.unixPermissions = null; - this.dosPermissions = null; - var madeBy = this.versionMadeBy >> 8; - - // Check if we have the DOS directory flag set. - // We look for it in the DOS and UNIX permissions - // but some unknown platform could set it as a compatibility flag. - this.dir = this.externalFileAttributes & 0x0010 ? true : false; - - if(madeBy === MADE_BY_DOS) { - // first 6 bits (0 to 5) - this.dosPermissions = this.externalFileAttributes & 0x3F; - } - - if(madeBy === MADE_BY_UNIX) { - this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF; - // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8); - } - - // fail safe : if the name ends with a / it probably means a folder - if (!this.dir && this.fileNameStr.slice(-1) === '/') { - this.dir = true; - } - }, - - /** - * Parse the ZIP64 extra field and merge the info in the current ZipEntry. - * @param {DataReader} reader the reader to use. - */ - parseZIP64ExtraField: function(reader) { - - if (!this.extraFields[0x0001]) { - return; - } - - // should be something, preparing the extra reader - var extraReader = readerFor(this.extraFields[0x0001].value); - - // I really hope that these 64bits integer can fit in 32 bits integer, because js - // won't let us have more. - if (this.uncompressedSize === utils.MAX_VALUE_32BITS) { - this.uncompressedSize = extraReader.readInt(8); - } - if (this.compressedSize === utils.MAX_VALUE_32BITS) { - this.compressedSize = extraReader.readInt(8); - } - if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) { - this.localHeaderOffset = extraReader.readInt(8); - } - if (this.diskNumberStart === utils.MAX_VALUE_32BITS) { - this.diskNumberStart = extraReader.readInt(4); - } - }, - /** - * Read the central part of a zip file and add the info in this object. - * @param {DataReader} reader the reader to use. - */ - readExtraFields: function(reader) { - var end = reader.index + this.extraFieldsLength, - extraFieldId, - extraFieldLength, - extraFieldValue; - - if (!this.extraFields) { - this.extraFields = {}; - } - - while (reader.index < end) { - extraFieldId = reader.readInt(2); - extraFieldLength = reader.readInt(2); - extraFieldValue = reader.readData(extraFieldLength); - - this.extraFields[extraFieldId] = { - id: extraFieldId, - length: extraFieldLength, - value: extraFieldValue - }; - } - }, - /** - * Apply an UTF8 transformation if needed. - */ - handleUTF8: function() { - var decodeParamType = support.uint8array ? "uint8array" : "array"; - if (this.useUTF8()) { - this.fileNameStr = utf8.utf8decode(this.fileName); - this.fileCommentStr = utf8.utf8decode(this.fileComment); - } else { - var upath = this.findExtraFieldUnicodePath(); - if (upath !== null) { - this.fileNameStr = upath; - } else { - // ASCII text or unsupported code page - var fileNameByteArray = utils.transformTo(decodeParamType, this.fileName); - this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray); - } - - var ucomment = this.findExtraFieldUnicodeComment(); - if (ucomment !== null) { - this.fileCommentStr = ucomment; - } else { - // ASCII text or unsupported code page - var commentByteArray = utils.transformTo(decodeParamType, this.fileComment); - this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray); - } - } - }, - - /** - * Find the unicode path declared in the extra field, if any. - * @return {String} the unicode path, null otherwise. - */ - findExtraFieldUnicodePath: function() { - var upathField = this.extraFields[0x7075]; - if (upathField) { - var extraReader = readerFor(upathField.value); - - // wrong version - if (extraReader.readInt(1) !== 1) { - return null; - } - - // the crc of the filename changed, this field is out of date. - if (crc32fn(this.fileName) !== extraReader.readInt(4)) { - return null; - } - - return utf8.utf8decode(extraReader.readData(upathField.length - 5)); - } - return null; - }, - - /** - * Find the unicode comment declared in the extra field, if any. - * @return {String} the unicode comment, null otherwise. - */ - findExtraFieldUnicodeComment: function() { - var ucommentField = this.extraFields[0x6375]; - if (ucommentField) { - var extraReader = readerFor(ucommentField.value); - - // wrong version - if (extraReader.readInt(1) !== 1) { - return null; - } - - // the crc of the comment changed, this field is out of date. - if (crc32fn(this.fileComment) !== extraReader.readInt(4)) { - return null; - } - - return utf8.utf8decode(extraReader.readData(ucommentField.length - 5)); - } - return null; - } -}; -module.exports = ZipEntry; - -},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(require,module,exports){ -'use strict'; - -var StreamHelper = require('./stream/StreamHelper'); -var DataWorker = require('./stream/DataWorker'); -var utf8 = require('./utf8'); -var CompressedObject = require('./compressedObject'); -var GenericWorker = require('./stream/GenericWorker'); - -/** - * A simple object representing a file in the zip file. - * @constructor - * @param {string} name the name of the file - * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data - * @param {Object} options the options of the file - */ -var ZipObject = function(name, data, options) { - this.name = name; - this.dir = options.dir; - this.date = options.date; - this.comment = options.comment; - this.unixPermissions = options.unixPermissions; - this.dosPermissions = options.dosPermissions; - - this._data = data; - this._dataBinary = options.binary; - // keep only the compression - this.options = { - compression : options.compression, - compressionOptions : options.compressionOptions - }; -}; - -ZipObject.prototype = { - /** - * Create an internal stream for the content of this object. - * @param {String} type the type of each chunk. - * @return StreamHelper the stream. - */ - internalStream: function (type) { - var result = null, outputType = "string"; - try { - if (!type) { - throw new Error("No output type specified."); - } - outputType = type.toLowerCase(); - var askUnicodeString = outputType === "string" || outputType === "text"; - if (outputType === "binarystring" || outputType === "text") { - outputType = "string"; - } - result = this._decompressWorker(); - - var isUnicodeString = !this._dataBinary; - - if (isUnicodeString && !askUnicodeString) { - result = result.pipe(new utf8.Utf8EncodeWorker()); - } - if (!isUnicodeString && askUnicodeString) { - result = result.pipe(new utf8.Utf8DecodeWorker()); - } - } catch (e) { - result = new GenericWorker("error"); - result.error(e); - } - - return new StreamHelper(result, outputType, ""); - }, - - /** - * Prepare the content in the asked type. - * @param {String} type the type of the result. - * @param {Function} onUpdate a function to call on each internal update. - * @return Promise the promise of the result. - */ - async: function (type, onUpdate) { - return this.internalStream(type).accumulate(onUpdate); - }, - - /** - * Prepare the content as a nodejs stream. - * @param {String} type the type of each chunk. - * @param {Function} onUpdate a function to call on each internal update. - * @return Stream the stream. - */ - nodeStream: function (type, onUpdate) { - return this.internalStream(type || "nodebuffer").toNodejsStream(onUpdate); - }, - - /** - * Return a worker for the compressed content. - * @private - * @param {Object} compression the compression object to use. - * @param {Object} compressionOptions the options to use when compressing. - * @return Worker the worker. - */ - _compressWorker: function (compression, compressionOptions) { - if ( - this._data instanceof CompressedObject && - this._data.compression.magic === compression.magic - ) { - return this._data.getCompressedWorker(); - } else { - var result = this._decompressWorker(); - if(!this._dataBinary) { - result = result.pipe(new utf8.Utf8EncodeWorker()); - } - return CompressedObject.createWorkerFrom(result, compression, compressionOptions); - } - }, - /** - * Return a worker for the decompressed content. - * @private - * @return Worker the worker. - */ - _decompressWorker : function () { - if (this._data instanceof CompressedObject) { - return this._data.getContentWorker(); - } else if (this._data instanceof GenericWorker) { - return this._data; - } else { - return new DataWorker(this._data); - } - } -}; - -var removedMethods = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"]; -var removedFn = function () { - throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); -}; - -for(var i = 0; i < removedMethods.length; i++) { - ZipObject.prototype[removedMethods[i]] = removedFn; -} -module.exports = ZipObject; - -},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(require,module,exports){ -require('../modules/web.immediate'); -module.exports = require('../modules/_core').setImmediate; -},{"../modules/_core":40,"../modules/web.immediate":56}],37:[function(require,module,exports){ -module.exports = function(it){ - if(typeof it != 'function')throw TypeError(it + ' is not a function!'); - return it; -}; -},{}],38:[function(require,module,exports){ -var isObject = require('./_is-object'); -module.exports = function(it){ - if(!isObject(it))throw TypeError(it + ' is not an object!'); - return it; -}; -},{"./_is-object":51}],39:[function(require,module,exports){ -var toString = {}.toString; - -module.exports = function(it){ - return toString.call(it).slice(8, -1); -}; -},{}],40:[function(require,module,exports){ -var core = module.exports = {version: '2.3.0'}; -if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef -},{}],41:[function(require,module,exports){ -// optional / simple context binding -var aFunction = require('./_a-function'); -module.exports = function(fn, that, length){ - aFunction(fn); - if(that === undefined)return fn; - switch(length){ - case 1: return function(a){ - return fn.call(that, a); - }; - case 2: return function(a, b){ - return fn.call(that, a, b); - }; - case 3: return function(a, b, c){ - return fn.call(that, a, b, c); - }; - } - return function(/* ...args */){ - return fn.apply(that, arguments); - }; -}; -},{"./_a-function":37}],42:[function(require,module,exports){ -// Thank's IE8 for his funny defineProperty -module.exports = !require('./_fails')(function(){ - return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; -}); -},{"./_fails":45}],43:[function(require,module,exports){ -var isObject = require('./_is-object') - , document = require('./_global').document - // in old IE typeof document.createElement is 'object' - , is = isObject(document) && isObject(document.createElement); -module.exports = function(it){ - return is ? document.createElement(it) : {}; -}; -},{"./_global":46,"./_is-object":51}],44:[function(require,module,exports){ -var global = require('./_global') - , core = require('./_core') - , ctx = require('./_ctx') - , hide = require('./_hide') - , PROTOTYPE = 'prototype'; - -var $export = function(type, name, source){ - var IS_FORCED = type & $export.F - , IS_GLOBAL = type & $export.G - , IS_STATIC = type & $export.S - , IS_PROTO = type & $export.P - , IS_BIND = type & $export.B - , IS_WRAP = type & $export.W - , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) - , expProto = exports[PROTOTYPE] - , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] - , key, own, out; - if(IS_GLOBAL)source = name; - for(key in source){ - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - if(own && key in exports)continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function(C){ - var F = function(a, b, c){ - if(this instanceof C){ - switch(arguments.length){ - case 0: return new C; - case 1: return new C(a); - case 2: return new C(a, b); - } return new C(a, b, c); - } return C.apply(this, arguments); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% - if(IS_PROTO){ - (exports.virtual || (exports.virtual = {}))[key] = out; - // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% - if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); - } - } -}; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; -},{"./_core":40,"./_ctx":41,"./_global":46,"./_hide":47}],45:[function(require,module,exports){ -module.exports = function(exec){ - try { - return !!exec(); - } catch(e){ - return true; - } -}; -},{}],46:[function(require,module,exports){ -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); -if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef -},{}],47:[function(require,module,exports){ -var dP = require('./_object-dp') - , createDesc = require('./_property-desc'); -module.exports = require('./_descriptors') ? function(object, key, value){ - return dP.f(object, key, createDesc(1, value)); -} : function(object, key, value){ - object[key] = value; - return object; -}; -},{"./_descriptors":42,"./_object-dp":52,"./_property-desc":53}],48:[function(require,module,exports){ -module.exports = require('./_global').document && document.documentElement; -},{"./_global":46}],49:[function(require,module,exports){ -module.exports = !require('./_descriptors') && !require('./_fails')(function(){ - return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7; -}); -},{"./_descriptors":42,"./_dom-create":43,"./_fails":45}],50:[function(require,module,exports){ -// fast apply, http://jsperf.lnkit.com/fast-apply/5 -module.exports = function(fn, args, that){ - var un = that === undefined; - switch(args.length){ - case 0: return un ? fn() - : fn.call(that); - case 1: return un ? fn(args[0]) - : fn.call(that, args[0]); - case 2: return un ? fn(args[0], args[1]) - : fn.call(that, args[0], args[1]); - case 3: return un ? fn(args[0], args[1], args[2]) - : fn.call(that, args[0], args[1], args[2]); - case 4: return un ? fn(args[0], args[1], args[2], args[3]) - : fn.call(that, args[0], args[1], args[2], args[3]); - } return fn.apply(that, args); -}; -},{}],51:[function(require,module,exports){ -module.exports = function(it){ - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; -},{}],52:[function(require,module,exports){ -var anObject = require('./_an-object') - , IE8_DOM_DEFINE = require('./_ie8-dom-define') - , toPrimitive = require('./_to-primitive') - , dP = Object.defineProperty; - -exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){ - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if(IE8_DOM_DEFINE)try { - return dP(O, P, Attributes); - } catch(e){ /* empty */ } - if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); - if('value' in Attributes)O[P] = Attributes.value; - return O; -}; -},{"./_an-object":38,"./_descriptors":42,"./_ie8-dom-define":49,"./_to-primitive":55}],53:[function(require,module,exports){ -module.exports = function(bitmap, value){ - return { - enumerable : !(bitmap & 1), - configurable: !(bitmap & 2), - writable : !(bitmap & 4), - value : value - }; -}; -},{}],54:[function(require,module,exports){ -var ctx = require('./_ctx') - , invoke = require('./_invoke') - , html = require('./_html') - , cel = require('./_dom-create') - , global = require('./_global') - , process = global.process - , setTask = global.setImmediate - , clearTask = global.clearImmediate - , MessageChannel = global.MessageChannel - , counter = 0 - , queue = {} - , ONREADYSTATECHANGE = 'onreadystatechange' - , defer, channel, port; -var run = function(){ - var id = +this; - if(queue.hasOwnProperty(id)){ - var fn = queue[id]; - delete queue[id]; - fn(); - } -}; -var listener = function(event){ - run.call(event.data); -}; -// Node.js 0.9+ & IE10+ has setImmediate, otherwise: -if(!setTask || !clearTask){ - setTask = function setImmediate(fn){ - var args = [], i = 1; - while(arguments.length > i)args.push(arguments[i++]); - queue[++counter] = function(){ - invoke(typeof fn == 'function' ? fn : Function(fn), args); - }; - defer(counter); - return counter; - }; - clearTask = function clearImmediate(id){ - delete queue[id]; - }; - // Node.js 0.8- - if(require('./_cof')(process) == 'process'){ - defer = function(id){ - process.nextTick(ctx(run, id, 1)); - }; - // Browsers with MessageChannel, includes WebWorkers - } else if(MessageChannel){ - channel = new MessageChannel; - port = channel.port2; - channel.port1.onmessage = listener; - defer = ctx(port.postMessage, port, 1); - // Browsers with postMessage, skip WebWorkers - // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' - } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ - defer = function(id){ - global.postMessage(id + '', '*'); - }; - global.addEventListener('message', listener, false); - // IE8- - } else if(ONREADYSTATECHANGE in cel('script')){ - defer = function(id){ - html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ - html.removeChild(this); - run.call(id); - }; - }; - // Rest old browsers - } else { - defer = function(id){ - setTimeout(ctx(run, id, 1), 0); - }; - } -} -module.exports = { - set: setTask, - clear: clearTask -}; -},{"./_cof":39,"./_ctx":41,"./_dom-create":43,"./_global":46,"./_html":48,"./_invoke":50}],55:[function(require,module,exports){ -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = require('./_is-object'); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function(it, S){ - if(!isObject(it))return it; - var fn, val; - if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; - if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; - if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; - throw TypeError("Can't convert object to primitive value"); -}; -},{"./_is-object":51}],56:[function(require,module,exports){ -var $export = require('./_export') - , $task = require('./_task'); -$export($export.G + $export.B, { - setImmediate: $task.set, - clearImmediate: $task.clear -}); -},{"./_export":44,"./_task":54}],57:[function(require,module,exports){ -(function (global){ -'use strict'; -var Mutation = global.MutationObserver || global.WebKitMutationObserver; - -var scheduleDrain; - -{ - if (Mutation) { - var called = 0; - var observer = new Mutation(nextTick); - var element = global.document.createTextNode(''); - observer.observe(element, { - characterData: true - }); - scheduleDrain = function () { - element.data = (called = ++called % 2); - }; - } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') { - var channel = new global.MessageChannel(); - channel.port1.onmessage = nextTick; - scheduleDrain = function () { - channel.port2.postMessage(0); - }; - } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) { - scheduleDrain = function () { - - // Create a